source: branches/MootoolsFileManager-Update/plugins/MootoolsFileManager/mootools-filemanager/Assets/js/ @ 1302

Last change on this file since 1302 was 1302, checked in by gogo, 10 years ago

Updates to from GerHoblett?

Changes to said updates by gogo (sleemanj @ github)

Modifications to MootoolsFileManager? to work with those updates, some courtesy of GerHoblett?, some sleemanj

GerHoblett? provided a large diff which accomplished the goal in a quite different way. It has merit, however I have opted for a less-affecting path in so far as Xinha's "way" is concerned, namely, not splitting the config for a single plugin into several calls to backend config passing functions which seemed a little cumbersome.

Instead I take the option of using POST to send backend data around, at the minor expense of an extra round trip when displaying thumbnails (for each one). This could be reduced by checking for thumbnail existence and returning the thumbnail name directly in "onView" rather than the backend request to generate said thumbnail.

Still to do, is to make the preview pane thumbnail also work.

File size: 3.5 KB
3Copyright (C) Fabian Vogelsteller []
4published under the GNU General Public License version 3
6This program is free software;
7you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
10This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12See the GNU General Public License for more details.
14You should have received a copy of the GNU General Public License along with this program;
15if not,see <>.
18### AUTHOR
19Fabian Vogelsteller <>
22jsGET is a http GET-Variables clone for javascript, using the hash part of the URL (index.html#...).
23You can set and get variables, and run a listener to hash changes, e.g. when the the history back button gets pressed.
24This allows you to create a usable history navigation in your ajax application. It should work with all A-grade browsers.
30Just include the jsGET.js in your website/webapplication and use the jsGET object with its methods to set, get, remove history hash variables.
31See the demo.html for examples.
33### Properties
34- vars:         (object) the hash variables object loaded by get(), set(), remove(), or clear() or load().
35- vars.current: (object) the current variables.
36- vars.old:     (object) the old variables, before they where changed with set(), remove(), clear(), load() or the browser history back button.
37- vars.changed: (object) the variabels which have changed since the last call of get(), set(), remove(), or clear(), load() or the browser history back button.
39### Methods
40- load():                                 loads the current hash variables into the vars.current property as JSON object.
41- clear():                                clears the hash part of the URL. (because it's not completely possible, it sets it to "#_")
42- get(get):                               (string) try to get a hash variable with the given name.
43- set(set):                               (string,number,object) sets the given parameters to the hash variales. If it's a string it should have the following format: "key=value".
44- remove(remove):                         (string,array) the variable name(s) which should be removed from the hash variables
45- addListener(listener,callAlways,bind):  (listener: function, callAlways: boolean, bind: object instance) creates a listener which calls the given function, when a hash change appears. The called function will get the vars property (vars.current,vars.old,vars.changed) and use the "bind" parameter as "this", when specified.
46The return of the addListener() method is a setInterval ID and must be passed to the removeListener() method to stop the listening.
47When callAlways is FALSE, it only calls when the browser history buttons are pressed and not when get(), set(), remove() or clear() is called.
48- removeListener(listenerID):             (the setInterval Id received from a addListener() method) removes a listener set with the addListener() method.
51Everytime you call set(), remove() or clear() a new hash string will be set,
52that means you also create a new history step in the browser history!
54These are 'special' characters to jsGET and will therefor be encoded when they are part of a key or value:
55  # & =
Note: See TracBrowser for help on using the repository browser.