Merged in paulis/processmaker/HOR-1089 (pull request #4345)

HOR-1089
This commit is contained in:
Julio Cesar Laura Avendaño
2016-06-03 10:12:55 -04:00
45 changed files with 1 additions and 3959 deletions

View File

@@ -142,7 +142,6 @@ $docuroot = explode ( PATH_SEP , $_SERVER['DOCUMENT_ROOT'] );
G::LoadSystem('form');
G::LoadSystem('menu');
G::LoadSystem("xmlMenu");
G::LoadSystem('dvEditor');
G::LoadSystem('table');
G::LoadSystem('pagedTable');
G::LoadSystem('tree');

View File

@@ -1,136 +0,0 @@
function DVEditor(where,body,oHiddenInput,height,mode,editorId)
{
var me=this;
var hiddenInput=oHiddenInput;
var iframe=$dce("iframe");
//NOTE: className no funciona en FIREFOX
iframe.style.width="100%";
iframe.style.height=height;
iframe.style.margin="0px";
iframe.style.padding="0px";
iframe.style.border="none";
where.appendChild(iframe);
var head=document.childNodes[0].childNodes[0];
var header='';
if (iframe.contentWindow) {
var doc = iframe.contentWindow.document;
} else {
var doc = iframe.contentDocument;
}
var _header = $dce("head");// head.cloneNode(true);
for (var i=0;i<head.childNodes.length;i++) {
try {
if ((head.childNodes[i].tagName==='LINK')&&
(head.childNodes[i].type="text/css")) {
_header.appendChild(head.childNodes[i].cloneNode(true));
}
} catch (e) {
}
}
header=_header.innerHTML;
//alert(header);
doc.open();
doc.write('<html><head>'+header+'</head><body style="height:100%;padding:0px;margin:0px;border:none;background-color:ThreeDHighlight;cursor:text;">'+body+'</body></html>');
doc.close();
doc.designMode="on";
if (mode=="edit") {
doc.contentEditable=true;
} else {
doc.contentEditable=false;
}
this.doc=doc;
me.insertHTML = function (html)
{
var cmd = 'inserthtml';
var bool = false;
var value = html;
try {
doc.execCommand(cmd,bool,value);
} catch (e) {
}
return false;
};
me.command = function()
{
var cmd = this.getAttribute('name');
var bool = false;
var value = this.getAttribute('cmdValue') || null;
if (value == 'promptUser') {
value = prompt(
(typeof(G_STRINGS[this.getAttribute('promptText')])!=='undefined')?
G_STRINGS[this.getAttribute('promptText')]:
this.getAttribute('promptText')
);
}
try {
if (editorId) {
if (window.ActiveXObject && cmd == 'hilitecolor') {
doc.selection.createRange().pasteHTML('<span style ="background-color:' + value + '">' +doc.selection.createRange().text +'</span>');
} else {
eval("window._editor" +editorId+".doc.execCommand(cmd,bool,value);");
}
} else {
doc.execCommand(cmd,bool,value);
}
} catch (e) {
}
return false;
};
me.loadToolBar = function(uri)
{
var tb=WebResource(uri);
if(editorId){ // for multi-edhtmleditor
tb.innerHTML = tb.innerHTML.replace(/DVEditorMap/g, "DVEditorMap" + editorId);
}
iframe.parentNode.insertBefore(tb,iframe);
me.setToolBar(tb);
};
me.setToolBar = function(toolbar)
{
var buttons=toolbar.getElementsByTagName('area');
for (var b=0;b<buttons.length;b++) {
buttons[b].onclick=me.command;
}
};
me.getHTML = function()
{
var body='';
try {
body=doc.getElementsByTagName('body')[0];
body=body.innerHTML;
} catch (e) {
}
return body;
};
me.setHTML = function(html)
{
try {
body=doc.getElementsByTagName('body')[0];
body.innerHTML=html;
} catch (e) {
}
return body;
};
me.refreshHidden = function()
{
if(hiddenInput)
{
var html=me.getHTML();
var raiseOnChange=hiddenInput.value!==html;
hiddenInput.value=html;
if (raiseOnChange && hiddenInput.onchange) hiddenInput.onchange();
}
};
me.syncHidden = function(name)
{
me.refreshHidden();
setTimeout(name+".syncHidden('"+name+"')",500);
};
}

View File

@@ -1,39 +0,0 @@
<div style="background-color:ButtonFace;">
<img src='/js/dveditor/core/toolbars/complete3lines.png' usemap='#DVEditorMap' alt='' style='border-style:none' />
<map class="dvtoolbar" id='DVEditorMap' name='DVEditorMap'>
<area shape='rect' href="#" coords='0,24,24,48' name='fontname' cmdValue='promptUser' promptText='Font name?' value='font-family'/>
<area shape='rect' href="#" coords='96,48,120,72' name='inserthtml' cmdValue='promptUser' promptText='Valid HTML snippet' value='html'/>
<area shape='rect' href="#" coords='0,48,24,72' name='insertparagraph'/>
<area shape='rect' href="#" coords='48,48,72,72' name='insertorderedlist'/>
<area shape='rect' href="#" coords='72,48,96,72' name='insertunorderedlist'/>
<area shape='rect' href="#" coords='216,0,240,24' name='justifyleft'/>
<area shape='rect' href="#" coords='240,0,264,24' name='justifycenter'/>
<area shape='rect' href="#" coords='264,0,288,24' name='justifyright'/>
<area shape='rect' href="#" coords='288,0,312,24' name='justifyfull'/>
<area shape='rect' href="#" coords='72,0,96,24' name='bold'/>
<area shape='rect' href="#" coords='96,0,120,24' name='italic'/>
<area shape='rect' href="#" coords='120,0,144,24' name='underline'/>
<area shape='rect' href="#" coords='24,0,48,24' name='cut'/>
<area shape='rect' href="#" coords='0,0,24,24' name='copy'/>
<area shape='rect' href="#" coords='48,0,72,24' name='paste'/>
<area shape='rect' href="#" coords='264,24,288,48' name='undo'/>
<area shape='rect' href="#" coords='288,24,312,48' name='redo'/>
<area shape='rect' href="#" coords='120,24,144,48' name='backcolor' cmdValue='promptUser' promptText='Background color?' value='bgcolor'/>
<area shape='rect' href="#" coords='144,24,168,48' name='hilitecolor' cmdValue='promptUser' promptText='Hilite color?' value='hilite'/>
<area shape='rect' href="#" coords='48,24,72,48' name='increasefontsize'/>
<area shape='rect' href="#" coords='72,24,96,48' name='decreasefontsize'/>
<area shape='rect' href="#" coords='168,24,192,48' name='formatblock' cmdValue='promptUser' promptText='Which block?' value='formatblock'/>
<area shape='rect' href="#" coords='24,24,48,48' name='FontSize' cmdValue='promptUser' promptText='Font size?' value='font-size'/>
<area shape='rect' href="#" coords='192,0,216,24' name='superscript'/>
<area shape='rect' href="#" coords='168,0,192,24' name='subscript'/>
<area shape='rect' href="#" coords='144,0,168,24' name='strikethrough'/>
<area shape='rect' href="#" coords='144,48,168,72' name='createLink' cmdValue='promptUser' promptText='URL of link?' value='<a>'/>
<area shape='rect' href="#" coords='24,48,48,72' name='inserthorizontalrule'/>
<area shape='rect' href="#" coords='192,24,216,48' name='insertimage' cmdValue='promptUser' promptText='Image URI?' value='<img />'/>
<area shape='rect' href="#" coords='96,24,120,48' name='forecolor' cmdValue='promptUser' promptText='Text color?' value='fgcolor'/>
<area shape='rect' href="#" coords='240,24,264,48' name='outdent'/>
<area shape='rect' href="#" coords='216,24,240,48' name='indent'/>
<area shape='rect' href="#" coords='120,48,144,72' name='delete'/>
<area shape='rect' href="#" coords='168,48,192,72' name='unlink'/>
</map>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

View File

@@ -1,16 +0,0 @@
<div style="background-color:ButtonFace;">
<img src='/js/dveditor/core/toolbars/smallToolBar.png' usemap='#DVEditorMap' alt='' style='border-style:none' />
<map class="dvtoolbar" id='DVEditorMap' name='DVEditorMap'>
<area shape='rect' coords='72,0,96,24' title='Justify left' name='justifyleft'/>
<area shape='rect' coords='96,0,120,24' title='Justify center' name='justifycenter'/>
<area shape='rect' coords='120,0,144,24'title='Justify right' name='justifyright'/>
<area shape='rect' coords='144,0,168,24'title='Justifyfull' name='justifyfull'/>
<area shape='rect' coords='0,0,24,24' title='Bold' name='bold'/>
<area shape='rect' coords='24,0,48,24' title='Italic' name='italic'/>
<area shape='rect' coords='48,0,72,24' title='Under line' name='underline'/>
<!-- <area shape='rect' coords='168,0,192,24' name='cut'/>
<area shape='rect' coords='192,0,216,24' name='copy'/>
<area shape='rect' coords='216,0,240,24' name='paste'/>-->
<area shape='rect' coords='240,0,264,24' name='createLink' cmdValue='promptUser' promptText='ID_URL_OF_LINK' value='<a>'/>
</map>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -1,39 +0,0 @@
<div style="background-color:ButtonFace;">
<img src='/js/dveditor/core/toolbars/toolbar2lines.png' usemap='#DVEditorMap' alt='' style='border-style:none' />
<map class="dvtoolbar" id='DVEditorMap' name='DVEditorMap'>
<area shape='rect' href="#" coords='312,0,336,24' name='fontname' cmdValue='promptUser' promptText='ID_FONT_NAME' value='font-family'/>
<area shape='rect' href="#" coords='264,24,288,48' name='inserthtml' cmdValue='promptUser' promptText='ID_INSERT_HTML' value='html'/>
<area shape='rect' href="#" coords='192,24,216,48' name='insertparagraph'/>
<area shape='rect' href="#" coords='120,24,144,48' name='insertorderedlist'/>
<area shape='rect' href="#" coords='144,24,168,48' name='insertunorderedlist'/>
<area shape='rect' href="#" coords='72,0,96,24' name='justifyleft'/>
<area shape='rect' href="#" coords='96,0,120,24' name='justifycenter'/>
<area shape='rect' href="#" coords='120,0,144,24' name='justifyright'/>
<area shape='rect' href="#" coords='144,0,168,24' name='justifyfull'/>
<area shape='rect' href="#" coords='0,0,24,24' name='bold'/>
<area shape='rect' href="#" coords='24,0,48,24' name='italic'/>
<area shape='rect' href="#" coords='48,0,72,24' name='underline'/>
<area shape='rect' href="#" coords='168,0,192,24' name='cut'/>
<area shape='rect' href="#" coords='192,0,216,24' name='copy'/>
<area shape='rect' href="#" coords='216,0,240,24' name='paste'/>
<area shape='rect' href="#" coords='264,0,288,24' name='undo'/>
<area shape='rect' href="#" coords='288,0,312,24' name='redo'/>
<area shape='rect' href="#" coords='360,24,384,48' name='backcolor' cmdValue='promptUser' promptText='ID_BACKGROUND_COLOR' value='bgcolor'/>
<area shape='rect' href="#" coords='384,0,408,24' name='hilitecolor' cmdValue='promptUser' promptText='ID_HILITE_COLOR' value='hilite'/>
<area shape='rect' href="#" coords='336,0,360,24' name='increasefontsize'/>
<area shape='rect' href="#" coords='336,24,360,48' name='decreasefontsize'/>
<area shape='rect' href="#" coords='384,24,408,48' name='formatblock' cmdValue='promptUser' promptText='ID_WHICH_BLOCK' value='formatblock'/>
<area shape='rect' href="#" coords='312,24,336,48' name='FontSize' cmdValue='promptUser' promptText='ID_FONT_SIZE' value='font-size'/>
<area shape='rect' href="#" coords='0,24,24,48' name='superscript'/>
<area shape='rect' href="#" coords='24,24,48,48' name='subscript'/>
<area shape='rect' href="#" coords='48,24,72,48' name='strikethrough'/>
<area shape='rect' href="#" coords='240,0,264,24' name='createLink' cmdValue='promptUser' promptText='ID_URL_OF_LINK' value='<a>'/>
<area shape='rect' href="#" coords='216,24,240,48' name='inserthorizontalrule'/>
<area shape='rect' href="#" coords='288,24,312,48' name='insertimage' cmdValue='promptUser' promptText='ID_IMAGE_URI' value='<img />'/>
<area shape='rect' href="#" coords='360,0,384,24' name='forecolor' cmdValue='promptUser' promptText='ID_FONT_COLOR' value='fgcolor'/>
<area shape='rect' href="#" coords='96,24,120,48' name='outdent'/>
<area shape='rect' href="#" coords='72,24,96,48' name='indent'/>
<area shape='rect' href="#" coords='168,24,192,48' name='delete'/>
<area shape='rect' href="#" coords='240,24,264,48' name='unlink'/>
</map>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

View File

@@ -1,19 +0,0 @@
Syntax highlighting with language autodetection.
URL: http://softwaremaniacs.org/soft/highlight/en/
Original author and current maintainer:
Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
Contributors:
- Peter Leonov <gojpeg@gmail.com>
- Victor Karamzin <Victor.Karamzin@enterra-inc.com>
- Vsevolod Solovyov <vsevolod.solovyov@gmail.com>
- Anton Kovalyov <anton@kovalyov.net>
- Nikita Ledyaev <lenikita@yandex.ru>
- Konstantin Evdokimenko <qewerty@gmail.com>
- Dmitri Roudakov <dmitri@roudakov.ru>
- Yuri Ivanov <ivanov@supersoft.ru>
- Vladimir Ermakov <vooon341@mail.ru>
- Vladimir Gubarkov <xonixx@gmail.com>

View File

@@ -1,19 +0,0 @@
Подсветка синтаксиса с автоопределением языка.
URL: http://softwaremaniacs.org/soft/highlight/
Первоначальный автор и ведущий проекта:
Иван Сагалаев <Maniac@SoftwareManiacs.Org>
Внесли свой вклад:
- Петр Леонов <gojpeg@gmail.com>
- Виктор Карамзин <Victor.Karamzin@enterra-inc.com>
- Всеволод Соловьёв <vsevolod.solovyov@gmail.com>
- Антон Ковалёв <anton@kovalyov.net>
- Никита Ледяев <lenikita@yandex.ru>
- Константин Евдокименко <qewerty@gmail.com>
- Дмитрий Рудаков <dmitri@roudakov.ru>
- Юрий Иванов <ivanov@supersoft.ru>
- Владимир Ермаков <vooon341@mail.ru>
- Владимир Губарьков <xonixx@gmail.com>

View File

@@ -1,24 +0,0 @@
Copyright (c) 2006, Ivan Sagalaev
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of highlight.js nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,88 +0,0 @@
<!-- saved from url=(0013)about:internet -->
<!-- ^^^ This is for IE not to show security warning for local files,
see http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2brows.mspx-->
<!--
Highlighted code export
Copyright (c) Vladimir Gubarkov <xonixx@gmail.com>
-->
<html>
<head>
<title>Highlited code export</title>
<link rel="stylesheet" href="sample.css">
<style type="text/css">
#t1, #t2 { width: 100%;}
tr { vertical-align: top; }
address { margin-top: 4em; }
</style>
<script type="text/javascript" src="highlight.js"></script>
</head>
<body>
<script type="text/javascript">
injectScripts(ALL_LANGUAGES); // all
String.prototype.escape = function() {
return this.replace(/&/gm, '&amp;').replace(/</gm, '&lt;').replace(/>/gm, '&gt;');
}
function doIt() {
var viewDiv = document.getElementById("highlight-view");
var t1 = document.getElementById("t1");
var t2 = document.getElementById("t2");
var selector = document.getElementById("langSelector");
var selectedLang = selector.options[selector.selectedIndex].value.toLowerCase();
initHighlighting.called = false;
if(selectedLang) {
viewDiv.innerHTML = '<pre><code class="'+selectedLang+'">'+t1.value.escape()+"</code></pre>";
initHighlighting(selectedLang);
} else { // try auto
viewDiv.innerHTML = '<pre><code>' + t1.value.escape() + "</code></pre>";
initHighlighting();
}
t2.value = viewDiv.innerHTML;
}
function copyToBuffer(textToCopy) {
if (window.clipboardData) { // IE
window.clipboardData.setData("Text", textToCopy);
} else if (window.netscape) { // FF
// from http://developer.mozilla.org/en/docs/Using_the_Clipboard
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
var gClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper);
gClipboardHelper.copyString(textToCopy);
}
}
</script>
<script type="text/javascript">
var langSelectorHtml = '<label>Language <select id="langSelector">';
langSelectorHtml += '<option value="">Auto</option>';
for (var lang in LANGUAGES) {
langSelectorHtml += '<option value=\"'+lang+'\">'+lang.charAt(0).toUpperCase()+lang.substr(1)+'</option>';
}
langSelectorHtml += '</select></label>';
document.write(langSelectorHtml);
</script>
<table width="100%">
<tr>
<td><textarea rows="20" cols="50" id="t1"></textarea></td>
<td><textarea rows="20" cols="50" id="t2"></textarea></td>
</tr>
<tr>
<td>Write a code snippet</td>
<td>Get HTML to paste anywhere (for actual styles and colors see sample.css)</td>
</tr>
</table>
<table width="98%">
<tr>
<td><input type="button" value="Export &rarr;" onclick="doIt()"/></td>
<td align="right"><input type="button" value="Copy to buffer" onclick="copyToBuffer(document.getElementById('t2').value);"/></td>
</tr>
</table>
<div id="highlight-view"></div>
<address>
Export script: <a href="mailto:xonixx@gmail.com">Vladimir Gubarkov</a><br>
Highlighting: <a href="http://softwaremaniacs.org/soft/highlight/">highlight.js</a>
</address>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,84 +0,0 @@
var IDENT_RE_RU = '[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*';
var NUMBER_RE = '\\b\\d+(\\.\\d+)?';
var OneS_KEYWORDS = {'процедура':1,'функция':1,'экспорт':1,'перем':1,'конецфункции':1,'конецпроцедуры':1,'если':1,'тогда':1,'иначе':1,'иначеесли':1,'конецесли':1,'попытка':1,'исключение':1,'конецпопытки':1,'ложь':1,'истина':1,'неопределено':1,'и':1,'или':1,'не':1,'null':1,'для':1,'каждого':1,'из':1,'по':1,'цикл':1,'конеццикла':1};
LANGUAGES['1c'] = {
defaultMode: {
lexems: [IDENT_RE_RU],
contains: ['comment', 'string', 'function', 'preprocessor', 'number'],
keywords: OneS_KEYWORDS
},
case_insensitive: true,
modes: [
C_LINE_COMMENT_MODE,
{
className: 'string',
begin: '"', end: '"',
contains: ['dquote'],
relevance: 0
},
{
className: 'string',
begin: '"', end: '$',
contains: ['dquote']
},
{
className: 'string',
begin: '\\|', end: '$',
contains: ['dquote']
},
{
className: 'string',
begin: '\\|', end: '"',
contains: ['dquote']
},
{
className: 'dquote',
begin: '""', end: '^'
},
{
className: 'number',
begin: NUMBER_RE, end: '^',
relevance: 0
},
{
className: 'title',
lexems: [IDENT_RE_RU],
begin: IDENT_RE_RU, end: '^'
},
{
className: 'params',
begin: '\\(', end: '\\)',
lexems: [IDENT_RE_RU],
keywords: {'знач':1},
contains: ['string']
},
{
className: 'function',
begin: '(процедура|функция)', end: '$',
lexems: [IDENT_RE_RU],
keywords: {'процедура': 1, 'экспорт':1, 'функция': 1},
contains: ['title','tail','comment'],
relevance: 0
},
{
className: 'tail',
begin: '^', endsWithParent: true,
lexems: [IDENT_RE_RU],
contains: ['params', 'export']
},
{
className: 'export',
begin: 'экспорт', endsWithParent: true,
lexems: [IDENT_RE_RU],
keywords: {'экспорт': 1},
contains: ['comment']
},
{
className: 'preprocessor',
begin: '#', end: '$',
lexems: [IDENT_RE_RU]
}
]
};//1c

View File

@@ -1,52 +0,0 @@
/*
Axapta definition (с) Dmitri Roudakov <dmitri@roudakov.ru>
*/
LANGUAGES.axapta = {
defaultMode: {
lexems: [UNDERSCORE_IDENT_RE],
contains: ['comment', 'string', 'class', 'number', 'preprocessor'],
keywords: {'false': 1, 'int': 1, 'abstract': 1, 'private': 1, 'char': 1, 'interface': 1, 'boolean': 1, 'static': 1, 'null': 1, 'if': 1, 'for': 1, 'true': 1, 'while': 1, 'long': 1, 'throw': 1, 'finally': 1, 'protected': 1, 'extends': 1, 'final': 1, 'implements': 1, 'return': 1, 'void': 1, 'enum': 1, 'else': 1, 'break': 1, 'new': 1, 'catch': 1, 'byte': 1, 'super': 1, 'class': 1, 'case': 1, 'short': 1, 'default': 1, 'double': 1, 'public': 1, 'try': 1, 'this': 1, 'switch': 1, 'continue': 1,
'reverse':1, 'firstfast':1,'firstonly':1,'forupdate':1,'nofetch':1, 'sum':1, 'avg':1, 'minof':1, 'maxof':1, 'count':1, 'order':1, 'group':1, 'by':1, 'asc':1, 'desc':1, 'index':1, 'hint':1, 'like':1,
'dispaly':1, 'edit':1, 'client':1, 'server':1, 'ttsbegin':1, 'ttscommit':1,
'str':1, 'real':1, 'date':1, 'container':1, 'anytype':1, 'common':1, 'div':1,'mod':1
}
},
modes: [
{
className: 'class',
lexems: [UNDERSCORE_IDENT_RE],
begin: '(class |interface )', end: '{',
illegal: ':',
keywords: {'class': 1, 'interface': 1},
contains: ['inheritance', 'title']
},
{
className: 'inheritance',
begin: '(implements|extends)', end: '^',
lexems: [IDENT_RE],
keywords: {'extends': 1, 'implements': 1},
relevance: 10
},
{
className: 'title',
begin: UNDERSCORE_IDENT_RE, end: '^'
},
{
className: 'params',
begin: '\\(', end: '\\)',
contains: ['string', 'annotation']
},
C_NUMBER_MODE,
APOS_STRING_MODE,
QUOTE_STRING_MODE,
BACKSLASH_ESCAPE,
C_LINE_COMMENT_MODE,
C_BLOCK_COMMENT_MODE,
{
className: 'preprocessor',
begin: '#', end: '$'
}
]
};//axapta

