mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
minor changes
This commit is contained in:
parent
033f368d47
commit
32e9428027
2 changed files with 36 additions and 27 deletions
14
client.js
14
client.js
|
|
@ -128,6 +128,18 @@ CloudClient.Cache.clear = (function(){
|
|||
|
||||
/* Object contain additional system functional */
|
||||
CloudClient.Utils = (function(){
|
||||
|
||||
/* Should be used Util version
|
||||
* jquery could be droped out
|
||||
*/
|
||||
this.ajax = function(pParams){
|
||||
$.ajax(pParams);
|
||||
};
|
||||
|
||||
this.bind = function(pFunction, pObject){
|
||||
return pFunction.bind(pObject);
|
||||
};
|
||||
|
||||
/*
|
||||
* Function gets id by src
|
||||
* from http://domain.com/1.js to
|
||||
|
|
@ -1086,7 +1098,7 @@ CloudClient._changeLinks = function(pPanelID){
|
|||
* @path - каталог для чтения
|
||||
* @pNeedRefresh - необходимость обновить данные о каталоге
|
||||
*/
|
||||
CloudClient._ajaxLoad=function(path, pNeedRefresh)
|
||||
CloudClient._ajaxLoad = function(path, pNeedRefresh)
|
||||
{
|
||||
/* Отображаем красивые пути */
|
||||
/* added supporting of russian language */
|
||||
|
|
|
|||
|
|
@ -98,34 +98,31 @@ var CloudCommander, $;
|
|||
* @pParent - this
|
||||
* @pPosition - position of menu
|
||||
*/
|
||||
CloudCommander.Menu.load = (function(pParent, pPosition){
|
||||
return function(){
|
||||
var ljsLoad_f = function(){
|
||||
var lUISrc = pParent.dir + 'jquery.ui.position.js';
|
||||
var lMenuSrc = pParent.dir + 'jquery.contextMenu.js';
|
||||
|
||||
Util.jsload(lUISrc, function(){
|
||||
pParent.jsload(lMenuSrc, pParent.show(pParent, pPosition));
|
||||
});
|
||||
};
|
||||
CloudCommander.Menu.load = (function(pPosition){
|
||||
var ljsLoad_f = function(){
|
||||
var lUISrc = this.dir + 'jquery.ui.position.js';
|
||||
var lMenuSrc = this.dir + 'jquery.contextMenu.js';
|
||||
|
||||
var lSrc = pParent.dir + 'jquery.contextMenu.css';
|
||||
|
||||
pParent.cssLoad({
|
||||
src : lSrc,
|
||||
func : {
|
||||
onload: ljsLoad_f
|
||||
}
|
||||
var lThis = this;
|
||||
Util.jsload(lUISrc, function(){
|
||||
Util.jsload(lMenuSrc, lThis.show(lThis, pPosition));
|
||||
});
|
||||
}();
|
||||
};
|
||||
|
||||
var lSrc = this.dir + 'jquery.contextMenu.css';
|
||||
|
||||
Util.cssLoad({
|
||||
src : lSrc,
|
||||
func : {
|
||||
onload: Util.bind(ljsLoad_f, this)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
CloudCommander.Menu.set = (function(){
|
||||
if(!this.seted){
|
||||
$.contextMenu(this.getConfig());
|
||||
|
||||
var lThis = this;
|
||||
|
||||
|
||||
var lFunc_f = document.onclick;
|
||||
/*
|
||||
* Menu works in some crazy way so need a
|
||||
|
|
@ -163,7 +160,7 @@ var CloudCommander, $;
|
|||
else if(lElement.tagName === 'SPAN')
|
||||
lParent = lElement.parentElement;
|
||||
|
||||
lThis.setCurrentFile(lParent);
|
||||
Util.setCurrentFile(lParent);
|
||||
}
|
||||
|
||||
/* show invisible menu layer */
|
||||
|
|
@ -190,11 +187,11 @@ var CloudCommander, $;
|
|||
/* function shows menu for the first time
|
||||
* right away after loading
|
||||
*/
|
||||
CloudCommander.Menu.show = (function(pParent, pPosition){
|
||||
CloudCommander.Menu.show = (function(pThis, pPosition){
|
||||
return function(){
|
||||
pParent.set();
|
||||
pThis.set();
|
||||
|
||||
pParent.Images.hideLoad();
|
||||
pThis.Images.hideLoad();
|
||||
|
||||
if(pPosition && pPosition.x && pPosition.y)
|
||||
$('li').contextMenu(pPosition);
|
||||
|
|
@ -248,6 +245,6 @@ var CloudCommander, $;
|
|||
CloudCommander.Menu.show();
|
||||
}
|
||||
|
||||
CloudCommander.Menu.load(this, pPosition);
|
||||
CloudCommander.Menu.load(pPosition);
|
||||
});
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue