Merge pull request #456 from victorsl/BUG-9586
BUG 9586 "Empty folder the icon for that folder is the icon..." SOLVED
This commit is contained in:
@@ -47,7 +47,7 @@
|
|||||||
background-color: #eaeaea;
|
background-color: #eaeaea;
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-color-palette em:hover, .x-color-palette span:hover{
|
.x-color-palette em:hover, .x-color-palette span:hover{
|
||||||
background-color: #eaeaea;
|
background-color: #eaeaea;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -419,8 +419,8 @@ ul.x-tab-strip-bottom{
|
|||||||
background-image:url(/images/ext/default/button/s-arrow-noline.gif);
|
background-image:url(/images/ext/default/button/s-arrow-noline.gif);
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split,
|
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split,
|
||||||
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split
|
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split
|
||||||
{
|
{
|
||||||
background-image:url(/images/ext/gray/button/s-arrow-o.gif);
|
background-image:url(/images/ext/gray/button/s-arrow-o.gif);
|
||||||
}
|
}
|
||||||
@@ -429,8 +429,8 @@ ul.x-tab-strip-bottom{
|
|||||||
background-image:url(/images/ext/default/button/s-arrow-b-noline.gif);
|
background-image:url(/images/ext/default/button/s-arrow-b-noline.gif);
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom,
|
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom,
|
||||||
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom
|
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom
|
||||||
{
|
{
|
||||||
background-image:url(/images/ext/gray/button/s-arrow-bo.gif);
|
background-image:url(/images/ext/gray/button/s-arrow-bo.gif);
|
||||||
}
|
}
|
||||||
@@ -1320,7 +1320,7 @@ a.x-menu-item {
|
|||||||
|
|
||||||
.x-panel-header {
|
.x-panel-header {
|
||||||
color:#333;
|
color:#333;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-family: tahoma,arial,verdana,sans-serif;
|
font-family: tahoma,arial,verdana,sans-serif;
|
||||||
border-color:#d0d0d0;
|
border-color:#d0d0d0;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
background-color: #eaeaea;
|
background-color: #eaeaea;
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-color-palette em:hover, .x-color-palette span:hover{
|
.x-color-palette em:hover, .x-color-palette span:hover{
|
||||||
background-color: #eaeaea;
|
background-color: #eaeaea;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -419,8 +419,8 @@ ul.x-tab-strip-bottom{
|
|||||||
background-image:url(/images/ext/default/button/s-arrow-noline.gif);
|
background-image:url(/images/ext/default/button/s-arrow-noline.gif);
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split,
|
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split,
|
||||||
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split
|
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split
|
||||||
{
|
{
|
||||||
background-image:url(/images/ext/gray/button/s-arrow-o.gif);
|
background-image:url(/images/ext/gray/button/s-arrow-o.gif);
|
||||||
}
|
}
|
||||||
@@ -429,8 +429,8 @@ ul.x-tab-strip-bottom{
|
|||||||
background-image:url(/images/ext/default/button/s-arrow-b-noline.gif);
|
background-image:url(/images/ext/default/button/s-arrow-b-noline.gif);
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom,
|
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom,
|
||||||
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom
|
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom
|
||||||
{
|
{
|
||||||
background-image:url(/images/ext/gray/button/s-arrow-bo.gif);
|
background-image:url(/images/ext/gray/button/s-arrow-bo.gif);
|
||||||
}
|
}
|
||||||
@@ -1320,7 +1320,7 @@ a.x-menu-item {
|
|||||||
|
|
||||||
.x-panel-header {
|
.x-panel-header {
|
||||||
color:#333;
|
color:#333;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-family: tahoma,arial,verdana,sans-serif;
|
font-family: tahoma,arial,verdana,sans-serif;
|
||||||
border-color:#d0d0d0;
|
border-color:#d0d0d0;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
background-color: #eaeaea;
|
background-color: #eaeaea;
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-color-palette em:hover, .x-color-palette span:hover{
|
.x-color-palette em:hover, .x-color-palette span:hover{
|
||||||
background-color: #eaeaea;
|
background-color: #eaeaea;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -419,8 +419,8 @@ ul.x-tab-strip-bottom{
|
|||||||
background-image:url(/images/ext/default/button/s-arrow-noline.gif);
|
background-image:url(/images/ext/default/button/s-arrow-noline.gif);
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split,
|
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split,
|
||||||
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split
|
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split
|
||||||
{
|
{
|
||||||
background-image:url(/images/ext/gray/button/s-arrow-o.gif);
|
background-image:url(/images/ext/gray/button/s-arrow-o.gif);
|
||||||
}
|
}
|
||||||
@@ -429,8 +429,8 @@ ul.x-tab-strip-bottom{
|
|||||||
background-image:url(/images/ext/default/button/s-arrow-b-noline.gif);
|
background-image:url(/images/ext/default/button/s-arrow-b-noline.gif);
|
||||||
}
|
}
|
||||||
|
|
||||||
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom,
|
.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom,
|
||||||
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom
|
.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom
|
||||||
{
|
{
|
||||||
background-image:url(/images/ext/gray/button/s-arrow-bo.gif);
|
background-image:url(/images/ext/gray/button/s-arrow-bo.gif);
|
||||||
}
|
}
|
||||||
@@ -1320,7 +1320,7 @@ a.x-menu-item {
|
|||||||
|
|
||||||
.x-panel-header {
|
.x-panel-header {
|
||||||
color:#333;
|
color:#333;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-family: tahoma,arial,verdana,sans-serif;
|
font-family: tahoma,arial,verdana,sans-serif;
|
||||||
border-color:#d0d0d0;
|
border-color:#d0d0d0;
|
||||||
|
|||||||
@@ -72,6 +72,36 @@ streamFilefromPM=function(fileStream) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function nodeRootCreate()
|
||||||
|
{
|
||||||
|
var node = new Ext.tree.AsyncTreeNode({
|
||||||
|
id: "root",
|
||||||
|
text: "/",
|
||||||
|
draggable: false,
|
||||||
|
expanded: true,
|
||||||
|
cls: "folder",
|
||||||
|
|
||||||
|
listeners: {
|
||||||
|
beforeload: function (nodeRoot) {
|
||||||
|
nodeRoot.setIcon("");
|
||||||
|
},
|
||||||
|
load: function (nodeRoot) {
|
||||||
|
nodeRoot.setIcon("/images/ext/default/tree/folder.gif");
|
||||||
|
},
|
||||||
|
expand: function (nodeRoot) {
|
||||||
|
if (nodeRoot.hasChildNodes()) {
|
||||||
|
nodeRoot.setIcon("/images/ext/default/tree/folder-open.gif");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
collapse: function (nodeRoot) {
|
||||||
|
nodeRoot.setIcon("/images/ext/default/tree/folder.gif");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function chDir( directory, loadGridOnly ) {
|
function chDir( directory, loadGridOnly ) {
|
||||||
// console.info("**** Changing Directory: "+directory+" --
|
// console.info("**** Changing Directory: "+directory+" --
|
||||||
@@ -458,8 +488,6 @@ function openActionDialog( caller, action ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleCallback(requestParams, node) {
|
function handleCallback(requestParams, node) {
|
||||||
// console.log("handleCallback "+requestParams +" -- "+node);
|
|
||||||
// console.trace();
|
|
||||||
var conn = new Ext.data.Connection();
|
var conn = new Ext.data.Connection();
|
||||||
|
|
||||||
conn.request({
|
conn.request({
|
||||||
@@ -493,6 +521,15 @@ function handleCallback(requestParams, node) {
|
|||||||
} else {
|
} else {
|
||||||
Ext.Msg.alert( 'Failure', json.error );
|
Ext.Msg.alert( 'Failure', json.error );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options.params.option == "directory") {
|
||||||
|
switch (options.params.action) {
|
||||||
|
case "delete":
|
||||||
|
case "rename":
|
||||||
|
Ext.getCmp("dirTreePanel").setRootNode(nodeRootCreate());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Ext.Msg.alert( 'Error', 'Failed to connect to the server.');
|
Ext.Msg.alert( 'Error', 'Failed to connect to the server.');
|
||||||
@@ -546,27 +583,25 @@ function getRequestParams() {
|
|||||||
* Function for actions, which don't require a form like download,
|
* Function for actions, which don't require a form like download,
|
||||||
* extraction, deletion etc.
|
* extraction, deletion etc.
|
||||||
*/
|
*/
|
||||||
function deleteFiles(btn) {
|
function deleteFiles(btn)
|
||||||
|
{
|
||||||
|
if (btn != "yes") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( btn != 'yes') {
|
requestParams = getRequestParams();
|
||||||
return;
|
requestParams.action = "delete";
|
||||||
}
|
|
||||||
requestParams = getRequestParams();
|
handleCallback(requestParams);
|
||||||
requestParams.action = 'delete';
|
|
||||||
handleCallback(requestParams);
|
if (requestParams.option == "documents") {
|
||||||
if(requestParams.option=='documents'){
|
datastore.sendWhat = "files";
|
||||||
datastore.sendWhat = 'files';
|
loadDir();
|
||||||
loadDir();
|
} else {
|
||||||
} else {
|
//Ext.getCmp("dirTreePanel").setRootNode(nodeRootCreate());
|
||||||
var root1 = new Ext.tree.AsyncTreeNode({
|
}
|
||||||
text : '/',
|
|
||||||
draggable : false,
|
|
||||||
expanded : true,
|
|
||||||
id : 'root'
|
|
||||||
});
|
|
||||||
Ext.getCmp('dirTreePanel').setRootNode(root1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractArchive(btn) {
|
function extractArchive(btn) {
|
||||||
if( btn != 'yes') {
|
if( btn != 'yes') {
|
||||||
return;
|
return;
|
||||||
@@ -575,24 +610,21 @@ function extractArchive(btn) {
|
|||||||
requestParams.action = 'extract';
|
requestParams.action = 'extract';
|
||||||
handleCallback(requestParams);
|
handleCallback(requestParams);
|
||||||
}
|
}
|
||||||
function deleteDir( btn, node ) {
|
|
||||||
if( btn != 'yes') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
requestParams = getRequestParams();
|
|
||||||
requestParams.dir = datastore.directory.substring( 0, datastore.directory.lastIndexOf('/'));
|
|
||||||
requestParams.selitems = Array( node.id.replace( /_RRR_/g, '/' ) );
|
|
||||||
requestParams.action = 'delete';
|
|
||||||
handleCallback(requestParams, node);
|
|
||||||
|
|
||||||
var root1 = new Ext.tree.AsyncTreeNode({
|
function deleteDir(btn, node)
|
||||||
text : '/',
|
{
|
||||||
draggable : false,
|
if (btn != "yes") {
|
||||||
expanded : true,
|
return;
|
||||||
id : 'root'
|
}
|
||||||
});
|
|
||||||
Ext.getCmp('dirTreePanel').setRootNode(root1);
|
|
||||||
|
|
||||||
|
requestParams = getRequestParams();
|
||||||
|
requestParams.dir = datastore.directory.substring(0, datastore.directory.lastIndexOf("/"));
|
||||||
|
requestParams.selitems = Array(node.id.replace(/_RRR_/g, "/"));
|
||||||
|
requestParams.action = "delete";
|
||||||
|
|
||||||
|
handleCallback(requestParams, node);
|
||||||
|
|
||||||
|
//Ext.getCmp("dirTreePanel").setRootNode(nodeRootCreate());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ext.msgBoxSlider = function(){
|
Ext.msgBoxSlider = function(){
|
||||||
@@ -1605,10 +1637,11 @@ var documentsTab = {
|
|||||||
animate : true,
|
animate : true,
|
||||||
tools:[
|
tools:[
|
||||||
{
|
{
|
||||||
id:'refresh',
|
id: "refresh",
|
||||||
handler:function() {
|
handler: function () {
|
||||||
Ext.getCmp('dirTreePanel').getRootNode().reload();
|
//Ext.getCmp("dirTreePanel").getRootNode().reload();
|
||||||
}
|
Ext.getCmp("dirTreePanel").setRootNode(nodeRootCreate());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// rootVisible: false,
|
// rootVisible: false,
|
||||||
@@ -1663,13 +1696,7 @@ var documentsTab = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
root : new Ext.tree.AsyncTreeNode({
|
root: nodeRootCreate()
|
||||||
text : '/',
|
|
||||||
draggable : false,
|
|
||||||
expanded : true,
|
|
||||||
cls: 'folder',
|
|
||||||
id : 'root'
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
layout : "border",
|
layout : "border",
|
||||||
|
|||||||
Reference in New Issue
Block a user