File diff suppressed because one or more lines are too long

View File

@@ -1,38 +0,0 @@
LANGUAGES.javascript = {
defaultMode: {
lexems: [UNDERSCORE_IDENT_RE],
contains: ['string', 'comment', 'number', 'regexp', 'function'],
keywords: {
'keyword': {'in': 1, 'if': 1, 'for': 1, 'while': 1, 'finally': 1, 'var': 1, 'new': 1, 'function': 1, 'do': 1, 'return': 1, 'void': 1, 'else': 1, 'break': 1, 'catch': 1, 'instanceof': 1, 'with': 1, 'throw': 1, 'case': 1, 'default': 1, 'try': 1, 'this': 1, 'switch': 1, 'continue': 1, 'typeof': 1, 'delete': 1},
'literal': {'true': 1, 'false': 1, 'null': 1}
}
},
modes: [
C_LINE_COMMENT_MODE,
C_BLOCK_COMMENT_MODE,
C_NUMBER_MODE,
APOS_STRING_MODE,
QUOTE_STRING_MODE,
BACKSLASH_ESCAPE,
{
className: 'regexp',
begin: '/.*?[^\\\\/]/[gim]*', end: '^'
},
{
className: 'function',
begin: 'function ', end: '{',
lexems: [UNDERSCORE_IDENT_RE],
keywords: {'function': 1},
contains: ['title', 'params']
},
{
className: 'title',
begin: UNDERSCORE_IDENT_RE, end: '^'
},
{
className: 'params',
begin: '\\(', end: '\\)',
contains: ['string', 'comment']
}
]
};//javascript

View File

@@ -1,30 +0,0 @@
/*
RenderMan Interface Bytestream (c) Konstantin Evdokimenko <qewerty@gmail.com>
*/
LANGUAGES.rib = {
defaultMode: {
lexems: [UNDERSCORE_IDENT_RE],
illegal: '</',
contains: ['comment', 'string', 'number'],
keywords: {
'keyword': {'ReadArchive': 1, 'FrameBegin': 1, 'FrameEnd': 1, 'WorldBegin': 1, 'WorldEnd': 1,
'Attribute': 1, 'Display': 1, 'Option': 1, 'Format': 1, 'ShadingRate': 1,
'PixelFilter': 1, 'PixelSamples': 1, 'Projection': 1, 'Scale': 1, 'ConcatTransform': 1,
'Transform': 1, 'Translate': 1, 'Rotate': 1,
'Surface': 1, 'Displacement': 1, 'Atmosphere': 1,
'Interior': 1, 'Exterior': 1},
'commands': {'WorldBegin': 1, 'WorldEnd': 1, 'FrameBegin': 1, 'FrameEnd': 1,
'ReadArchive': 1, 'ShadingRate': 1}
}
},
modes: [
HASH_COMMENT_MODE,
C_NUMBER_MODE,
APOS_STRING_MODE,
QUOTE_STRING_MODE,
BACKSLASH_ESCAPE
]
};//rib

View File

@@ -1,46 +0,0 @@
/*
RenderMan Shading Language (c) Konstantin Evdokimenko <qewerty@gmail.com>
*/
LANGUAGES.rsl = {
defaultMode: {
lexems: [UNDERSCORE_IDENT_RE],
illegal: '</',
contains: ['comment', 'string', 'number', 'preprocessor',
'shader', 'shading'],
keywords: {
'keyword': {'float': 1, 'color': 1, 'point': 1, 'normal': 1, 'vector': 1,
'matrix': 1, 'while': 1, 'for': 1, 'if': 1, 'do': 1,
'return': 1, 'else': 1, 'break': 1, 'extern': 1, 'continue': 1},
'built_in': {'smoothstep': 1, 'calculatenormal': 1, 'faceforward': 1,
'normalize': 1, 'ambient': 1, 'diffuse': 1, 'specular': 1,
'visibility': 1}
}
},
modes: [
{
className: 'shader',
begin: 'surface |displacement |light |volume |imager ', end: '\\(',
lexems: [IDENT_RE],
keywords: {'surface': 1, 'displacement': 1, 'light': 1, 'volume': 1, 'imager': 1}
},
{
className: 'shading',
begin: 'illuminate|illuminance|gather', end: '\\(',
lexems: [IDENT_RE],
keywords: {'illuminate': 1, 'illuminance': 1, 'gather': 1}
},
C_LINE_COMMENT_MODE,
C_BLOCK_COMMENT_MODE,
C_NUMBER_MODE,
QUOTE_STRING_MODE,
APOS_STRING_MODE,
BACKSLASH_ESCAPE,
{
className: 'preprocessor',
begin: '#', end: '$'
}
]
};//rsl

View File

@@ -1,53 +0,0 @@
/*
Smalltalk definition (c) Vladimir Gubarkov <xonixx@gmail.com>
*/
var SMALLTALK_KEYWORDS = {'self': 1, 'super': 1, 'nil': 1, 'true': 1, 'false': 1, 'thisContext': 1}; // only 6
var VAR_IDENT_RE = '[a-z][a-zA-Z0-9_]*';
LANGUAGES.smalltalk = {
defaultMode: {
lexems: [UNDERSCORE_IDENT_RE],
contains: ['comment', 'string', 'class', 'method',
'number', 'symbol', 'char', 'localvars', 'array'],
keywords: SMALLTALK_KEYWORDS
},
modes: [
{
className: 'class',
begin: '\\b[A-Z][A-Za-z0-9_]*', end: '^',
relevance: 0
},
{
className: 'symbol',
begin: '#' + UNDERSCORE_IDENT_RE, end: '^'
},
C_NUMBER_MODE,
APOS_STRING_MODE,
{
className: 'comment',
begin: '"', end: '"',
relevance: 0
},
{
className: 'method',
begin: VAR_IDENT_RE+':', end:'^'
},
{
className: 'char',
begin: '\\$.{1}', end: '^'
},
{
className: 'localvars',
begin: '\\|\\s*(('+VAR_IDENT_RE+')\\s*)+\\|', end: '^',
relevance: 10
},
{
className: 'array',
begin: '\\#\\(', end: '\\)',
contains: ['string', 'char', 'number', 'symbol']
}
]
};//smalltalk

File diff suppressed because one or more lines are too long

View File

@@ -1,158 +0,0 @@
LANGUAGES.cpp = {
defaultMode: {
lexems: [UNDERSCORE_IDENT_RE],
illegal: '</',
contains: ['comment', 'string', 'number', 'preprocessor'],
keywords: {'false': 1, 'int': 1, 'float': 1, 'while': 1, 'private': 1, 'char': 1, 'catch': 1, 'export': 1, 'virtual': 1, 'operator': 2, 'sizeof': 2, 'dynamic_cast': 2, 'typedef': 2, 'const_cast': 2, 'const': 1, 'struct': 1, 'for': 1, 'static_cast': 2, 'union': 1, 'namespace': 1, 'unsigned': 1, 'long': 1, 'throw': 1, 'volatile': 2, 'static': 1, 'protected': 1, 'bool': 1, 'template': 1, 'mutable': 1, 'if': 1, 'public': 1, 'friend': 2, 'do': 1, 'return': 1, 'goto': 1, 'auto': 1, 'void': 2, 'enum': 1, 'else': 1, 'break': 1, 'new': 1, 'extern': 1, 'using': 1, 'true': 1, 'class': 1, 'asm': 1, 'case': 1, 'typeid': 1, 'short': 1, 'reinterpret_cast': 2, 'default': 1, 'double': 1, 'register': 1, 'explicit': 1, 'signed': 1, 'typename': 1, 'try': 1, 'this': 1, 'switch': 1, 'continue': 1, 'wchar_t': 1, 'inline': 1, 'delete': 1}
},
modes: [
C_LINE_COMMENT_MODE,
C_BLOCK_COMMENT_MODE,
C_NUMBER_MODE,
QUOTE_STRING_MODE,
BACKSLASH_ESCAPE,
{
className: 'string',
begin: '\'', end: '[^\\\\]\'',
illegal: '[^\\\\][^\']'
},
{
className: 'preprocessor',
begin: '#', end: '$'
}
]
};//cpp
/*
Java definition (с) Vsevolod Solovyov <vsevolod.solovyov@gmail.com>
*/
LANGUAGES.java = {
defaultMode: {
lexems: [UNDERSCORE_IDENT_RE],
contains: ['comment', 'string', 'class', 'number', 'javadoc', 'annotation'],
keywords: {'false': 1, 'synchronized': 1, 'int': 1, 'abstract': 1, 'float': 1, 'private': 1, 'char': 1, 'interface': 1, 'boolean': 1, 'static': 1, 'null': 1, 'if': 1, 'const': 1, 'for': 1, 'true': 1, 'while': 1, 'long': 1, 'throw': 1, 'strictfp': 1, 'finally': 1, 'protected': 1, 'extends': 1, 'import': 1, 'native': 1, 'final': 1, 'implements': 1, 'return': 1, 'void': 1, 'enum': 1, 'else': 1, 'break': 1, 'transient': 1, 'new': 1, 'catch': 1, 'instanceof': 1, 'byte': 1, 'super': 1, 'class': 1, 'volatile': 1, 'case': 1, 'assert': 1, 'short': 1, 'package': 1, 'default': 1, 'double': 1, 'public': 1, 'try': 1, 'this': 1, 'switch': 1, 'continue': 1, 'throws': 1}
},
modes: [
{
className: 'class',
lexems: [UNDERSCORE_IDENT_RE],
begin: '(class |interface )', end: '{',
illegal: ':',
keywords: {'class': 1, 'interface': 1},
contains: ['inheritance', 'title']
},
{
className: 'inheritance',
begin: '(implements|extends)', end: '^',
lexems: [IDENT_RE],
keywords: {'extends': 1, 'implements': 1},
relevance: 10
},
{
className: 'title',
begin: UNDERSCORE_IDENT_RE, end: '^'
},
{
className: 'params',
begin: '\\(', end: '\\)',
contains: ['string', 'annotation']
},
C_NUMBER_MODE,
APOS_STRING_MODE,
QUOTE_STRING_MODE,
BACKSLASH_ESCAPE,
C_LINE_COMMENT_MODE,
{
className: 'javadoc',
begin: '/\\*\\*', end: '\\*/',
relevance: 10
},
C_BLOCK_COMMENT_MODE,
{
className: 'annotation',
begin: '@[A-Za-z]+', end: '^'
}
]
};//java
var DELPHI_KEYWORDS = {'and': 1, 'safecall': 1, 'cdecl': 1, 'then': 1, 'string': 1, 'exports': 1, 'library': 1, 'not': 1, 'pascal': 1, 'set': 1, 'virtual': 1, 'file': 1, 'in': 1, 'array': 1, 'label': 1, 'packed': 1, 'end.': 1, 'index': 1, 'while': 1, 'const': 1, 'raise': 1, 'for': 1, 'to': 1, 'implementation': 1, 'with': 1, 'except': 1, 'overload': 1, 'destructor': 1, 'downto': 1, 'finally': 1, 'program': 1, 'exit': 1, 'unit': 1, 'inherited': 1, 'override': 1, 'if': 1, 'type': 1, 'until': 1, 'function': 1, 'do': 1, 'begin': 1, 'repeat': 1, 'goto': 1, 'nil': 1, 'far': 1, 'initialization': 1, 'object': 1, 'else': 1, 'var': 1, 'uses': 1, 'external': 1, 'resourcestring': 1, 'interface': 1, 'end': 1, 'finalization': 1, 'class': 1, 'asm': 1, 'mod': 1, 'case': 1, 'on': 1, 'shr': 1, 'shl': 1, 'of': 1, 'register': 1, 'xorwrite': 1, 'threadvar': 1, 'try': 1, 'record': 1, 'near': 1, 'stored': 1, 'constructor': 1, 'stdcall': 1, 'inline': 1, 'div': 1, 'out': 1, 'or': 1, 'procedure': 1};
var DELPHI_CLASS_KEYWORDS = {'safecall': 1, 'stdcall': 1, 'pascal': 1, 'stored': 1, 'const': 1, 'implementation': 1, 'finalization': 1, 'except': 1, 'to': 1, 'finally': 1, 'program': 1, 'inherited': 1, 'override': 1, 'then': 1, 'exports': 1, 'string': 1, 'read': 1, 'not': 1, 'mod': 1, 'shr': 1, 'try': 1, 'div': 1, 'shl': 1, 'set': 1, 'library': 1, 'message': 1, 'packed': 1, 'index': 1, 'for': 1, 'near': 1, 'overload': 1, 'label': 1, 'downto': 1, 'exit': 1, 'public': 1, 'goto': 1, 'interface': 1, 'asm': 1, 'on': 1, 'of': 1, 'constructor': 1, 'or': 1, 'private': 1, 'array': 1, 'unit': 1, 'raise': 1, 'destructor': 1, 'var': 1, 'type': 1, 'until': 1, 'function': 1, 'else': 1, 'external': 1, 'with': 1, 'case': 1, 'default': 1, 'record': 1, 'while': 1, 'protected': 1, 'property': 1, 'procedure': 1, 'published': 1, 'and': 1, 'cdecl': 1, 'do': 1, 'threadvar': 1, 'file': 1, 'in': 1, 'if': 1, 'end': 1, 'virtual': 1, 'write': 1, 'far': 1, 'out': 1, 'begin': 1, 'repeat': 1, 'nil': 1, 'initialization': 1, 'object': 1, 'uses': 1, 'resourcestring': 1, 'class': 1, 'register': 1, 'xorwrite': 1, 'inline': 1};
LANGUAGES.delphi = {
defaultMode: {
lexems: [IDENT_RE],
illegal: '("|\\$[G-Zg-z]|\\/\\*|</)',
contains: ['comment', 'string', 'number', 'function', 'class'],
keywords: DELPHI_KEYWORDS
},
case_insensitive: true,
modes: [
{
className: 'comment',
begin: '{', end: '}'
},
{
className: 'comment',
begin: '\\(\\*', end: '\\*\\)',
relevance: 10
},
C_LINE_COMMENT_MODE,
{
className: 'number',
begin: NUMBER_RE, end: '^',
relevance: 0
},
{
className: 'string',
begin: '\'', end: '\'',
contains: ['quote'],
relevance: 0
},
{
className: 'string',
begin: '(#\\d+)+', end: '^'
},
{
className: 'quote',
begin: '\'\'', end: '^'
},
{
className: 'function',
begin: 'function', end: '[:;]',
lexems: [IDENT_RE],
keywords: {'function': 1},
contains: ['title', 'params', 'comment'],
relevance: 0
},
{
className: 'function',
begin: '(procedure|constructor|destructor)', end: ';',
lexems: [IDENT_RE],
keywords: {'constructor': 1, 'destructor': 1, 'procedure': 1},
contains: ['title', 'params', 'comment'],
relevance: 10
},
{
className: 'title',
begin: IDENT_RE, end: '^'
},
{
className: 'params',
begin: '\\(', end: '\\)',
lexems: [IDENT_RE],
keywords: DELPHI_KEYWORDS,
contains: ['string']
},
{
className: 'class',
begin: '=\\s*class', end: 'end;',
lexems: [IDENT_RE],
keywords: DELPHI_CLASS_KEYWORDS,
contains: ['string', 'comment', 'function']
}
]
};//delphi

