feature(util) ownRedner: { } -> {{ }}

This commit is contained in:
coderaiser 2013-10-17 08:46:21 +00:00
parent a6e8ebab39
commit 2674a0d57a
4 changed files with 13 additions and 11 deletions

View file

@ -1,8 +1,8 @@
<li draggable class>
<span class="mini-icon {type}"></span>
<span class="mini-icon {{ type }}"></span>
<span class=name>
<a href="{link}" title="{name}" target="{target}" draggable=true>{name}</a>
<a href="{{ link }}" title="{{ name }}" target="{{ target }}" draggable=true>{{ name }}</a>
</span>
<span class=size>{size}</span><span class=owner>{owner}</span>
<span class=mode>{mode}</span>
</li>
<span class=size>{{ size }}</span><span class=owner>{{ owner }}</span>
<span class=mode>{{ mode }}</span>
</li>

View file

@ -8,14 +8,14 @@
<!-- chrome frame -->
<meta http-equiv="X-UA-Compatible" content=" chrome=1" />
<link href=/img/favicon/favicon.png rel=icon type=image/png />
<title>{title}</title>
<title>{{ title }}</title>
<link rel=stylesheet href="/css/reset.css">
<link rel=stylesheet href="/css/style.css">
</head>
<body>
<div id=fm class=no-js>{fm}</div>
<div id=fm class=no-js>{{ fm }}</div>
<div id=keyspanel>
<button id=f1 class=cmd-button>F1 - help</button>
<button id=f2 class=cmd-button>F2 - rename</button>

View file

@ -1 +1 @@
<li class=path><span class="path-icon clear-cache" id=clear-cache title="clear cache (Ctrl+D)"></span><span class="path-icon refresh-icon" title="refresh (Ctrl+R)"><a href="{link}"></a></span><span>{path}</span></li>
<li class=path><span class="path-icon clear-cache" id=clear-cache title="clear cache (Ctrl+D)"></span><span class="path-icon refresh-icon" title="refresh (Ctrl+R)"><a href="{{ link }}"></a></span><span>{{ path }}</span></li>

View file

@ -556,9 +556,11 @@ Util = exports || {};
* @pSymbols
*/
Util.ownRender = function(pTempl, pView, pSymbols) {
var SPACES = '\\s*';
if (!pSymbols)
pSymbols = ['{', '}'];
pSymbols = ['{{' + SPACES, SPACES + '}}'];
var lRet = pTempl,
lFirstChar,
lSecondChar;
@ -570,7 +572,7 @@ Util = exports || {};
var lStr = pView[lVar];
lStr = Util.exec(lStr) || lStr;
lRet = Util.replaceStr(lRet, lFirstChar + lVar + lSecondChar, lStr);
lRet = Util.replaceStr(lRet, lFirstChar + lVar + lSecondChar, lStr, true);
}
return lRet;