Modify the RichMedia.js file in ...\Application Container\Server\Default\Deploy\iw-wcmweb.ear\iw-mediabin.war\ as follows:
Rename the RichMedia.js to RichMedia.original
Take a backup of RichMedia-Debug.js and rename to RichMedia.js
Change this.activeItem = 'collections'; to this.activeItem = 'folders'; (This is in line number: 1293)
Comment line no: 1628 as //pressed: true,
Add this in line no: 1637 as pressed: true,
Restart JBOSS Service
The Folders tab should be the default
Take a backup of RichMedia.js before modifying it.
thanks a lot Ravi. Now folder tab is coming as default.
i think line numbers are bit different in 8.1 , but i was able to locate the correct place to modify
file size of debug file is almost double to normal file. will it be any impact in performance in production if we use debug file?
No, it will not.
You can modify the actual .js file in case if you have any concerns.
Using the debug version will slow the loading of the application. You can "minify" the debug version of the js file and name it as richmedia.js (Google "minify javascript"), or just modify the original minified version.
Please, let us know steps to change folder tab for MediaBin 8.0.3
We have made following changes, but it's not working.
this.activeItem="folders";
Not sure of above line numbers. We see all js content into single line.
You cannot find by line numbers in the RichMedia.js. You can search for the entire string once at a time and modify. Or, use RichMedia-Debug.js, modify the changes, manify the RichMedia-Debug.js and rename to RichMedia.js.
Take a backup of original RichMedia.js before modifying it.
below code may also help. comment pressed=true in collections section and add pressed=true in folders section
,{ ref: 'collectionsBtn', itemId: 'collections', text: iw.i18n('rm.tab.Collections'), iconCls: 'x-nav-collections', //pressed: true, toggleHandler: function (button, state) { this.hideBtn.setDisabled(!state); } }, { ref: 'foldersBtn', itemId: 'folders', text: iw.i18n('rm.tab.Folder'), iconCls: 'x-nav-folders', pressed: true, toggleHandler: function (button, state) { this.hideBtn.setDisabled(!state); } },
Made following changes, it's not working on MediaBin 8.0.3. Also, restarted JBoss server.
{ref : "collectionsBtn",itemId : "collections",text : iw.i18n("rm.tab.Collections"),iconCls : "x-nav-collections",toggleHandler : function(B, C) {this.hideBtn.setDisabled(!C)}}, {ref : "foldersBtn",itemId : "folders",text : iw.i18n("rm.tab.Folder"),iconCls : "x-nav-folders",pressed : true,toggleHandler : function(B, C) {this.hideBtn.setDisabled(!C)}
hope you have also done below change.
this.activeItem = 'folders';
Yes...
initComponent : function() {this.layout = {type : "card",deferredRender : false};this.activeItem = "folders";this.items = [ new iw.rm.CollectionsPanel({itemId : "collections",title : iw.i18n("rm.tab.Collections"),cls : "x-collections-panel"}), new iw.rm.FoldersPanel({
strange. in 8.1 i've done only these changes and worked.
commented this.activeItem = "collections";
and added this.activeItem = "folders"
also, pressed=true is commented for collections section and added for folder sections.
The solution outlined in this thread works for 8.0.3 as well. I also noticed that the change did not take effect after making the changes and restarting JBOSS, I had to clear the browser cache to see the change in action (which makes sense considering its a JS change).
MediaBin 8.0.3 on which version of Windows server?
Eventhough folders page is now displaying as landing page. Only issue is collections tab is being highlighted or focus is on collections tab. I mean, active item is now folders, but active Button/Tab header is still collections.
How can i set that to Folders . Please suggest.
Thanks,
Shravan