Last active
September 7, 2016 20:47
-
-
Save chrismrgn/1827bf0a5f242922f7e4 to your computer and use it in GitHub Desktop.
Tridion WebDavUrl Bookmarklet Snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (function (UI, B, e, a, r, d) | |
{ | |
try | |
{ | |
while (r = UI.frames[e++]) | |
{ | |
if ((a = r.$display && r.$display.getView()) && a.getId() == B) | |
{ | |
d = a; | |
break; | |
} | |
} | |
var m1 = window.top.frames[0]; | |
var itemId = d.getMainInterface().getListSelection().getVersionlessIds()[0]; | |
var item = m1.$models.getItem(itemId); | |
if(item != undefined){ | |
item.loadWebDavUrl(); | |
setTimeout(function(){ | |
var itemWebDavUrl = item.getWebDavUrl(); | |
alert(itemWebDavUrl); | |
}, 400); | |
} | |
else { | |
alert('Please select an item...'); | |
} | |
} | |
catch (x) {alert('Please select an item...');}; | |
})(window.top, 'DashboardView', 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment