Thanks Dom for raising the bar through this challenge and given everyone an opportunity to unleash the power of Anguilla Framework.
This is My first entry to the Bookmarklet Challenge - File Details of a Multimedia Component
(And before I submit, I would like to Thanks Robert Curlette and Orlov (UI Beardcore) for their helps directly and indirectly :))
My entry is meant to display the File Name and the File Size of the file uploaded in a Multimedia Component. To Test follow steps below (I will later move it to my blog)The details of the Bookmarklet is here:
Add a BookMark in your browser and Name it - Multimedia Info (or whatever you like)
In the URL field of the Bookmark enter following code:
javascript: (function (p, a, n, k, aj, G) { try { while (aj = p.frames[n++]) { if ((k = aj.$display && aj.$display.getView()) && k.getId() == a) { G = k; break; } } var m1 = window.top.frames[1]; var myitem = G.getMainInterface().getListSelection(); var comp = m1.$models.getItem(myitem.getVersionlessIds()[0]); var mmFileName = window.top.frames[1].$models.getItem(comp.getId()).getMultimediaFilename(); var mmFileSize = window.top.frames[1].$models.getItem(comp.getId()).getMultimediaFileSize(); mmFileSize = mmFileSize/1024; alert("Mutimedia File Name: "+mmFileName+" | Multimedia FileSize: "+mmFileSize.toFixed(2)+" KB");} catch (x) {}; })(window.top, 'DashboardView', 0);
In the Tridion Content Manager Explorer, select a Multimedia Component (In the Right Pane and not in the tree)
Execute this Bookmarklet and you will see the name of the Physical File uploaded into the Multimedia Component along with its Size on the Disk.
Test Result: So far has been successfully tested on Latest Chrome and IE 11 Bookmarklet - File Details