/*
   This JavaScript code was generated by Jemplate, the JavaScript
   Template Toolkit. Any changes made to this file will be lost the next
   time the templates are compiled.

   Copyright 2006-2008 - Ingy döt Net - All rights reserved.
*/

if (typeof(Jemplate) == 'undefined')
    throw('Jemplate.js must be loaded before any Jemplate template files');

Jemplate.templateMap['Components/Elements/Submit.htm'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {
output += '\n<!--// Button Start //-->\n<';
//line 3 "Components/Elements/Submit.htm"
output += stash.get('href') ? 'a' : 'button';
output += ' ';
//line 3 "Components/Elements/Submit.htm"
if (stash.get('id')) {
output += ' id="';
//line 3 "Components/Elements/Submit.htm"
output += stash.get('id');
output += '_text"';
}

output += ' class="x-btn ';
//line 3 "Components/Elements/Submit.htm"
output += stash.get('class');
output += '" ';
//line 3 "Components/Elements/Submit.htm"
if (stash.get('name')) {
output += 'name="';
//line 3 "Components/Elements/Submit.htm"
output += stash.get('name');
output += '"';
}

output += ' ';
//line 3 "Components/Elements/Submit.htm"
if (stash.get('href')) {
output += 'href="';
//line 3 "Components/Elements/Submit.htm"
output += stash.get('href');
output += '"';
}

output += ' ';
//line 3 "Components/Elements/Submit.htm"
if (!(stash.get('href'))) {
output += ' type="';
//line 3 "Components/Elements/Submit.htm"
output += stash.get('type') || 'submit';
output += '" ';
}

output += ' ';
//line 3 "Components/Elements/Submit.htm"
if (stash.get('mousedown')) {
output += 'onmousedown=\'';
//line 3 "Components/Elements/Submit.htm"
output += stash.get('mousedown');
output += '\'';
}

output += ' ';
//line 3 "Components/Elements/Submit.htm"
if (stash.get('onClick')) {
output += 'onclick="';
//line 3 "Components/Elements/Submit.htm"
output += stash.get('onClick');
output += '" ';
}

output += ' ';
//line 3 "Components/Elements/Submit.htm"
if (stash.get('style')) {
output += 'style="';
//line 3 "Components/Elements/Submit.htm"
output += stash.get('style');
output += '"';
}

output += ' >';
//line 3 "Components/Elements/Submit.htm"
output += stash.get('content') || stash.get('text');
output += '</';
//line 3 "Components/Elements/Submit.htm"
output += stash.get('href') ? 'a' : 'button';
output += '>\n<!--// Button End //-->';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

Jemplate.templateMap['FileManager/Details/Object.htm'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {
output += '\n<div id="dynamic_details" class="dynamic_details">\n\n    ';
//line 10 "FileManager/Details/Object.htm"

// CAPTURE
(function() {
        var output = '';
        
// FILTER
output += (function() {
    var output = '';

output += '\n        ';
//line 9 "FileManager/Details/Object.htm"
if (stash.get('teamspaceAdmin')) {
output += '\n            Team Member\n        ';
}
else {
output += '\n            Collaborator\n        ';
}

output += '\n    ';

    return context.filter(output, 'collapse', []);
})();

        stash.set('collaboratorCaption', output);
})();

output += '\n\n	<script type="text/javascript">\n		';
//line 27 "FileManager/Details/Object.htm"
if (stash.get('sharingData')) {
output += '\n			Action.detailsTreeInit({\n				elem: \'shared_with\',\n				nsId: \'';
//line 16 "FileManager/Details/Object.htm"
output += stash.get('sharingId');
output += '\',\n				data: Selection.detailsInfoData().sharingData\n			});\n		';
}
else {
output += '\n			// Initialise if the selection does not change for a second\n			Selection.executeDelayed(function() {\n				Action.detailsTreeInit({\n					elem: \'shared_with\',\n					nsId: \'';
//line 24 "FileManager/Details/Object.htm"
output += stash.get('sharingId');
output += '\'\n				});\n			}, 1000);\n		';
}

output += '\n\n	    ';
//line 35 "FileManager/Details/Object.htm"
if (stash.get('members')) {
output += '		\n			Action.detailsTreeInit({\n				elem: \'members\',\n				nsId: \'';
//line 32 "FileManager/Details/Object.htm"
output += stash.get(['members', 0, 'id', 0]);
output += '\',\n				data: Selection.detailsInfoData().members\n			});\n		';
}

output += '\n		\n		';
//line 54 "FileManager/Details/Object.htm"
if (stash.get(['obj', 0, 'canChangePerms', 0])) {
output += '\n			Action.quickCreateInit({\n				form:     $(\'quick_share\'),\n				input:    $(\'quick_share_input\'),\n				idIn:     $(\'quick_share_entity_id\'),\n				choices:  $(\'quick_share_choices\')';
//line 47 "FileManager/Details/Object.htm"
if (stash.get('teamspaceAdmin')) {
output += ',							\n				onSubmit: function(form) {\n					var collaborator = form.getInputs(\'checkbox\', \'collaborator\').first();\n					var parent       = form.getInputs(\'hidden\', \'parent\').first();\n					parent.value     = collaborator.checked ? \'';
//line 46 "FileManager/Details/Object.htm"
output += stash.get(['members', 0, 'id', 0]);
output += '\' : \'';
//line 46 "FileManager/Details/Object.htm"
output += stash.get('sharingId');
output += '\';\n				}';
}

output += '				\n			});\n			new Tip(\'quick_share_input\', {\n					position:   \'left\',\n					size:       { width:\'300\' },\n					tip_content: $(\'quick_share_tip_content\').innerHTML \n				});\n		';
}

output += '\n	</script>\n';
//line 116 "FileManager/Details/Object.htm"

// FILTER
output += (function() {
    var output = '';

output += '\n    \n	<div id="shared_with_container" class="container">\n    	<span class="title">Shared With</span>\n        <div class="users_scroll">\n            ';
//line 69 "FileManager/Details/Object.htm"
if (stash.get('members')) {
output += '\n                <span id="shared_with_empty"></span>\n            ';
}
else {
output += '\n                <ul id="shared_with_empty" class="FolderTree" style="display:none;">\n                    <li title="Only you have access to this ';
//line 65 "FileManager/Details/Object.htm"
output += stash.get(['obj', 0, 'noun', 0]);
output += ', you can share it with others below.">\n                        This ';
//line 66 "FileManager/Details/Object.htm"
output += stash.get(['obj', 0, 'noun', 0]);
output += ' is private.<br />\n                    </li>\n                </ul>\n            ';
}

output += '\n            ';
//line 72 "FileManager/Details/Object.htm"
if (stash.get('members')) {
output += '\n                <ul id="members" class="FolderTree"></ul>\n            ';
}

output += '\n            <ul id="shared_with" class="FolderTree">\n                <li>Loading...</li>\n            </ul>\n        </div>\n	</div>\n    \n    ';
//line 115 "FileManager/Details/Object.htm"
if (stash.get(['obj', 0, 'canChangePerms', 0])) {
output += '\n      <div id="quick_share_tip_content" style="display: none">\n            ';
//line 87 "FileManager/Details/Object.htm"

// FILTER
output += (function() {
    var output = '';

output += '\n                Enter the e-mail address of a person to share this ';
//line 82 "FileManager/Details/Object.htm"
output += stash.get(['obj', 0, 'noun', 0]);
output += ' with and click Share ';
//line 82 "FileManager/Details/Object.htm"
output += stash.get(['obj', 0, 'noun', 0]);
output += '.\n                \n                ';
//line 86 "FileManager/Details/Object.htm"
if (!(stash.get('viewOnlyPerms'))) {
output += '\n                    If you want them to be able to make changes and additions to this ';
//line 85 "FileManager/Details/Object.htm"
output += stash.get(['obj', 0, 'noun', 0]);
output += ', check the ';
//line 85 "FileManager/Details/Object.htm"
output += stash.get('collaboratorCaption');
output += ' box.\n                ';
}

output += '\n            ';

    return context.filter(output, 'collapse', []);
})();

output += '\n        </div>\n        <div id="quick_share_container" class="container">\n            <span class="title">Quick Share</span>\n            <form id="quick_share" />\n                <input type="hidden" name="parent"    id="quick_share_parent"    value="';
//line 92 "FileManager/Details/Object.htm"
output += stash.get('sharingId');
output += '" />\n                <input type="text"   name="entity"    id="quick_share_input"     value="Enter name or e-mail...">\n                <input type="hidden" name="entity_id" id="quick_share_entity_id" value="" />\n                ';
//line 103 "FileManager/Details/Object.htm"
if (!(stash.get('viewOnlyPerms'))) {
output += '\n                    <span id="quick_share_wrapper">\n                        <input type="checkbox" name="collaborator" id="quick_share_collaborator" value="1" ';
//line 97 "FileManager/Details/Object.htm"
if (stash.get('teamspaceAdmin')) {
output += 'checked="checked"';
}

output += ' />\n                        <label for="quick_share_collaborator">\n                            ';
//line 99 "FileManager/Details/Object.htm"
output += stash.get('collaboratorCaption');
output += '\n                        </label>\n                        <div class="clear"></div>\n                    </span>\n                ';
}

output += '\n                ';
//line 110 "FileManager/Details/Object.htm"

// WRAPPER
output += (function() {
    var output = '';
output += ' \n                    Share ';
//line 109 "FileManager/Details/Object.htm"
output += stash.get(['obj', 0, 'noun', 0]);
output += '\n                ';;
    return context.include('Components/Elements/Submit.htm', { 'id': 'add_share', 'type': 'submit', 'class': 'left', 'content': output });
})();

output += '				\n                <div class="clear"></div>\n            </form>\n            <div id="quick_share_choices" class="autocomplete" style="display: none"></div>\n        </div>\n    ';
}

output += '    \n';

    return context.filter(output, 'collapse', []);
})();

output += '\n</div>\n';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

Jemplate.templateMap['FileManager/Info/DownloadComplete.htm'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {
output += '<div id="info_download_complete" class="info_alert closeable">\n    <div class="icons icon_tick">\n        The selected files were downloaded to your computer successfully. \n    </div>        \n    <div class="clear"></div>\n</div>';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

Jemplate.templateMap['FileManager/Info/UploadComplete.htm'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {
output += '<div id="info_upload_complete" class="info_alert closeable">\n    <div class="icons icon_tick">\n    	';
//line 27 "FileManager/Info/UploadComplete.htm"
if (stash.get(['uploadedTo', 0, 'id', 0]) == stash.get(['cwd', 0, 'id', 0])) {
output += '\n        	';
//line 10 "FileManager/Info/UploadComplete.htm"
if (stash.get('uploadedFiles') > 1) {
output += '\n            	';
//line 5 "FileManager/Info/UploadComplete.htm"
output += stash.get('uploadedFiles');
output += ' items were uploaded to this folder.\n            ';
}
else if (stash.get('fileName')) {
output += '\n                ';
//line 7 "FileManager/Info/UploadComplete.htm"
output += stash.get('fileName');
output += ' was uploaded to this folder.\n            ';
}
else {
output += '\n                An item was uploaded to this folder.\n            ';
}

output += '\n            ';
//line 17 "FileManager/Info/UploadComplete.htm"
if (stash.get('selectedFiles') < stash.get('uploadedFiles') && stash.get(['cwd', 0, 'pages', 0]) > 1) {
output += '\n            	';
//line 16 "FileManager/Info/UploadComplete.htm"
if (stash.get('uploadedFiles') > 1) {
output += '\n            		You may need to use the arrows at the bottom of the screen to locate them.\n				';
}
else {
output += '\n            		Use the arrows at the bottom of the screen to locate it.\n                ';
}

output += '\n            ';
}

output += '        \n        ';
}
else {
output += '\n        	';
//line 19 "FileManager/Info/UploadComplete.htm"

// CAPTURE
(function() {
        var output = '';
        output += '<a href="#';
//line 19 "FileManager/Info/UploadComplete.htm"
output += stash.get(['uploadedTo', 0, 'uri', 0]) || stash.get(['uploadedTo', 0, 'id', 0]);
output += '">';
//line 19 "FileManager/Info/UploadComplete.htm"
output += stash.get(['uploadedTo', 0, 'name', 0]);
output += '</a>';
        stash.set('destination', output);
})();

output += '\n        	';
//line 26 "FileManager/Info/UploadComplete.htm"
if (stash.get('uploadedFiles') > 1) {
output += '\n            	';
//line 21 "FileManager/Info/UploadComplete.htm"
output += stash.get('uploadedFiles');
output += ' items were uploaded to ';
//line 21 "FileManager/Info/UploadComplete.htm"
output += stash.get('destination');
output += '.\n            ';
}
else if (stash.get('fileName')) {
output += '\n                ';
//line 23 "FileManager/Info/UploadComplete.htm"
output += stash.get('fileName');
output += ' was uploaded to ';
//line 23 "FileManager/Info/UploadComplete.htm"
output += stash.get('destination');
output += '.\n            ';
}
else {
output += '\n                An item was uploaded to ';
//line 25 "FileManager/Info/UploadComplete.htm"
output += stash.get('destination');
output += '.\n            ';
}

output += '\n        ';
}

output += '\n    </div>\n        \n    ';
//line 42 "FileManager/Info/UploadComplete.htm"
if (stash.get('clientProductName')) {
output += '\n        <div class="icons icon_client left">\n            ';
//line 34 "FileManager/Info/UploadComplete.htm"

// CAPTURE
(function() {
        var output = '';
        output += '\n                <a href="/Pages/PreSales/WindowsClient.htm" target="_blank">';
//line 33 "FileManager/Info/UploadComplete.htm"
output += stash.get('clientProductName');
output += '</a>\n            ';
        stash.set('clientSoftware', output);
})();

output += '\n            \n            ';
//line 38 "FileManager/Info/UploadComplete.htm"

// CAPTURE
(function() {
        var output = '';
        output += '\n                <a href="/Pages/ClientDownload" target="_top">Download Now</a>\n            ';
        stash.set('downloadNow', output);
})();

output += '\n        \n            <b>Tip:</b> Install ';
//line 40 "FileManager/Info/UploadComplete.htm"
output += stash.get('clientSoftware');
output += ' to have changes to the files on your computer synchronised to your online storage space automatically. ';
//line 40 "FileManager/Info/UploadComplete.htm"
output += stash.get('downloadNow');
output += '            \n        </div>\n    ';
}

output += '	\n    <div class="clear"></div>\n</div>\n';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

