[opencms-dev] Disable lock stealing
Bart Elberg
belberg at idealcorp.com
Fri Oct 25 21:24:04 CEST 2002
Thanks Alex, that is the solution!! So the templates and code I was
looking at must be old and no longer used for the non-Backoffice parts
of OpenCms? By the way, I also changed the entry for the menu
separators from :
addMenuEntry(resource_id,
"-", "
", "''", "rules_key(d d aaaa aaaa
aaaa aaaa aaaa)");
to:
addMenuEntry(resource_id,
"-", "
", "''", "rules_key(d d aaaa aaaa
dddd dddd dddd)");
so that the separator only shows up when there is a menu entry above it.
Any chance this is going to be in the documentation anytime soon?
Bart
---------------------
Alexander Kandzior wrote:
>Hi Bart,
>
>Check out the files in
>
>/system/workplace/restypes/
>
>for each resource type there is a file that describes the
>context menu of the resource type.
>
>Look for the line:
>
>addMenuEntry(resource_id, \
> "language_key(explorer.context.overridelock)", \
> "lockchange.html?initial=true", \
> "''", \
> "rules_key(d d dddd dddd aaai aaai aaai)"); \
>
>change the
>"rules_key" to "(d d dddd dddd iiii iiii iiii)"
>(then the "steal lock" will be inactive)
>or to "(d d dddd dddd dddd dddd dddd)"
>(then the "steal lock" will not be visible altogether.
>
>Do this for all content types (ie. files in
>/system/workplace/restypes/).
>
>Restart OpenCms after you made changes.
>This should to the trick.
>
>The meaning of the flags:
>i = inactive
>a = active
>d = deactivated
>
>The positions are for various states of the resource,
>online / offline / locked / unlocked / deleted etc.
>Unfortunalty I do not have a complete description
>available at the moment.
>
>Regards,
>Alex.
>
>Alexander Kandzior
>OpenCms Group / Alkacon Software
>
>
>
>
>>-----Original Message-----
>>From: owner-opencms-dev at www.opencms.org
>>[mailto:owner-opencms-dev at www.opencms.org] On Behalf Of Bart Elberg
>>Sent: Friday, October 25, 2002 7:20 PM
>>To: opencms-dev at www.opencms.org
>>Subject: Re: [opencms-dev] Disable lock stealing
>>
>>
>>I have modified the following workplace templates to disable
>>the "Steal
>>Lock" function, but have been unable to get the chances to
>>take effect:
>> explorer_files_contextmenu
>> extended_backoffice
>> explorer_files_new_folder
>> tasks_contextmenu
>>
>>In each of these files, the lines '<contextentry
>>name="explorer.context.overridelock"...' have been removed. The same
>>change made in the template file for my custom Backoffice
>>modules works
>>correctly. I have tried several approaches to get the
>>changes to take
>>effect in the Explorer view:
>> - updated template files in VFS, published, restarted
>>opencms (and
>>tomcat)
>> - copied updated files to
>>.../webapps/opencms/WEB-INF/ocsetup/vfs/..., restarted
>>opencms (and tomcat)
>> - generated a new WAR file, removed opencms application
>>from webapps
>>directory, installed new WAR file in Tomcat
>>
>>None of these approaches seem to work. Am I doing something wrong or
>>are these template files not used to generate the context menus?
>>
>>Configuration:
>> OpenCms 4.6.1
>> Tomcat 4.0.3
>> MySQL
>> Linux
>>
>>Thanks,
>>
>>Bart
>>
>>------------------------
>>Bart Elberg wrote:
>>
>>>Thanks Jorg. That is a good approach for individual content
>>>definitions, but I was hoping to disable it for everything. By
>>>changing the template "Backoffice" I was able to disable
>>>
>>the feature.
>>
>>>I set the "href" attribute on the "overridelock" to an empty string:
>>>
>>><contextmenue name="backofficelock">
>>> <contextdisabled name="button.edit"
>>>href="javascript:location.href=editUrl+'?idedit='+kontextparam;"/>
>>> <contextdisabled name="explorer.context.delete"
>>>
>>href="javascript:location.href=deleteUrl+'?iddelete='+kontextparam;"/>
>>
>>> <contextspacer/>
>>> <contextentry name="explorer.context.overridelock" href=""/>
>>></contextmenue>
>>>
>>>this causes the steal lock function to do nothing.
>>>
>>Unfortunately the
>>
>>>context menu entry still shows up. I will keep digging...
>>>
>>>Bart
>>>
>>>------------
>>>
>>>Jorg Heymans wrote:
>>>
>>>>For some reason my posts to opencms-dev are not forwarded on to the
>>>>newsgroup anymore. The last 5 msg's i sent or so never got there,
>>>>hence this forward to your private adress.
>>>>
>>>>
>>>>======================
>>>>My first idea would be to control this in the getLockState() and
>>>>setLockstate() methods of your ContentDefinitionclass. Ultimately
>>>>these methods get called when the locking state of a
>>>>
>>resource changes
>>
>>>>so you could put some code in there to prevent it I guess.
>>>>
>>>>Regards
>>>>Jorg Heymans
>>>>
>>>>On Wednesday 23 October 2002 18:55, Bart Elberg wrote:
>>>>
>>>>>Is there an easy way to disable lock stealing? Template and code
>>>>>changes are fine if someone can provide some hints.
>>>>>
>>>>>I am using version 4.6.1
>>>>>
>>>>>Thanks
>>>>>
>>>>
>>>>
>>--
>>Bart Elberg
>>Manager of Software Development
>>__________________________________________________
>>I.D.E.A.L. Technology Corporation - Orlando Office
>>
>http://www.idealcorp.com - 407.999.9870 x15
>
>
>
>
>
>
--
Bart Elberg
Manager of Software Development
__________________________________________________
I.D.E.A.L. Technology Corporation - Orlando Office
http://www.idealcorp.com - 407.999.9870 x15
More information about the opencms-dev
mailing list