diff --git a/ChangeLog b/ChangeLog
index c241903b..ca88af7f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -141,6 +141,11 @@ directory.
* Fixed bug with setting current file
after refresh and refreshing dir content.
+* Removed part of url thet says that js is disabled, from
+now json data of file structure would be getted from
+click event with ?json flag. "no-js" part of url
+would not be supported anymore.
+
2012.12.12, Version 0.1.8
diff --git a/cloudcmd.js b/cloudcmd.js
index b1830c86..a32ea050 100644
--- a/cloudcmd.js
+++ b/cloudcmd.js
@@ -192,8 +192,8 @@
lRet = main.sendFile( pParams );
}
else if( Util.isContainStr(p.name, FS) || Util.strCmp( p.name, '/') ){
- //if( !main.getQuery(p.request) )
- //p.request.url += '?html';
+ if( !main.getQuery(p.request) )
+ p.request.url += '?html';
var lName = Minify.allowed.html ?
Minify.getName(INDEX) : INDEX;
diff --git a/lib/client.js b/lib/client.js
index f9682906..dd944682 100644
--- a/lib/client.js
+++ b/lib/client.js
@@ -85,6 +85,8 @@ CloudCmd._loadDir = function(pLink, pNeedRefresh){
lLink = pLink || Util.removeStr(lHref, CloudCmd.HOST),
lDir = DOM.getCurrentDir();
+ lLink += '?json';
+
if(lLink || lCurrentLink.target !== '_blank'){
DOM.Images.showLoad(pNeedRefresh ? {top:true} : null);
@@ -410,11 +412,6 @@ CloudCmd._changeLinks = function(pPanelID){
/* номер ссылки иконки обновления страницы */
lREFRESHICON = 0,
- /* путь в ссылке, который говорит
- * что js отключен
- */
- lNoJS_s = CloudFunc.NOJS,
-
/* right mouse click function varible */
lOnContextMenu_f = function(pEvent){
var lReturn_b = true;
@@ -453,10 +450,8 @@ CloudCmd._changeLinks = function(pPanelID){
/* if it's directory - adding json extension */
lType = lElement.parentElement.nextSibling;
- if(lType && lType.textContent === '
'){
- lLink = Util.removeStr(lLink, lNoJS_s);
+ if(lType && lType.textContent === '')
lName += '.json';
- }
pEvent.dataTransfer.setData("DownloadURL",
'application/octet-stream' + ':' +
@@ -536,7 +531,8 @@ CloudCmd._ajaxLoad = function(pPath, pOptions){
var lFSPath = decodeURI(pPath);
lFSPath = Util.removeStr( lFSPath, CloudFunc.NOJS );
- var lCleanPath = Util.removeStr(lFSPath, CloudFunc.FS) || '/';
+ pPath = Util.removeStr( lFSPath, '?json' );
+ var lCleanPath = Util.removeStr( pPath, CloudFunc.FS ) || '/';
Util.log ('reading dir: "' + lCleanPath + '";');
diff --git a/lib/client/dom.js b/lib/client/dom.js
index d889539f..58c06507 100644
--- a/lib/client/dom.js
+++ b/lib/client/dom.js
@@ -1067,9 +1067,8 @@ var CloudCommander, Util,
lPath = DOM.getCurrentLink( lCurrent ).href;
/* убираем адрес хоста*/
lPath = Util.removeStr(lPath, CloudCommander.HOST);
- lPath = Util.removeStr(lPath, CloudFunc.NOJS);
- return lPath;
+ return lPath;
};
/**
diff --git a/lib/client/editor/_ace.js b/lib/client/editor/_ace.js
index 6ff8cd18..75097f2f 100644
--- a/lib/client/editor/_ace.js
+++ b/lib/client/editor/_ace.js
@@ -107,17 +107,12 @@ var CloudCommander, CloudFunc, ace;
/* if directory - load json
* not html data
*/
- if (lSize === ''){
- if (lA.indexOf(CloudFunc.NOJS) ===
- CloudFunc.FS.length) {
- lA = lA.replace(CloudFunc.NOJS, '');
- /* when folder view
- * is no need to edit
- * data
- */
- ReadOnly = true;
- }
- }
+ if (lSize === '')
+ /* when folder view
+ * is no need to edit
+ * data
+ */
+ ReadOnly = true;
}
this.loading = true;
diff --git a/lib/cloudfunc.js b/lib/cloudfunc.js
index 1089a9df..137cfbba 100644
--- a/lib/cloudfunc.js
+++ b/lib/cloudfunc.js
@@ -19,7 +19,6 @@ var CloudFunc, exports;
CloudFunc.NAME = 'Cloud Commander';
/* если в ссылке будет эта строка - в браузере js отключен */
- CloudFunc.NOJS = '/no-js';
CloudFunc.FS = '/fs';
/* название css-класа кнопки обновления файловой структуры*/
@@ -238,16 +237,13 @@ var CloudFunc, exports;
lTitle = '" title="',
_l = '">',
lHrefEnd ='',
-
+
lHtmlPath,
- /* путь в ссылке, который говорит что js отключен */
- lNoJS_s = CloudFunc.NOJS,
lFS_s = CloudFunc.FS;
/* корневой каталог */
lHtmlPath = lHref +
lFS_s +
- lNoJS_s +
lTitle +
'/' +
_l +
@@ -259,11 +255,9 @@ var CloudFunc, exports;
var lUrl=folders[i],
lShortName = lUrl.replace(lUrl.substr(lUrl,lUrl.lastIndexOf('/')+1),'');
if (i!==1)
- lHtmlPath += lHref +
- lFS_s + lNoJS_s + lUrl +
- lTitle + lUrl + _l +
- lShortName +
- lHrefEnd + '/';
+ lHtmlPath += lHref + lFS_s + lUrl +
+ lTitle + lUrl + _l +
+ lShortName + lHrefEnd + '/';
else
lHtmlPath+=lShortName+'/';
}
@@ -315,11 +309,6 @@ var CloudFunc, exports;
* если он есть
*/
lRefreshPath = CloudFunc.removeLastSlash(lPath),
-
- /* путь в ссылке, который говорит
- * что js отключен
- */
- lNoJS_s = CloudFunc.NOJS,
lFS_s = CloudFunc.FS,
lFileTable =
@@ -330,7 +319,7 @@ var CloudFunc, exports;
'' +
'' +
- '' +
+ '' +
'' +
'' +
'' + lHtmlPath + '' +
@@ -354,7 +343,7 @@ var CloudFunc, exports;
if(lDotDot === '')
lDotDot = '/';
- lLink = lFS_s + lNoJS_s + lDotDot;
+ lLink = lFS_s + lDotDot;
/* Сохраняем путь к каталогу верхнего уровня*/
@@ -380,8 +369,7 @@ var CloudFunc, exports;
'">';
lFileTable += '';
lFileTable += '' +
- '