This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,18 @@ midas.browse.moveCopyCallbackSelect = function (node) {
55
55
56
56
$ ( '#selectedDestinationHidden' ) . val ( node . attr ( 'element' ) ) ;
57
57
$ ( '#selectedDestination' ) . html ( sliceFileName ( selectedElement , 40 ) ) ;
58
- $ ( '#selectElement' ) . removeAttr ( 'disabled' ) ;
59
- $ ( '#shareElement' ) . removeAttr ( 'disabled' ) ;
60
- $ ( '#duplicateElement' ) . removeAttr ( 'disabled' ) ;
61
- $ ( '#moveElement' ) . removeAttr ( 'disabled' ) ;
58
+ if ( node . attr ( 'element' ) == - 1 || node . attr ( 'element' ) == - 2 ) {
59
+ $ ( '#selectElement' ) . attr ( 'disabled' , 'disabled' ) ;
60
+ $ ( '#shareElement' ) . attr ( 'disabled' , 'disabled' ) ;
61
+ $ ( '#duplicateElement' ) . attr ( 'disabled' , 'disabled' ) ;
62
+ $ ( '#moveElement' ) . attr ( 'disabled' , 'disabled' ) ;
63
+ }
64
+ else {
65
+ $ ( '#selectElement' ) . removeAttr ( 'disabled' ) ;
66
+ $ ( '#shareElement' ) . removeAttr ( 'disabled' ) ;
67
+ $ ( '#duplicateElement' ) . removeAttr ( 'disabled' ) ;
68
+ $ ( '#moveElement' ) . removeAttr ( 'disabled' ) ;
69
+ }
62
70
} ;
63
71
64
72
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ echo '<script type="text/javascript" src="' . $this->coreWebroot . '/public/js/b
37
37
foreach ($ this ->communities as $ community )
38
38
{
39
39
$ folder =$ community ->getFolder ();
40
- echo "<tr id='node-- $ node' class='parent' privacy=' " .($ community ->getPrivacy () == 1 ? MIDAS_PRIVACY_PRIVATE : MIDAS_PRIVACY_PUBLIC )."' type='community' element=' { $ community -> getCommunityId ()} ' ajax=' {$ folder ->getFolderId ()}'> " ;
40
+ echo "<tr id='node-- $ node' class='parent' privacy=' " .($ community ->getPrivacy () == 1 ? MIDAS_PRIVACY_PRIVATE : MIDAS_PRIVACY_PUBLIC )."' type='community' element='-2 ' ajax=' {$ folder ->getFolderId ()}'> " ;
41
41
echo " <td class='treeBrowseElement'><span class='community'> {$ community ->getName ()}</span></td> " ;
42
42
echo "</tr> " ;
43
43
$ node ++;
You can’t perform that action at this time.
0 commit comments