cancel
Showing results for 
Search instead for 
Did you mean: 

hide options in copy-move-to

mrksjs
Champ on-the-rise
Champ on-the-rise
hi!


i'dl like to hide the two buttons in the copy-move-to dashlet/popup but cant manage to get it done!


[img]http://i49.tinypic.com/23vghh3.jpg[/img]

i modified copy-move-to.js in \tomcat\webapps\share\modules\documentlibrary\

see allowedViewModes
  YAHOO.extend(Alfresco.module.DoclibCopyMoveTo, Alfresco.module.DoclibGlobalFolder,
   {
      /**
       * Set multiple initialization options at once.
       *
       * @method setOptions
       * @override
       * @param obj {object} Object literal specifying a set of options
       * @return {Alfresco.module.DoclibMoveTo} returns 'this' for method chaining
       */
      setOptions: function DLCMT_setOptions(obj)
      {
         var myOptions =
          {
            allowedViewModes:
            [
               Alfresco.module.DoclibGlobalFolder.VIEW_MODE_SITE
               // was
               // Alfresco.module.DoclibGlobalFolder.VIEW_MODE_SITE,
               // Alfresco.module.DoclibGlobalFolder.VIEW_MODE_REPOSITORY,
               // Alfresco.module.DoclibGlobalFolder.VIEW_MODE_USERHOME
            ],
            extendedTemplateUrl: Alfresco.constants.URL_SERVICECONTEXT + "modules/documentlibrary/copy-move-to"
          };

         …
         

but no change is done.
any hints?



additional:
i edited copy-move-to.js and duplicated to file to copy-move-to-min.js
i cant see the script in the debugger?!

version is 3.4.10 enterprise
3 REPLIES 3

dantuffery
Champ in-the-making
Champ in-the-making
It looks you're not running in DEBUG mode so 'documentlibrary-actions-min.js' will be used instead of 'copy-move-to.js', take a look in 'alfresco/site-webscripts/org/alfresco/components/documentlibrary/actions-common.get.head.ftl'.


<#if DEBUG>
   <script type="text/javascript" src="${page.url.context}/res/components/documentlibrary/actions.js"></script>
   <script type="text/javascript" src="${page.url.context}/res/modules/simple-dialog.js"></script>
   <script type="text/javascript" src="${page.url.context}/res/modules/documentlibrary/global-folder.js"></script>
   <script type="text/javascript" src="${page.url.context}/res/modules/documentlibrary/copy-move-to.js"></script>
   <script type="text/javascript" src="${page.url.context}/res/components/people-finder/people-finder.js"></script>
   <script type="text/javascript" src="${page.url.context}/res/modules/documentlibrary/permissions.js"></script>
   <script type="text/javascript" src="${page.url.context}/res/modules/documentlibrary/aspects.js"></script>
<#else>
   <script type="text/javascript" src="${page.url.context}/res/js/documentlibrary-actions-min.js"></script>
</#if>

You can switch to debug mode by adding the following config to your share-config-custom.xml file:



<config replace="true">
   <flags>
      <!–
      Developer debugging setting to turn on DEBUG mode for client scripts in the browser
      –>
    <client-debug>true</client-debug>
      <!–
            LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
            This flag automatically activates logging on page load.
      –>
      <client-debug-autologging>false</client-debug-autologging>
   </flags>
</config>

When you restart, clear your browser cache and view the page again, you will see the copy-move-to.js script in the debugger.

Dan

mrksjs
Champ on-the-rise
Champ on-the-rise
rock solid mate!

now the js not appearing makes sense and i was able to get the task done.

thanks a lot!!

janaka1984
Star Contributor
Star Contributor
hi all,

I need to set content file of repository on each folder.
how can do it ?

can we do it by modify something on code -Alfresco.module.DoclibGlobalFolder ?

Regards

weerarathna