View File

@@ -1,25 +0,0 @@
/*
VBScript definition (c) Nikita Ledyaev <lenikita@yandex.ru>
*/
LANGUAGES.vbscript = {
defaultMode: {
lexems: [IDENT_RE],
contains: ['string', 'comment', 'number', 'built_in'],
keywords: {
'keyword': {'call' : 1,'class' : 1,'const' : 1,'dim' : 1,'do' : 1,'loop' : 1,'erase' : 1,'execute' : 1,'executeglobal' : 1,'exit' : 1,'for' : 1,'each' : 1,'next' : 1,'function' : 1,'if' : 1,'then' : 1,'else' : 1,'on' : 1, 'error' : 1,'option' : 1, 'explicit' : 1,'private' : 1,'property' : 1,'let' : 1,'get' : 1,'public' : 1,'randomize' : 1,'redim' : 1,'rem' : 1,'select' : 1,'case' : 1,'set' : 1,'stop' : 1,'sub' : 1,'while' : 1,'wend' : 1,'with' : 1, 'end' : 1, 'to' : 1},
'built_in': {'lcase': 1, 'month': 1, 'vartype': 1, 'instrrev': 1, 'ubound': 1, 'setlocale': 1, 'getobject': 1, 'rgb': 1, 'getref': 1, 'string': 1, 'weekdayname': 1, 'rnd': 1, 'dateadd': 1, 'monthname': 1, 'now': 1, 'day': 1, 'minute': 1, 'isarray': 1, 'cbool': 1, 'round': 1, 'formatcurrency': 1, 'conversions': 1, 'csng': 1, 'timevalue': 1, 'second': 1, 'year': 1, 'space': 1, 'abs': 1, 'clng': 1, 'timeserial': 1, 'fixs': 1, 'len': 1, 'asc': 1, 'isempty': 1, 'maths': 1, 'dateserial': 1, 'atn': 1, 'timer': 1, 'isobject': 1, 'filter': 1, 'weekday': 1, 'datevalue': 1, 'ccur': 1, 'isdate': 1, 'instr': 1, 'datediff': 1, 'formatdatetime': 1, 'replace': 1, 'isnull': 1, 'right': 1, 'sgn': 1, 'array': 1, 'snumeric': 1, 'log': 1, 'cdbl': 1, 'hex': 1, 'chr': 1, 'lbound': 1, 'msgbox': 1, 'ucase': 1, 'getlocale': 1, 'cos': 1, 'cdate': 1, 'cbyte': 1, 'rtrim': 1, 'join': 1, 'hour': 1, 'oct': 1, 'typename': 1, 'trim': 1, 'strcomp': 1, 'int': 1, 'createobject': 1, 'loadpicture': 1, 'tan': 1, 'formatnumber': 1, 'mid': 1, 'scriptenginebuildversion': 1, 'scriptengine': 1, 'split': 1, 'scriptengineminorversion': 1, 'cint': 1, 'sin': 1, 'datepart': 1, 'ltrim': 1, 'sqr': 1, 'scriptenginemajorversion': 1, 'time': 1, 'derived': 1, 'eval': 1, 'date': 1, 'formatpercent': 1, 'exp': 1, 'inputbox': 1, 'left': 1}
}
},
case_insensitive: true,
modes: [
QUOTE_STRING_MODE,
BACKSLASH_ESCAPE,
{
className: 'comment',
begin: '\'', end: '$'
},
C_NUMBER_MODE
]
};//vbscript

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,75 +0,0 @@
/*
You can use this file as is or as a starting point for you own styling
*/
pre code[class]:after {
content: 'highlight: ' attr(class);
display: block; text-align: right;
font-size: smaller;
color: #CCC; background: white;
border-top: solid 1px;
padding-top: 0.5em;
}
pre code {
display: block;
background: #F0F0F0;
}
pre code,
.ruby .subst {
color: black;
}
.string,
.function .title,
.class .title,
.tag .attribute .value,
.css .rules .value,
.preprocessor,
.ruby .symbol,
.built_in,
.sql .aggregate,
.django .template_tag,
.django .variable,
.smalltalk .class {
color: #800;
}
.comment,
.java .annotation,
.template_comment {
color: #888;
}
.number,
.regexp,
.javascript .literal,
.smalltalk .symbol,
.smalltalk .char {
color: #080;
}
.javadoc,
.ruby .string,
.python .decorator,
.django .filter .argument,
.smalltalk .localvars,
.smalltalk .array,
.css .attr_selector,
.xml .pi {
color: #88F;
}
.keyword,
.css .id,
.phpdoc,
.function .title,
.class .title,
.vbscript .built_in,
.sql .aggregate,
.rsl .built_in,
.smalltalk .class,
.xml .tag .title {
font-weight: bold;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,86 +0,0 @@
<?php
/*
Plugin Name: highlight.js
Plugin URI: http://softwaremaniacs.org/soft/highlight/
Description: Syntax highlighting with language autodetection
Version: 3.5
Author: Ivan Sagalaev
Author URI: http://softwaremaniacs.org/about/
*/
add_option('hljs_languages', '');
if (!get_option('hljs_script_path')) {
$components = explode('/', dirname(__FILE__));
$l = sizeof($components);
$script_path = get_settings('home') . '/' . $components[$l - 3] . '/' . $components[$l - 2] . '/' . $components[$l - 1];
add_option('hljs_script_path', $script_path . '/highlight.js');
}
add_option('hljs_css', '');
function init_highlighting_on_load() {
$languages_str = get_option('hljs_languages');
if ($languages_str) {
$languages = explode(',', $languages_str);
foreach ($languages as $i => $language) {
$languages[$i] = '\'' . trim($language) . '\'';
}
$languages_str = implode(', ', $languages);
}
?>
<script type="text/javascript" src="<?php echo get_option('hljs_script_path');?>"></script>
<script type="text/javascript">initHighlightingOnLoad(<?php echo $languages_str; ?>);</script>
<?php
$css = get_option('hljs_css');
if ($css) {?>
<style type="text/css">
<?php echo $css ?>
</style>
<?php
}
}
add_action('wp_head', 'init_highlighting_on_load');
function add_hljs_subpanel() {
if (function_exists('add_options_page')) {
add_options_page('highlight.js options', 'highlight.js', 0, __FILE__, 'hljs_subpanel');
}
}
add_action('admin_menu', 'add_hljs_subpanel');
function hljs_subpanel() {
if (isset($_POST['hljs_script_path'])) {
update_option('hljs_languages', $_POST['hljs_languages']);
update_option('hljs_script_path', $_POST['hljs_script_path']);
update_option('hljs_css', $_POST['hljs_css']);
?><div class="updated"><p><strong>Options updated.</strong></p></div><?php
} ?>
<div class="wrap">
<form method="post">
<h2>highlight.js options</h2>
<div>
<p><label for="id_hljs_languages">Highlight Languages:</label> <input type="text" name="hljs_languages" id="id_hljs_languages" value="<?php echo get_option('hljs_languages'); ?>" /></p>
<p><small>List here languages that you want to highlight on your blog like this: php, html, css. Empty string means "all known languages". For the list
of supported languages refer to <a href="http://softwaremaniacs.org/soft/highlight/">highlight.js homepage</a>.</small></p>
</div>
<div>
<p><label for="id_hljs_script_path">Path to highlight.js:</label> <input type="text" name="hljs_script_path" id="id_hljs_script_path" value="<?php echo get_option('hljs_script_path'); ?>" /></p>
<p><small>Let's you place the script in a convenient place</small></p>
</div>
<div>
<p><label for="id_hljs_css">Custom CSS:</label></p>
<p><textarea name="hljs_css" id="id_hljs_css" rows="20" cols="70"><?php echo get_option('hljs_css'); ?></textarea></p>
<p><small>Normally styling of code snippets goes into site's main CSS files. But you can
write it here if you can't access site's CSS or just like it this way.</small></p>
</div>
<div class="submit">
<input type="submit" name="info_update" value="Update options »" />
</div>
</form>
</div><?php
}
?>

View File

@@ -1,148 +0,0 @@
/* PACKAGE : json.js 2007-03-21
*/
if (!Object.prototype.toJSONString) {
Array.prototype.toJSONString = function () {
var a = ['['],
b,
i,
l = this.length,
v;
function p(s) {
if (b) {
a.push(',');
}
a.push(s);
b = true;
}
for (i = 0; i < l; i += 1) {
v = this[i];
switch (typeof v) {
case 'undefined':
case 'function':
case 'unknown':
break;
case 'object':
if (v) {
if (typeof v.toJSONString === 'function') {
p(v.toJSONString());
}
} else {
p("null");
}
break;
default:
p(v.toJSONString());
}
}
a.push(']');
return a.join('');
};
Boolean.prototype.toJSONString = function () {
return String(this);
};
Date.prototype.toJSONString = function () {
function f(n) {
return n < 10 ? '0' + n : n;
}
return '"' + this.getFullYear() + '-' +
f(this.getMonth() + 1) + '-' +
f(this.getDate()) + 'T' +
f(this.getHours()) + ':' +
f(this.getMinutes()) + ':' +
f(this.getSeconds()) + '"';
};
Number.prototype.toJSONString = function () {
return isFinite(this) ? String(this) : "null";
};
Object.prototype.toJSONString = function () {
var a = ['{'],
b,
k,
v;
function p(s) {
if (b) {
a.push(',');
}
a.push(k.toJSONString(), ':', s);
b = true;
}
for (k in this) {
if (this.hasOwnProperty(k)) {
v = this[k];
switch (typeof v) {
case 'undefined':
case 'function':
case 'unknown':
break;
case 'object':
if (v) {
if (typeof v.toJSONString === 'function') {
p(v.toJSONString());
}
} else {
p("null");
}
break;
default:
p(v.toJSONString());
}
}
}
a.push('}');
return a.join('');
};
(function (s) {
var m = {
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"' : '\\"',
'\\': '\\\\'
};
s.parseJSON = function (filter) {
try {
if (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.
test(this)) {
var j = eval('(' + this + ')');
if (typeof filter === 'function') {
function walk(k, v) {
if (v && typeof v === 'object') {
for (var i in v) {
if (v.hasOwnProperty(i)) {
v[i] = walk(i, v[i]);
}
}
}
return filter(k, v);
}
j = walk('', j);
}
return j;
}
} catch (e) {
}
throw new SyntaxError("parseJSON");
};
s.toJSONString = function () {
if (/["\\\x00-\x1f]/.test(this)) {
return '"' + this.replace(/([\x00-\x1f\\"])/g, function(a, b) {
var c = m[b];
if (c) {
return c;
}
c = b.charCodeAt();
return '\\u00' +
Math.floor(c / 16).toString(16) +
(c % 16).toString(16);
}) + '"';
}
return '"' + this + '"';
};
})(String.prototype);
}

Some files were not shown because too many files have changed in this diff Show More