diff options
22 files changed, 21 insertions, 795 deletions
| diff --git a/module/webui/themes/dark/css/default.css b/module/webui/themes/dark/css/dark.css index 951c8b136..ca16d0621 100644 --- a/module/webui/themes/dark/css/default.css +++ b/module/webui/themes/dark/css/dark.css @@ -241,12 +241,6 @@ ul#page-actions-more a:hover, ul#page-actions-more a:focus{    display:none;  } -a.action.index { -  background:transparent url(../img/default/wiki-tools-index.png) 0px 1px no-repeat; -} -a.action.recent { -  background:transparent url(../img/default/wiki-tools-recent.png) 0px 1px no-repeat; -}  a.logout {    background:transparent url(../img/default/user-actions-logout.png) 0px 1px no-repeat;  } diff --git a/module/webui/themes/dark/js/render/filemanager.js b/module/webui/themes/dark/js/render/filemanager.js deleted file mode 100644 index f1ebed93f..000000000 --- a/module/webui/themes/dark/js/render/filemanager.js +++ /dev/null @@ -1,291 +0,0 @@ -var load, rename_box, confirm_box; - -document.addEvent("domready", function() { -    load = new Fx.Tween($("load-indicator"), {link: "cancel"}); -    load.set("opacity", 0); - -    rename_box = new Fx.Tween($('rename_box')); -    confirm_box = new Fx.Tween($('confirm_box')); -    $('rename_reset').addEvent('click', function() { -        hide_rename_box() -    }); -    $('delete_reset').addEvent('click', function() { -        hide_confirm_box() -    }); - -    /*$('filemanager_actions_list').getChildren("li").each(function(action) { -      var action_name = action.className; -      if(functions[action.className] != undefined) -      { -	action.addEvent('click', functions[action.className]); -      } -    });*/ -}); - -function indicateLoad() { -    //$("load-indicator").reveal(); -    load.start("opacity", 1) -} - -function indicateFinish() { -    load.start("opacity", 0) -} - -function indicateSuccess() { -    indicateFinish(); -    notify.alert('{{_("Success")}}.', { -             'className': 'success' -    }); -} - -function indicateFail() { -    indicateFinish(); -    notify.alert('{{_("Failed")}}.', { -             'className': 'error' -    }); -} - -function show_rename_box() { -    bg_show(); -    $("rename_box").setStyle('display', 'block'); -    rename_box.start('opacity', 1) -} - -function hide_rename_box() { -    bg_hide(); -    rename_box.start('opacity', 0).chain(function() { -        $('rename_box').setStyle('display', 'none'); -    }); -} - -function show_confirm_box() { -    bg_show(); -    $("confirm_box").setStyle('display', 'block'); -    confirm_box.start('opacity', 1) -} - -function hide_confirm_box() { -    bg_hide(); -    confirm_box.start('opacity', 0).chain(function() { -        $('confirm_box').setStyle('display', 'none'); -    }); -} - -var FilemanagerUI = new Class({ -    initialize: function(url, type) { -        this.url = url; -        this.type = type; -        this.directories = []; -	this.files = []; -        this.parseChildren(); -    }, - -    parseChildren: function() { -        $("directories-list").getChildren("li.folder").each(function(ele) { -            var path = ele.getElements("input.path")[0].get("value"); -            var name = ele.getElements("input.name")[0].get("value"); -            this.directories.push(new Item(this, path, name, ele)) -        }.bind(this)); -	 -	$("directories-list").getChildren("li.file").each(function(ele) { -            var path = ele.getElements("input.path")[0].get("value"); -            var name = ele.getElements("input.name")[0].get("value"); -            this.files.push(new Item(this, path, name, ele)) -        }.bind(this)); -    } -}); - -var Item = new Class({ -    initialize: function(ui, path, name, ele) { -        this.ui = ui; -	this.path = path; -	this.name = name; -        this.ele = ele; -	this.directories = []; -	this.files = []; -	this.actions = new Array(); -	this.actions["delete"] = this.del; -	this.actions["rename"] = this.rename; -	this.actions["mkdir"] = this.mkdir; -        this.parseElement(); - -        var pname = this.ele.getElements("span")[0]; -        this.buttons = new Fx.Tween(this.ele.getElements(".buttons")[0], {link: "cancel"}); -        this.buttons.set("opacity", 0); - -        pname.addEvent("mouseenter", function(e) { -            this.buttons.start("opacity", 1) -        }.bind(this)); - -        pname.addEvent("mouseleave", function(e) { -            this.buttons.start("opacity", 0) -        }.bind(this)); - -    }, - -    parseElement: function() { -        this.ele.getChildren('span span.buttons img').each(function(img) { -	  img.addEvent('click', this.actions[img.className].bind(this)); -	}, this); - -	//click on the directory name must open the directory itself -	this.ele.getElements('b')[0].addEvent('click', this.toggle.bind(this)); -	 -	//iterate over child directories -	var uls = this.ele.getElements('ul'); -	if(uls.length > 0) -	{ -	  uls[0].getChildren("li.folder").each(function(fld) { -	    var path = fld.getElements("input.path")[0].get("value"); -	    var name = fld.getElements("input.name")[0].get("value"); -	    this.directories.push(new Item(this, path, name, fld)); -	  }.bind(this)); -	  uls[0].getChildren("li.file").each(function(fld) { -	    var path = fld.getElements("input.path")[0].get("value"); -	    var name = fld.getElements("input.name")[0].get("value"); -	    this.files.push(new Item(this, path, name, fld)); -	  }.bind(this)); -	} -    }, - -    reorderElements: function() { -      //TODO sort the main ul again (to keep data ordered after renaming something) -    }, - -    del: function(event) { -        $("confirm_form").removeEvents("submit"); -        $("confirm_form").addEvent("submit", this.deleteDirectory.bind(this)); - -	$$("#confirm_form p").set('html', '{{_(("Are you sure you want to delete the selected item?"))}}'); -	 -        show_confirm_box(); -        event.stop(); -    }, - -    deleteDirectory: function(event) { -        hide_confirm_box(); -	new Request.JSON({ -            method: 'POST', -            url: "/json/filemanager/delete", -	    data: {'path': this.path, 'name': this.name}, -            onSuccess: function(data) { -		if(data.response == "success") -		{ -		  new Fx.Tween(this.ele).start('opacity', 0); -		  var ul = this.ele.parentNode; -		  this.ele.dispose(); -		  //if this was the only child, add a "empty folder" div -		  if(!ul.getChildren('li')[0]) -		  { -		    var div = new Element("div", { 'html': '{{ _("Folder is empty") }}' }); -		    div.replaces(ul); -		  } - -		  indicateSuccess(); -		} else -		{ -		  //error from json code... -		  indicateFail(); -		} -            }.bind(this), -            onFailure: indicateFail -        }).send(); -	 -        event.stop(); -    }, - -    rename: function(event) { -        $("rename_form").removeEvents("submit"); -        $("rename_form").addEvent("submit", this.renameDirectory.bind(this)); - -	$("path").set("value", this.path); -        $("old_name").set("value", this.name); -        $("new_name").set("value", this.name); - -        show_rename_box(); -        event.stop(); -    }, - -    renameDirectory: function(event) { -        hide_rename_box(); -	new Request.JSON({ -            method: 'POST', -            url: "/json/filemanager/rename", -            onSuccess: function(data) { -		if(data.response == "success") -		{ -		  this.name = $("new_name").get("value"); -		  this.ele.getElements("b")[0].set('html', $("new_name").get("value")); -		  this.reorderElements(); -		  indicateSuccess(); -		} else -		{ -		  //error from json code... -		  indicateFail(); -		} -            }.bind(this), -            onFailure: indicateFail -        }).send($("rename_form").toQueryString()); -	 -        event.stop(); -    }, - -    mkdir: function(event) { -      new Request.JSON({ -	  method: 'POST', -	  url: "/json/filemanager/mkdir", -	  data: {'path': this.path + "/" + this.name, 'name': '{{_("New folder")}}'}, -	  onSuccess: function(data) { -	      if(data.response == "success") -	      { -		new Request.HTML({ -		    method: 'POST', -		    url: "/filemanager/get_dir", -		    data: {'path': data.path, 'name': data.name}, -		    onSuccess: function(li) { -			//add node as first child of ul -			var ul = this.ele.getChildren('ul')[0]; -			if(!ul) -			{ -			  //remove the "Folder Empty" div -			  this.ele.getChildren('div').dispose(); - -			  //create new ul to contain subfolder -			  ul = new Element("ul"); -			  ul.inject(this.ele, 'bottom'); -			} -			li[0].inject(ul, 'top'); -			 -			//add directory as a subdirectory of the current item -			this.directories.push(new Item(this.ui, data.path, data.name, ul.firstChild)); -		    }.bind(this), -		    onFailure: indicateFail -		}).send(); -		indicateSuccess(); -	      } else -	      { -		//error from json code... -		indicateFail(); -	      } -	  }.bind(this), -	  onFailure: indicateFail -      }).send(); - -      event.stop(); -    }, - -    toggle: function() { -        var child = this.ele.getElement('ul'); -	if(child == null) -	  child = this.ele.getElement('div'); -	 -	if(child != null) -	{ -	  if (child.getStyle('display') == "block") { -	      child.dissolve(); -	  } else { -	      child.reveal(); -	  } -	} -    } -}); diff --git a/module/webui/themes/dark/tml/admin.html b/module/webui/themes/dark/tml/admin.html index 1bbfad5c4..42118eda4 100644 --- a/module/webui/themes/dark/tml/admin.html +++ b/module/webui/themes/dark/tml/admin.html @@ -15,7 +15,7 @@      <br>      <br> -    {{ _("To add user or change passwords use:") }} <b>python pyLoadCore.py -u</b><br> +    {{ _("To add user or change passwords use:") }} <b>python pyload.py -u</b><br>      {{ _("Important: Admin user have always all permissions!") }}      <form action="" method="POST"> diff --git a/module/webui/themes/dark/tml/base.html b/module/webui/themes/dark/tml/base.html index a832dc79f..e7179acfa 100644 --- a/module/webui/themes/dark/tml/base.html +++ b/module/webui/themes/dark/tml/base.html @@ -5,7 +5,7 @@  <head>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> -<link rel="stylesheet" type="text/css" href="/dark/css/default.min.css"/> +<link rel="stylesheet" type="text/css" href="/dark/css/dark.min.css"/>  <link rel="stylesheet" type="text/css" href="/dark/css/window.min.css"/>  <link rel="stylesheet" type="text/css" href="/dark/css/MooDialog.min.css"/> @@ -92,14 +92,11 @@      <li {{ selected('downloads') }}>          <a href="/downloads/" title=""><img src="/dark/img/default/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>      </li> -{#    <li {{ selected('filemanager') }}>#} -{#        <a href="/filemanager/" title=""><img src="/dark/img/default/head-menu-download.png" alt="" /> {{_("FileManager")}}</a>#} -{#    </li>#}      <li {{ selected('logs', True) }}> -        <a href="/logs/"  class="action index" accesskey="x" rel="nofollow"><img src="/dark/img/default/head-menu-index.png" alt="" />{{_("Logs")}}</a> +        <a href="/logs/"  title=""><img src="/dark/img/default/head-menu-index.png" alt="" />{{_("Logs")}}</a>      </li>      <li {{ selected('settings', True) }}> -        <a href="/settings/"  class="action index" accesskey="x" rel="nofollow"><img src="/dark/img/default/head-menu-config.png" alt="" />{{_("Config")}}</a> +        <a href="/settings/"  title=""><img src="/dark/img/default/head-menu-config.png" alt="" />{{_("Config")}}</a>      </li>      {% endblock %} diff --git a/module/webui/themes/dark/tml/filemanager.html b/module/webui/themes/dark/tml/filemanager.html deleted file mode 100644 index 21e45ff62..000000000 --- a/module/webui/themes/dark/tml/filemanager.html +++ /dev/null @@ -1,78 +0,0 @@ -{% extends '/dark/tml/base.html' %} - -{% block head %} - -<script type="text/javascript" src="/dark/js/render/filemanager.min.js"></script> - -<script type="text/javascript"> - -document.addEvent("domready", function(){ -    var fmUI = new FilemanagerUI("url",1); -}); -</script> -{% endblock %} - -{% block title %}Downloads - {{super()}} {% endblock %} - - -{% block subtitle %} -{{_("FileManager")}} -{% endblock %} - -{% macro display_file(file) %} -  <li class="file"> -    <input type="hidden" name="path" class="path" value="{{ file.path }}" /> -    <input type="hidden" name="name" class="name" value="{{ file.name }}" /> -    <span> -      <b>{{ file.name }}</b> -      <span class="buttons" style="opacity:0"> -      <img title="{{_("Rename Directory")}}" class="rename" style="cursor: pointer" height="12px" src="/dark/img/default/pencil.png" /> -         -      <img title="{{_("Delete Directory")}}" class="delete" style="margin-left: -10px; cursor: pointer" width="12px" height="12px" src="/dark/img/default/delete.png" /> -      </span> -    </span> -  </li> -{%- endmacro %} - -{% macro display_folder(fld, open = false) -%} -    <li class="folder"> -      <input type="hidden" name="path" class="path" value="{{ fld.path }}" /> -      <input type="hidden" name="name" class="name" value="{{ fld.name }}" /> -      <span> -  <b>{{ fld.name }}</b> -  <span class="buttons" style="opacity:0"> -        <img title="{{_("Rename Directory")}}" class="rename" style="cursor: pointer" height="12px" src="/dark/img/default/pencil.png" /> -           -        <img title="{{_("Delete Directory")}}" class="delete" style="margin-left: -10px; cursor: pointer" width="12px" height="12px" src="/dark/img/default/delete.png" /> -           -        <img title="{{_("Add subdirectory")}}" class="mkdir" style="margin-left: -10px; cursor: pointer" width="12px" height="12px" src="/dark/img/default/add_folder.png" /> -  </span> -      </span> -      {% if (fld.folders|length + fld.files|length) > 0 %} -  {% if open %} -    <ul> -  {% else %} -    <ul style="display:none"> -  {% endif %} -    {% for child in fld.folders %} -        {{ display_folder(child) }} -    {% endfor %} -    {% for child in fld.files %} -        {{ display_file(child) }} -    {% endfor %} -  </ul> -      {% else %} -  <div style="display:none">{{ _("Folder is empty") }}</div> -      {% endif %} -    </li> -{%- endmacro %} - -{% block content %} - -<div style="clear:both"><!-- --></div> - -<ul id="directories-list"> -{{ display_folder(root, true) }} -</ul> - -{% endblock %} diff --git a/module/webui/themes/dark/tml/home.html b/module/webui/themes/dark/tml/home.html index 2314d0def..b350b705e 100644 --- a/module/webui/themes/dark/tml/home.html +++ b/module/webui/themes/dark/tml/home.html @@ -219,14 +219,11 @@ var LinkEntry = new Class({  <li>      <a href="/downloads/" title=""><img src="/dark/img/default/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>  </li> -{#<li>#} -{#    <a href="/filemanager/" title=""><img src="/dark/img/default/head-menu-download.png" alt="" /> {{_("FileManager")}}</a>#} -{#</li>#}  <li class="right"> -    <a href="/logs/"  class="action index" accesskey="x" rel="nofollow"><img src="/dark/img/default/head-menu-index.png" alt="" />{{_("Logs")}}</a> +    <a href="/logs/"  title=""><img src="/dark/img/default/head-menu-index.png" alt="" />{{_("Logs")}}</a>  </li>  <li class="right"> -    <a href="/settings/"  class="action index" accesskey="x" rel="nofollow"><img src="/dark/img/default/head-menu-config.png" alt="" />{{_("Config")}}</a> +    <a href="/settings/"  title=""><img src="/dark/img/default/head-menu-config.png" alt="" />{{_("Config")}}</a>  </li>  {% endblock %} diff --git a/module/webui/themes/default/css/default.css b/module/webui/themes/default/css/default.css index 1843e2391..5d4b9ebf2 100644 --- a/module/webui/themes/default/css/default.css +++ b/module/webui/themes/default/css/default.css @@ -239,12 +239,6 @@ ul#page-actions-more a:hover, ul#page-actions-more a:focus{    display:none;  } -a.action.index { -  background:transparent url(../img/wiki-tools-index.png) 0px 1px no-repeat; -} -a.action.recent { -  background:transparent url(../img/wiki-tools-recent.png) 0px 1px no-repeat; -}  a.logout {    background:transparent url(../img/user-actions-logout.png) 0px 1px no-repeat;  } diff --git a/module/webui/themes/default/tml/admin.html b/module/webui/themes/default/tml/admin.html index c165f2a98..ba94f7a74 100644 --- a/module/webui/themes/default/tml/admin.html +++ b/module/webui/themes/default/tml/admin.html @@ -15,7 +15,7 @@      <br>      <br> -    {{ _("To add user or change passwords use:") }} <b>python pyLoadCore.py -u</b><br> +    {{ _("To add user or change passwords use:") }} <b>python pyload.py -u</b><br>      {{ _("Important: Admin user have always all permissions!") }}      <form action="" method="POST"> diff --git a/module/webui/themes/default/tml/base.html b/module/webui/themes/default/tml/base.html index dfc311e47..e2a62a116 100644 --- a/module/webui/themes/default/tml/base.html +++ b/module/webui/themes/default/tml/base.html @@ -96,10 +96,10 @@  {#        <a href="/filemanager/" title=""><img src="/default/img/head-menu-download.png" alt="" /> {{_("FileManager")}}</a>#}  {#    </li>#}      <li {{ selected('logs', True) }}> -        <a href="/logs/"  class="action index" accesskey="x" rel="nofollow"><img src="/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a> +        <a href="/logs/"  title=""><img src="/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>      </li>      <li {{ selected('settings', True) }}> -        <a href="/settings/"  class="action index" accesskey="x" rel="nofollow"><img src="/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a> +        <a href="/settings/"  title=""><img src="/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a>      </li>      {% endblock %} diff --git a/module/webui/themes/default/tml/home.html b/module/webui/themes/default/tml/home.html index 85f1bd05e..0fff703b5 100644 --- a/module/webui/themes/default/tml/home.html +++ b/module/webui/themes/default/tml/home.html @@ -223,10 +223,10 @@ var LinkEntry = new Class({  {#    <a href="/filemanager/" title=""><img src="/default/img/head-menu-download.png" alt="" /> {{_("FileManager")}}</a>#}  {#</li>#}  <li class="right"> -    <a href="/logs/"  class="action index" accesskey="x" rel="nofollow"><img src="/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a> +    <a href="/logs/"  title=""><img src="/default/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>  </li>  <li class="right"> -    <a href="/settings/"  class="action index" accesskey="x" rel="nofollow"><img src="/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a> +    <a href="/settings/"  title=""><img src="/default/img/head-menu-config.png" alt="" />{{_("Config")}}</a>  </li>  {% endblock %} diff --git a/module/webui/themes/default/tml/login.html b/module/webui/themes/default/tml/login.html index d11941bb7..089275219 100644 --- a/module/webui/themes/default/tml/login.html +++ b/module/webui/themes/default/tml/login.html @@ -27,7 +27,7 @@  {% if errors %}  <p>{{_("Your username and password didn't match. Please try again.")}}</p> -  {{ _("To reset your login data or add an user run:") }} <b> python pyLoadCore.py -u</b> +  {{ _("To reset your login data or add an user run:") }} <b> python pyload.py -u</b>  {% endif %}  </div> diff --git a/module/webui/themes/flat/css/MooDialog.css b/module/webui/themes/flat/css/MooDialog.css index 347c45fc3..3ba94cafd 100644 --- a/module/webui/themes/flat/css/MooDialog.css +++ b/module/webui/themes/flat/css/MooDialog.css @@ -12,7 +12,7 @@  	left: 50%;  	z-index: 50000; -	background: #C0C0C0; +	background: #CDCDCD;  	color: black;  } diff --git a/module/webui/themes/flat/css/default.css b/module/webui/themes/flat/css/flat.css index 6305a79be..1a542962f 100644 --- a/module/webui/themes/flat/css/default.css +++ b/module/webui/themes/flat/css/flat.css @@ -225,18 +225,6 @@ ul#page-actions2 a:hover, ul#page-actions2 a:focus, ul#user-actions2 a:hover, ul  .hidden {    display:none;  } -a.action.index { -  background-color:transparent; -  background-image:url(../img/wiki-tools-index.png); -  background-position:0 1px; -  background-repeat:no-repeat no-repeat; -} -a.action.recent { -  background-color:transparent; -  background-image:url(../img/wiki-tools-recent.png); -  background-position:0 1px; -  background-repeat:no-repeat no-repeat; -}  a.logout {    background-color:transparent;    background-image:url(../img/user-actions-logout.png); diff --git a/module/webui/themes/flat/css/window.css b/module/webui/themes/flat/css/window.css index 2bde6dee5..12829868b 100644 --- a/module/webui/themes/flat/css/window.css +++ b/module/webui/themes/flat/css/window.css @@ -58,7 +58,7 @@      margin-left:150px;      width:125px;      height:31px; -    background:#666666 url(../img/default/button.png) no-repeat; +    background:#666666 url(../img/button.png) no-repeat;      text-align:center;      line-height:31px;      color:#FFFFFF; diff --git a/module/webui/themes/flat/img/button.png b/module/webui/themes/flat/img/button.pngBinary files differ new file mode 100644 index 000000000..bb408a7d6 --- /dev/null +++ b/module/webui/themes/flat/img/button.png diff --git a/module/webui/themes/flat/img/default/button.png b/module/webui/themes/flat/img/default/button.pngBinary files differ deleted file mode 100644 index 890160614..000000000 --- a/module/webui/themes/flat/img/default/button.png +++ /dev/null diff --git a/module/webui/themes/flat/js/render/filemanager.js b/module/webui/themes/flat/js/render/filemanager.js deleted file mode 100644 index f1ebed93f..000000000 --- a/module/webui/themes/flat/js/render/filemanager.js +++ /dev/null @@ -1,291 +0,0 @@ -var load, rename_box, confirm_box; - -document.addEvent("domready", function() { -    load = new Fx.Tween($("load-indicator"), {link: "cancel"}); -    load.set("opacity", 0); - -    rename_box = new Fx.Tween($('rename_box')); -    confirm_box = new Fx.Tween($('confirm_box')); -    $('rename_reset').addEvent('click', function() { -        hide_rename_box() -    }); -    $('delete_reset').addEvent('click', function() { -        hide_confirm_box() -    }); - -    /*$('filemanager_actions_list').getChildren("li").each(function(action) { -      var action_name = action.className; -      if(functions[action.className] != undefined) -      { -	action.addEvent('click', functions[action.className]); -      } -    });*/ -}); - -function indicateLoad() { -    //$("load-indicator").reveal(); -    load.start("opacity", 1) -} - -function indicateFinish() { -    load.start("opacity", 0) -} - -function indicateSuccess() { -    indicateFinish(); -    notify.alert('{{_("Success")}}.', { -             'className': 'success' -    }); -} - -function indicateFail() { -    indicateFinish(); -    notify.alert('{{_("Failed")}}.', { -             'className': 'error' -    }); -} - -function show_rename_box() { -    bg_show(); -    $("rename_box").setStyle('display', 'block'); -    rename_box.start('opacity', 1) -} - -function hide_rename_box() { -    bg_hide(); -    rename_box.start('opacity', 0).chain(function() { -        $('rename_box').setStyle('display', 'none'); -    }); -} - -function show_confirm_box() { -    bg_show(); -    $("confirm_box").setStyle('display', 'block'); -    confirm_box.start('opacity', 1) -} - -function hide_confirm_box() { -    bg_hide(); -    confirm_box.start('opacity', 0).chain(function() { -        $('confirm_box').setStyle('display', 'none'); -    }); -} - -var FilemanagerUI = new Class({ -    initialize: function(url, type) { -        this.url = url; -        this.type = type; -        this.directories = []; -	this.files = []; -        this.parseChildren(); -    }, - -    parseChildren: function() { -        $("directories-list").getChildren("li.folder").each(function(ele) { -            var path = ele.getElements("input.path")[0].get("value"); -            var name = ele.getElements("input.name")[0].get("value"); -            this.directories.push(new Item(this, path, name, ele)) -        }.bind(this)); -	 -	$("directories-list").getChildren("li.file").each(function(ele) { -            var path = ele.getElements("input.path")[0].get("value"); -            var name = ele.getElements("input.name")[0].get("value"); -            this.files.push(new Item(this, path, name, ele)) -        }.bind(this)); -    } -}); - -var Item = new Class({ -    initialize: function(ui, path, name, ele) { -        this.ui = ui; -	this.path = path; -	this.name = name; -        this.ele = ele; -	this.directories = []; -	this.files = []; -	this.actions = new Array(); -	this.actions["delete"] = this.del; -	this.actions["rename"] = this.rename; -	this.actions["mkdir"] = this.mkdir; -        this.parseElement(); - -        var pname = this.ele.getElements("span")[0]; -        this.buttons = new Fx.Tween(this.ele.getElements(".buttons")[0], {link: "cancel"}); -        this.buttons.set("opacity", 0); - -        pname.addEvent("mouseenter", function(e) { -            this.buttons.start("opacity", 1) -        }.bind(this)); - -        pname.addEvent("mouseleave", function(e) { -            this.buttons.start("opacity", 0) -        }.bind(this)); - -    }, - -    parseElement: function() { -        this.ele.getChildren('span span.buttons img').each(function(img) { -	  img.addEvent('click', this.actions[img.className].bind(this)); -	}, this); - -	//click on the directory name must open the directory itself -	this.ele.getElements('b')[0].addEvent('click', this.toggle.bind(this)); -	 -	//iterate over child directories -	var uls = this.ele.getElements('ul'); -	if(uls.length > 0) -	{ -	  uls[0].getChildren("li.folder").each(function(fld) { -	    var path = fld.getElements("input.path")[0].get("value"); -	    var name = fld.getElements("input.name")[0].get("value"); -	    this.directories.push(new Item(this, path, name, fld)); -	  }.bind(this)); -	  uls[0].getChildren("li.file").each(function(fld) { -	    var path = fld.getElements("input.path")[0].get("value"); -	    var name = fld.getElements("input.name")[0].get("value"); -	    this.files.push(new Item(this, path, name, fld)); -	  }.bind(this)); -	} -    }, - -    reorderElements: function() { -      //TODO sort the main ul again (to keep data ordered after renaming something) -    }, - -    del: function(event) { -        $("confirm_form").removeEvents("submit"); -        $("confirm_form").addEvent("submit", this.deleteDirectory.bind(this)); - -	$$("#confirm_form p").set('html', '{{_(("Are you sure you want to delete the selected item?"))}}'); -	 -        show_confirm_box(); -        event.stop(); -    }, - -    deleteDirectory: function(event) { -        hide_confirm_box(); -	new Request.JSON({ -            method: 'POST', -            url: "/json/filemanager/delete", -	    data: {'path': this.path, 'name': this.name}, -            onSuccess: function(data) { -		if(data.response == "success") -		{ -		  new Fx.Tween(this.ele).start('opacity', 0); -		  var ul = this.ele.parentNode; -		  this.ele.dispose(); -		  //if this was the only child, add a "empty folder" div -		  if(!ul.getChildren('li')[0]) -		  { -		    var div = new Element("div", { 'html': '{{ _("Folder is empty") }}' }); -		    div.replaces(ul); -		  } - -		  indicateSuccess(); -		} else -		{ -		  //error from json code... -		  indicateFail(); -		} -            }.bind(this), -            onFailure: indicateFail -        }).send(); -	 -        event.stop(); -    }, - -    rename: function(event) { -        $("rename_form").removeEvents("submit"); -        $("rename_form").addEvent("submit", this.renameDirectory.bind(this)); - -	$("path").set("value", this.path); -        $("old_name").set("value", this.name); -        $("new_name").set("value", this.name); - -        show_rename_box(); -        event.stop(); -    }, - -    renameDirectory: function(event) { -        hide_rename_box(); -	new Request.JSON({ -            method: 'POST', -            url: "/json/filemanager/rename", -            onSuccess: function(data) { -		if(data.response == "success") -		{ -		  this.name = $("new_name").get("value"); -		  this.ele.getElements("b")[0].set('html', $("new_name").get("value")); -		  this.reorderElements(); -		  indicateSuccess(); -		} else -		{ -		  //error from json code... -		  indicateFail(); -		} -            }.bind(this), -            onFailure: indicateFail -        }).send($("rename_form").toQueryString()); -	 -        event.stop(); -    }, - -    mkdir: function(event) { -      new Request.JSON({ -	  method: 'POST', -	  url: "/json/filemanager/mkdir", -	  data: {'path': this.path + "/" + this.name, 'name': '{{_("New folder")}}'}, -	  onSuccess: function(data) { -	      if(data.response == "success") -	      { -		new Request.HTML({ -		    method: 'POST', -		    url: "/filemanager/get_dir", -		    data: {'path': data.path, 'name': data.name}, -		    onSuccess: function(li) { -			//add node as first child of ul -			var ul = this.ele.getChildren('ul')[0]; -			if(!ul) -			{ -			  //remove the "Folder Empty" div -			  this.ele.getChildren('div').dispose(); - -			  //create new ul to contain subfolder -			  ul = new Element("ul"); -			  ul.inject(this.ele, 'bottom'); -			} -			li[0].inject(ul, 'top'); -			 -			//add directory as a subdirectory of the current item -			this.directories.push(new Item(this.ui, data.path, data.name, ul.firstChild)); -		    }.bind(this), -		    onFailure: indicateFail -		}).send(); -		indicateSuccess(); -	      } else -	      { -		//error from json code... -		indicateFail(); -	      } -	  }.bind(this), -	  onFailure: indicateFail -      }).send(); - -      event.stop(); -    }, - -    toggle: function() { -        var child = this.ele.getElement('ul'); -	if(child == null) -	  child = this.ele.getElement('div'); -	 -	if(child != null) -	{ -	  if (child.getStyle('display') == "block") { -	      child.dissolve(); -	  } else { -	      child.reveal(); -	  } -	} -    } -}); diff --git a/module/webui/themes/flat/tml/admin.html b/module/webui/themes/flat/tml/admin.html index 855a2a627..c7bdd7894 100644 --- a/module/webui/themes/flat/tml/admin.html +++ b/module/webui/themes/flat/tml/admin.html @@ -15,7 +15,7 @@      <br>      <br> -    {{ _("To add user or change passwords use:") }} <b>python pyLoadCore.py -u</b><br> +    {{ _("To add user or change passwords use:") }} <b>python pyload.py -u</b><br>      {{ _("Important: Admin user have always all permissions!") }}      <form action="" method="POST"> diff --git a/module/webui/themes/flat/tml/base.html b/module/webui/themes/flat/tml/base.html index 18a380463..17349c5f1 100644 --- a/module/webui/themes/flat/tml/base.html +++ b/module/webui/themes/flat/tml/base.html @@ -5,7 +5,7 @@  <head>  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> -<link rel="stylesheet" type="text/css" href="/flat/css/default.min.css"/> +<link rel="stylesheet" type="text/css" href="/flat/css/flat.min.css"/>  <link rel="stylesheet" type="text/css" href="/flat/css/window.min.css"/>  <link rel="stylesheet" type="text/css" href="/flat/css/MooDialog.min.css"/> @@ -92,14 +92,11 @@      <li {{ selected('downloads') }}>          <a href="/downloads/" title=""><img src="/flat/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>      </li> -{#    <li {{ selected('filemanager') }}>#} -{#        <a href="/filemanager/" title=""><img src="/flat/img/head-menu-download.png" alt="" /> {{_("FileManager")}}</a>#} -{#    </li>#}      <li {{ selected('logs', True) }}> -        <a href="/logs/"  class="action index" accesskey="x" rel="nofollow"><img src="/flat/img/head-menu-index.png" alt="" />{{_("Logs")}}</a> +        <a href="/logs/"  title=""><img src="/flat/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>      </li>      <li {{ selected('settings', True) }}> -        <a href="/settings/"  class="action index" accesskey="x" rel="nofollow"><img src="/flat/img/head-menu-config.png" alt="" />{{_("Config")}}</a> +        <a href="/settings/"  title=""><img src="/flat/img/head-menu-config.png" alt="" />{{_("Config")}}</a>      </li>      {% endblock %} diff --git a/module/webui/themes/flat/tml/filemanager.html b/module/webui/themes/flat/tml/filemanager.html deleted file mode 100644 index 9c49e6dba..000000000 --- a/module/webui/themes/flat/tml/filemanager.html +++ /dev/null @@ -1,78 +0,0 @@ -{% extends '/flat/tml/base.html' %} - -{% block head %} - -<script type="text/javascript" src="/flat/js/render/filemanager.min.js"></script> - -<script type="text/javascript"> - -document.addEvent("domready", function(){ -    var fmUI = new FilemanagerUI("url",1); -}); -</script> -{% endblock %} - -{% block title %}Downloads - {{super()}} {% endblock %} - - -{% block subtitle %} -{{_("FileManager")}} -{% endblock %} - -{% macro display_file(file) %} -  <li class="file"> -    <input type="hidden" name="path" class="path" value="{{ file.path }}" /> -    <input type="hidden" name="name" class="name" value="{{ file.name }}" /> -    <span> -      <b>{{ file.name }}</b> -      <span class="buttons" style="opacity:0"> -      <img title="{{_("Rename Directory")}}" class="rename" style="cursor: pointer" height="12px" src="/flat/img/pencil.png" /> -         -      <img title="{{_("Delete Directory")}}" class="delete" style="margin-left: -10px; cursor: pointer" width="12px" height="12px" src="/flat/img/delete.png" /> -      </span> -    </span> -  </li> -{%- endmacro %} - -{% macro display_folder(fld, open = false) -%} -    <li class="folder"> -      <input type="hidden" name="path" class="path" value="{{ fld.path }}" /> -      <input type="hidden" name="name" class="name" value="{{ fld.name }}" /> -      <span> -  <b>{{ fld.name }}</b> -  <span class="buttons" style="opacity:0"> -        <img title="{{_("Rename Directory")}}" class="rename" style="cursor: pointer" height="12px" src="/flat/img/pencil.png" /> -           -        <img title="{{_("Delete Directory")}}" class="delete" style="margin-left: -10px; cursor: pointer" width="12px" height="12px" src="/flat/img/delete.png" /> -           -        <img title="{{_("Add subdirectory")}}" class="mkdir" style="margin-left: -10px; cursor: pointer" width="12px" height="12px" src="/flat/img/default/add_folder.png" /> -  </span> -      </span> -      {% if (fld.folders|length + fld.files|length) > 0 %} -  {% if open %} -    <ul> -  {% else %} -    <ul style="display:none"> -  {% endif %} -    {% for child in fld.folders %} -        {{ display_folder(child) }} -    {% endfor %} -    {% for child in fld.files %} -        {{ display_file(child) }} -    {% endfor %} -  </ul> -      {% else %} -  <div style="display:none">{{ _("Folder is empty") }}</div> -      {% endif %} -    </li> -{%- endmacro %} - -{% block content %} - -<div style="clear:both"><!-- --></div> - -<ul id="directories-list"> -{{ display_folder(root, true) }} -</ul> - -{% endblock %} diff --git a/module/webui/themes/flat/tml/home.html b/module/webui/themes/flat/tml/home.html index 052e0daca..838a351ad 100644 --- a/module/webui/themes/flat/tml/home.html +++ b/module/webui/themes/flat/tml/home.html @@ -219,14 +219,11 @@ var LinkEntry = new Class({  <li>      <a href="/downloads/" title=""><img src="/flat/img/head-menu-development.png" alt="" /> {{_("Downloads")}}</a>  </li> -{#<li>#} -{#    <a href="/filemanager/" title=""><img src="/flat/img/head-menu-download.png" alt="" /> {{_("FileManager")}}</a>#} -{#</li>#}  <li class="right"> -    <a href="/logs/"  class="action index" accesskey="x" rel="nofollow"><img src="/flat/img/head-menu-index.png" alt="" />{{_("Logs")}}</a> +    <a href="/logs/"  title=""><img src="/flat/img/head-menu-index.png" alt="" />{{_("Logs")}}</a>  </li>  <li class="right"> -    <a href="/settings/"  class="action index" accesskey="x" rel="nofollow"><img src="/flat/img/head-menu-config.png" alt="" />{{_("Config")}}</a> +    <a href="/settings/"  title=""><img src="/flat/img/head-menu-config.png" alt="" />{{_("Config")}}</a>  </li>  {% endblock %} diff --git a/module/webui/themes/flat/tml/login.html b/module/webui/themes/flat/tml/login.html index a7ef3c7c4..76365a79c 100644 --- a/module/webui/themes/flat/tml/login.html +++ b/module/webui/themes/flat/tml/login.html @@ -27,7 +27,7 @@  {% if errors %}  <p>{{_("Your username and password didn't match. Please try again.")}}</p> -  {{ _("To reset your login data or add an user run:") }} <b> python pyLoadCore.py -u</b> +  {{ _("To reset your login data or add an user run:") }} <b> python pyload.py -u</b>  {% endif %}  </div> | 
