This commit is contained in:
Mario Romano 2016-04-08 12:06:05 +01:00
parent efba6d1bbd
commit b4dd52992a
2 changed files with 116 additions and 30 deletions

View File

@ -23,11 +23,11 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="index.html" pinned="false" current-in-tab="true">
<file leaf-file-name="index.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="292">
<caret line="63" column="8" selection-start-line="63" selection-start-column="8" selection-end-line="65" selection-end-column="19" />
<state relative-caret-position="262">
<caret line="56" column="0" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" />
<folding />
</state>
</provider>
@ -53,11 +53,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="alfresco-file-list.html" pinned="false" current-in-tab="false">
<file leaf-file-name="alfresco-file-list.html" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/webcomponents/alfresco-file-list/src/alfresco-file-list.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="199">
<caret line="192" column="61" selection-start-line="192" selection-start-column="61" selection-end-line="192" selection-end-column="61" />
<state relative-caret-position="175">
<caret line="151" column="8" selection-start-line="151" selection-start-column="8" selection-end-line="151" selection-end-column="12" />
<folding />
</state>
</provider>
@ -66,7 +66,7 @@
<file leaf-file-name="file-upload.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/webcomponents/file-upload/file-upload.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="334">
<state relative-caret-position="7710">
<caret line="514" column="49" selection-start-line="514" selection-start-column="49" selection-end-line="514" selection-end-column="49" />
<folding />
</state>
@ -97,8 +97,8 @@
<option value="$PROJECT_DIR$/css/style.css" />
<option value="$PROJECT_DIR$/src/helloworld.js" />
<option value="$PROJECT_DIR$/index.html" />
<option value="$PROJECT_DIR$/webcomponents/alfresco-file-list/src/alfresco-file-list.html" />
<option value="$PROJECT_DIR$/webcomponents/file-upload/file-upload.html" />
<option value="$PROJECT_DIR$/webcomponents/alfresco-file-list/src/alfresco-file-list.html" />
</list>
</option>
</component>
@ -623,14 +623,15 @@
<workItem from="1459961481615" duration="247000" />
<workItem from="1460028311714" duration="10383000" />
<workItem from="1460053854983" duration="3523000" />
<workItem from="1460113292902" duration="160000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="30748000" />
<option name="totallyTimeSpent" value="30908000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1440" height="803" extended-state="6" />
<frame x="0" y="23" width="1440" height="803" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
@ -640,8 +641,7 @@
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32959327" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39130434" sideWeight="0.5" order="8" side_tool="true" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.39130434" sideWeight="0.5" order="8" side_tool="true" content_ui="tabs" />
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24892704" sideWeight="0.4916318" order="0" side_tool="false" content_ui="combo" />
@ -651,12 +651,13 @@
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24892704" sideWeight="0.5083682" order="4" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout>
<layout-to-restore>
@ -695,6 +696,46 @@
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/helloworld.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="0" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/css/style.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" column="45" selection-start-line="1" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/webcomponents/alfresco-file-list/src/alfresco-file-list.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2880">
<caret line="192" column="61" selection-start-line="192" selection-start-column="61" selection-end-line="192" selection-end-column="61" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/webcomponents/file-upload/file-upload.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="7710">
<caret line="514" column="49" selection-start-line="514" selection-start-column="49" selection-end-line="514" selection-end-column="49" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="750">
@ -731,7 +772,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="17" selection-start-line="3" selection-start-column="16" selection-end-line="3" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
@ -915,7 +955,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="17" selection-start-line="3" selection-start-column="16" selection-end-line="3" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
@ -935,17 +974,9 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/webcomponents/alfresco-file-list/src/alfresco-file-list.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="199">
<caret line="192" column="61" selection-start-line="192" selection-start-column="61" selection-end-line="192" selection-end-column="61" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/webcomponents/file-upload/file-upload.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="334">
<state relative-caret-position="7710">
<caret line="514" column="49" selection-start-line="514" selection-start-column="49" selection-end-line="514" selection-end-column="49" />
<folding />
</state>
@ -953,8 +984,16 @@
</entry>
<entry file="file://$PROJECT_DIR$/index.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="292">
<caret line="63" column="8" selection-start-line="63" selection-start-column="8" selection-end-line="65" selection-end-column="19" />
<state relative-caret-position="262">
<caret line="56" column="0" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/webcomponents/alfresco-file-list/src/alfresco-file-list.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="175">
<caret line="151" column="8" selection-start-line="151" selection-start-column="8" selection-end-line="151" selection-end-column="12" />
<folding />
</state>
</provider>

View File

@ -88,6 +88,32 @@
padding: 0px;
}
.breadcrumb {
font-family: sans-serif;
font-size: 12px;
padding-left: 11px;
height: 28px;
width: auto;
}
.folder-breadcrumb-img{
float: left;
text-align: left;
height: 15px;
padding: 0px 10px 0px 0px;
}
.folder-breadcrumb-text{
float: left;
text-align: left;
height: 25px;
padding: 0px 10px 0px 0px;
}
.folder-breadcrumb-container{
float: left;
}
paper-dropdown-menu.custom {
overflow: visible;
--paper-input-container-label: {
@ -108,11 +134,22 @@
display: none;
};
}
</style>
<dom-module id="alfresco-file-list">
<template>
<div class="breadcrumb">
<template is="dom-repeat" items="{{breadcrumbs}}">
<div class="folder-breadcrumb-container">
<img class="folder-breadcrumb-img" src="img/folder.svg">
<div class="folder-breadcrumb-text">[[item]]</div>
</div>
</template>
</div>
<hr>
<!-- Main List for the items -->
<iron-list id="itemsList" items="{{data}}" selected-items="{{selectedItems}}" selection-enabled>
<template>
@ -179,13 +216,23 @@
}
},
goToFolder: function(event) {
var slug= event.model.item.location.site + '/' + event.model.item.location.container + '/' + event.model.item.fileName
console.log('click folder'+ this.baseUrl());
goToFolder: function (event) {
this.container = event.model.item.location.container;
var path = event.model.item.location.path !== '/' ? (event.model.item.location.path + '/' ) : '/';
var relativePath = this.container + path + event.model.item.fileName;
var slug = event.model.item.location.site + '/' + relativePath;
this.breadcrumbs = relativePath.split('/');
console.log('event.model.item.location.path' + event.model.item.location.path);
console.log('event.model.item.fileName' + event.model.item.fileName);
console.log('event.model.item.location.site' + event.model.item.location.site);
console.log('relativePath' + relativePath);
console.log('this.breadcrumbs' + this.breadcrumbs);
this.fetchFolderFolder(slug);
},
ready: function() {
this.breadcrumbs = ['documentLibrary'];
var initialFolder = 'swsdp/documentLibrary';
this.fetchFolderFolder(initialFolder);
var self = this;