test js`
This commit is contained in:
parent
f992d0a93e
commit
ae52d0861f
|
@ -29,7 +29,7 @@ Window.prototype = {
|
||||||
onSuccess: function(transport) {
|
onSuccess: function(transport) {
|
||||||
var json = transport.responseText.evalJSON(true);
|
var json = transport.responseText.evalJSON(true);
|
||||||
var liT = new Template("<li><span id='span_#{id}'>+</span> <a href='#' onclick=\" if($('uuid_'+#{id}).getStyle('display')!='none'){$('uuid_'+#{id}).hide();$('span_#{id}').update('+');return false;}; new Ajax.Request('/filelist/sub/', {method: 'get',onSuccess: function(transport){var json = transport.responseText.evalJSON(true);showSubPath(#{id},json);},"
|
var liT = new Template("<li><span id='span_#{id}'>+</span> <a href='#' onclick=\" if($('uuid_'+#{id}).getStyle('display')!='none'){$('uuid_'+#{id}).hide();$('span_#{id}').update('+');return false;}; new Ajax.Request('/filelist/sub/', {method: 'get',onSuccess: function(transport){var json = transport.responseText.evalJSON(true);showSubPath(#{id},json);},"
|
||||||
+"onFailure:function(transport){ alert('There was an error.');}, parameters:'uuid=#{meta_uuid}&subpath='+encodestr(#{file_name})+"'}); return false;\">#{file_name}</a><div id='uuid_#{id}' style='display:none;'></div></li>");
|
+"onFailure:function(transport){ alert('There was an error.');}, parameters:'uuid=#{meta_uuid}&subpath=#{file_name}'}); return false;\">#{file_name}</a><div id='uuid_#{id}' style='display:none;'></div></li>");
|
||||||
var liTemplate = new Template("<li>#{file_name}</li>");
|
var liTemplate = new Template("<li>#{file_name}</li>");
|
||||||
var lis = "";
|
var lis = "";
|
||||||
if(json.length == 0){
|
if(json.length == 0){
|
||||||
|
@ -102,8 +102,12 @@ Window.prototype = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function showSubPath(id,json){
|
function showSubPath(id,json){
|
||||||
var liT = new Template("<li><span id='span_#{id}'>+</span> <a href='#' onclick=\"if($('uuid_'+#{id}).getStyle('display')!='none'){$('uuid_'+#{id}).hide();$('span_#{id}').update('+');return false;}; new Ajax.Request('/filelist/sub/', {method: 'get',onSuccess: function(transport){var json = transport.responseText.evalJSON(true);showSubPath(#{id},json);},"
|
var liT = new Template("<li><span id='span_#{id}'>+</span>
|
||||||
+"onFailure:function(transport){ alert('There was an error.');}, parameters:'uuid=#{meta_uuid}&subpath='+encodestr(#{file_name})+"'}); return false;\">#{file_name}</a><div id='uuid_#{id}' style='display:none;'></div></li>");
|
<a href='#' onclick=\"if($('uuid_'+#{id}).getStyle('display')!='none'){$('uuid_'+#{id}).hide();$('span_#{id}').update('+');return false;};
|
||||||
|
new Ajax.Request('/filelist/sub/', {method: 'get',onSuccess: function(transport){var json = transport.responseText.evalJSON(true);showSubPath(#{id},json);},"
|
||||||
|
+"onFailure:function(transport){ alert('There was an error.');},
|
||||||
|
parameters:'uuid=#{meta_uuid}&subpath="
|
||||||
|
+encodestr(#{file_name})+"'}); return false;\">#{file_name}</a><div id='uuid_#{id}' style='display:none;'></div></li>");
|
||||||
var liTemplate = new Template("<li>#{file_name}</li>");
|
var liTemplate = new Template("<li>#{file_name}</li>");
|
||||||
var lis = "<ol>";
|
var lis = "<ol>";
|
||||||
if(json.length == 0){
|
if(json.length == 0){
|
||||||
|
|
Loading…
Reference in New Issue