Browse Source

use font awesome + bugfixes about the user interface

damien 11 years ago
parent
commit
24e6845514
38 changed files with 985 additions and 420 deletions
  1. 1 0
      pboard/pboard/public/css/external/google-code-prettify/prettify.css
  2. 0 0
      pboard/pboard/public/javascript/external/bootstrap-datetimepicker.min.js
  3. 201 0
      pboard/pboard/public/javascript/external/bootstrap-wysiwyg.js
  4. 0 0
      pboard/pboard/public/javascript/external/bootstrap.js
  5. 0 0
      pboard/pboard/public/javascript/external/bootstrap.min.js
  6. 2 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-apollo.js
  7. 3 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-basic.js
  8. 18 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-clj.js
  9. 2 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-css.js
  10. 3 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-dart.js
  11. 2 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-erlang.js
  12. 1 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-go.js
  13. 2 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-hs.js
  14. 3 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-lisp.js
  15. 1 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-llvm.js
  16. 2 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-lua.js
  17. 6 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-matlab.js
  18. 2 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-ml.js
  19. 2 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-mumps.js
  20. 4 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-n.js
  21. 3 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-pascal.js
  22. 1 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-proto.js
  23. 2 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-r.js
  24. 1 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-rd.js
  25. 2 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-scala.js
  26. 2 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-sql.js
  27. 3 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-tcl.js
  28. 1 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-tex.js
  29. 2 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-vb.js
  30. 3 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-vhdl.js
  31. 2 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-wiki.js
  32. 3 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-xq.js
  33. 2 0
      pboard/pboard/public/javascript/external/google-code-prettify/lang-yaml.js
  34. 30 0
      pboard/pboard/public/javascript/external/google-code-prettify/prettify.js
  35. 34 0
      pboard/pboard/public/javascript/external/google-code-prettify/run_prettify.js
  36. 100 0
      pboard/pboard/public/javascript/external/jquery.hotkeys.js
  37. 257 254
      pboard/pboard/templates/document.mak
  38. 282 166
      pboard/pboard/templates/master.mak

+ 1 - 0
pboard/pboard/public/css/external/google-code-prettify/prettify.css View File

@@ -0,0 +1 @@
1
+.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}

pboard/pboard/public/javascript/bootstrap-datetimepicker.min.js → pboard/pboard/public/javascript/external/bootstrap-datetimepicker.min.js View File


+ 201 - 0
pboard/pboard/public/javascript/external/bootstrap-wysiwyg.js View File

@@ -0,0 +1,201 @@
1
+/* http://github.com/mindmup/bootstrap-wysiwyg */
2
+/*global jQuery, $, FileReader*/
3
+/*jslint browser:true*/
4
+(function ($) {
5
+	'use strict';
6
+	var readFileIntoDataUrl = function (fileInfo) {
7
+		var loader = $.Deferred(),
8
+			fReader = new FileReader();
9
+		fReader.onload = function (e) {
10
+			loader.resolve(e.target.result);
11
+		};
12
+		fReader.onerror = loader.reject;
13
+		fReader.onprogress = loader.notify;
14
+		fReader.readAsDataURL(fileInfo);
15
+		return loader.promise();
16
+	};
17
+	$.fn.cleanHtml = function () {
18
+		var html = $(this).html();
19
+		return html && html.replace(/(<br>|\s|<div><br><\/div>|&nbsp;)*$/, '');
20
+	};
21
+	$.fn.wysiwyg = function (userOptions) {
22
+		var editor = this,
23
+			selectedRange,
24
+			options,
25
+			toolbarBtnSelector,
26
+			updateToolbar = function () {
27
+				if (options.activeToolbarClass) {
28
+					$(options.toolbarSelector).find(toolbarBtnSelector).each(function () {
29
+						var command = $(this).data(options.commandRole);
30
+						if (document.queryCommandState(command)) {
31
+							$(this).addClass(options.activeToolbarClass);
32
+						} else {
33
+							$(this).removeClass(options.activeToolbarClass);
34
+						}
35
+					});
36
+				}
37
+			},
38
+			execCommand = function (commandWithArgs, valueArg) {
39
+				var commandArr = commandWithArgs.split(' '),
40
+					command = commandArr.shift(),
41
+					args = commandArr.join(' ') + (valueArg || '');
42
+				document.execCommand(command, 0, args);
43
+				updateToolbar();
44
+			},
45
+			bindHotkeys = function (hotKeys) {
46
+				$.each(hotKeys, function (hotkey, command) {
47
+					editor.keydown(hotkey, function (e) {
48
+						if (editor.attr('contenteditable') && editor.is(':visible')) {
49
+							e.preventDefault();
50
+							e.stopPropagation();
51
+							execCommand(command);
52
+						}
53
+					}).keyup(hotkey, function (e) {
54
+						if (editor.attr('contenteditable') && editor.is(':visible')) {
55
+							e.preventDefault();
56
+							e.stopPropagation();
57
+						}
58
+					});
59
+				});
60
+			},
61
+			getCurrentRange = function () {
62
+				var sel = window.getSelection();
63
+				if (sel.getRangeAt && sel.rangeCount) {
64
+					return sel.getRangeAt(0);
65
+				}
66
+			},
67
+			saveSelection = function () {
68
+				selectedRange = getCurrentRange();
69
+			},
70
+			restoreSelection = function () {
71
+				var selection = window.getSelection();
72
+				if (selectedRange) {
73
+					try {
74
+						selection.removeAllRanges();
75
+					} catch (ex) {
76
+						document.body.createTextRange().select();
77
+						document.selection.empty();
78
+					}
79
+
80
+					selection.addRange(selectedRange);
81
+				}
82
+			},
83
+			insertFiles = function (files) {
84
+				editor.focus();
85
+				$.each(files, function (idx, fileInfo) {
86
+					if (/^image\//.test(fileInfo.type)) {
87
+						$.when(readFileIntoDataUrl(fileInfo)).done(function (dataUrl) {
88
+							execCommand('insertimage', dataUrl);
89
+						}).fail(function (e) {
90
+							options.fileUploadError("file-reader", e);
91
+						});
92
+					} else {
93
+						options.fileUploadError("unsupported-file-type", fileInfo.type);
94
+					}
95
+				});
96
+			},
97
+			markSelection = function (input, color) {
98
+				restoreSelection();
99
+				if (document.queryCommandSupported('hiliteColor')) {
100
+					document.execCommand('hiliteColor', 0, color || 'transparent');
101
+				}
102
+				saveSelection();
103
+				input.data(options.selectionMarker, color);
104
+			},
105
+			bindToolbar = function (toolbar, options) {
106
+				toolbar.find(toolbarBtnSelector).click(function () {
107
+					restoreSelection();
108
+					editor.focus();
109
+					execCommand($(this).data(options.commandRole));
110
+					saveSelection();
111
+				});
112
+				toolbar.find('[data-toggle=dropdown]').click(restoreSelection);
113
+
114
+				toolbar.find('input[type=text][data-' + options.commandRole + ']').on('webkitspeechchange change', function () {
115
+					var newValue = this.value; /* ugly but prevents fake double-calls due to selection restoration */
116
+					this.value = '';
117
+					restoreSelection();
118
+					if (newValue) {
119
+						editor.focus();
120
+						execCommand($(this).data(options.commandRole), newValue);
121
+					}
122
+					saveSelection();
123
+				}).on('focus', function () {
124
+					var input = $(this);
125
+					if (!input.data(options.selectionMarker)) {
126
+						markSelection(input, options.selectionColor);
127
+						input.focus();
128
+					}
129
+				}).on('blur', function () {
130
+					var input = $(this);
131
+					if (input.data(options.selectionMarker)) {
132
+						markSelection(input, false);
133
+					}
134
+				});
135
+				toolbar.find('input[type=file][data-' + options.commandRole + ']').change(function () {
136
+					restoreSelection();
137
+					if (this.type === 'file' && this.files && this.files.length > 0) {
138
+						insertFiles(this.files);
139
+					}
140
+					saveSelection();
141
+					this.value = '';
142
+				});
143
+			},
144
+			initFileDrops = function () {
145
+				editor.on('dragenter dragover', false)
146
+					.on('drop', function (e) {
147
+						var dataTransfer = e.originalEvent.dataTransfer;
148
+						e.stopPropagation();
149
+						e.preventDefault();
150
+						if (dataTransfer && dataTransfer.files && dataTransfer.files.length > 0) {
151
+							insertFiles(dataTransfer.files);
152
+						}
153
+					});
154
+			};
155
+		options = $.extend({}, $.fn.wysiwyg.defaults, userOptions);
156
+		toolbarBtnSelector = 'a[data-' + options.commandRole + '],button[data-' + options.commandRole + '],input[type=button][data-' + options.commandRole + ']';
157
+		bindHotkeys(options.hotKeys);
158
+		if (options.dragAndDropImages) {
159
+			initFileDrops();
160
+		}
161
+		bindToolbar($(options.toolbarSelector), options);
162
+		
163
+		editor.attr('contenteditable', true)
164
+			.on('mouseup keyup mouseout', function () {
165
+				saveSelection();
166
+				updateToolbar();
167
+			});
168
+		$(window).bind('touchend', function (e) {
169
+			var isInside = (editor.is(e.target) || editor.has(e.target).length > 0),
170
+				currentRange = getCurrentRange(),
171
+				clear = currentRange && (currentRange.startContainer === currentRange.endContainer && currentRange.startOffset === currentRange.endOffset);
172
+			if (!clear || isInside) {
173
+				saveSelection();
174
+				updateToolbar();
175
+			}
176
+		});
177
+		return this;
178
+	};
179
+	$.fn.wysiwyg.defaults = {
180
+		hotKeys: {
181
+			'ctrl+b meta+b': 'bold',
182
+			'ctrl+i meta+i': 'italic',
183
+			'ctrl+u meta+u': 'underline',
184
+			'ctrl+z meta+z': 'undo',
185
+			'ctrl+y meta+y meta+shift+z': 'redo',
186
+			'ctrl+l meta+l': 'justifyleft',
187
+			'ctrl+r meta+r': 'justifyright',
188
+			'ctrl+e meta+e': 'justifycenter',
189
+			'ctrl+j meta+j': 'justifyfull',
190
+			'shift+tab': 'outdent',
191
+			'tab': 'indent'
192
+		},
193
+		toolbarSelector: '[data-role=editor-toolbar]',
194
+		commandRole: 'edit',
195
+		activeToolbarClass: 'btn-info',
196
+		selectionMarker: 'edit-focus-marker',
197
+		selectionColor: 'darkgrey',
198
+		dragAndDropImages: true,
199
+		fileUploadError: function (reason, detail) { console.log("File upload error", reason, detail); }
200
+	};
201
+}(window.jQuery));

pboard/pboard/public/javascript/bootstrap.js → pboard/pboard/public/javascript/external/bootstrap.js View File


pboard/pboard/public/javascript/bootstrap.min.js → pboard/pboard/public/javascript/external/bootstrap.min.js View File


+ 2 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-apollo.js View File

@@ -0,0 +1,2 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
2
+null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]);

+ 3 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-basic.js View File

@@ -0,0 +1,3 @@
1
+var a=null;
2
+PR.registerLangHandler(PR.createSimpleLexer([["str",/^"(?:[^\n\r"\\]|\\.)*(?:"|$)/,a,'"'],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^REM[^\n\r]*/,a],["kwd",/^\b(?:AND|CLOSE|CLR|CMD|CONT|DATA|DEF ?FN|DIM|END|FOR|GET|GOSUB|GOTO|IF|INPUT|LET|LIST|LOAD|NEW|NEXT|NOT|ON|OPEN|OR|POKE|PRINT|READ|RESTORE|RETURN|RUN|SAVE|STEP|STOP|SYS|THEN|TO|VERIFY|WAIT)\b/,a],["pln",/^[a-z][^\W_]?(?:\$|%)?/i,a],["lit",/^(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/i,a,"0123456789"],["pun",
3
+/^.[^\s\w"$%.]*/,a]]),["basic","cbm"]);

+ 18 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-clj.js View File

@@ -0,0 +1,18 @@
1
+/*
2
+ Copyright (C) 2011 Google Inc.
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+*/
16
+var a=null;
17
+PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a],
18
+["typ",/^:[\dA-Za-z-]+/]]),["clj"]);

+ 2 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-css.js View File

@@ -0,0 +1,2 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n\u000c"]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]+)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],
2
+["com",/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}\b/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);

+ 3 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-dart.js View File

@@ -0,0 +1,3 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["com",/^#!.*/],["kwd",/^\b(?:import|library|part of|part|as|show|hide)\b/i],["com",/^\/\/.*/],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["kwd",/^\b(?:class|interface)\b/i],["kwd",/^\b(?:assert|break|case|catch|continue|default|do|else|finally|for|if|in|is|new|return|super|switch|this|throw|try|while)\b/i],["kwd",/^\b(?:abstract|const|extends|factory|final|get|implements|native|operator|set|static|typedef|var)\b/i],
2
+["typ",/^\b(?:bool|double|dynamic|int|num|object|string|void)\b/i],["kwd",/^\b(?:false|null|true)\b/i],["str",/^r?'''[\S\s]*?[^\\]'''/],["str",/^r?"""[\S\s]*?[^\\]"""/],["str",/^r?'('|[^\n\f\r]*?[^\\]')/],["str",/^r?"("|[^\n\f\r]*?[^\\]")/],["pln",/^[$_a-z]\w*/i],["pun",/^[!%&*+/:<-?^|~-]/],["lit",/^\b0x[\da-f]+/i],["lit",/^\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i],["lit",/^\b\.\d+(?:e[+-]?\d+)?/i],["pun",/^[(),.;[\]{}]/]]),
3
+["dart"]);

+ 2 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-erlang.js View File

@@ -0,0 +1,2 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["lit",/^[a-z]\w*/],["lit",/^'(?:[^\n\f\r'\\]|\\[^&])+'?/,null,"'"],["lit",/^\?[^\t\n ({]+/,null,"?"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^%[^\n]*/],["kwd",/^(?:module|attributes|do|let|in|letrec|apply|call|primop|case|of|end|when|fun|try|catch|receive|after|char|integer|float,atom,string,var)\b/],
2
+["kwd",/^-[_a-z]+/],["typ",/^[A-Z_]\w*/],["pun",/^[,.;]/]]),["erlang","erl"]);

+ 1 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-go.js View File

@@ -0,0 +1 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]);

+ 2 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-hs.js View File

@@ -0,0 +1,2 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/,
2
+null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]);

+ 3 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-lisp.js View File

@@ -0,0 +1,3 @@
1
+var a=null;
2
+PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
3
+["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","lsp","scm","ss","rkt"]);

+ 1 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-llvm.js View File

@@ -0,0 +1 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^!?"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["com",/^;[^\n\r]*/,null,";"]],[["pln",/^[!%@](?:[$\-.A-Z_a-z][\w$\-.]*|\d+)/],["kwd",/^[^\W\d]\w*/,null],["lit",/^\d+\.\d+/],["lit",/^(?:\d+|0[Xx][\dA-Fa-f]+)/],["pun",/^[(-*,:<->[\]{}]|\.\.\.$/]]),["llvm","ll"]);

+ 2 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-lua.js View File

@@ -0,0 +1,2 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],
2
+["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]);

File diff suppressed because it is too large
+ 6 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-matlab.js


+ 2 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-ml.js View File

@@ -0,0 +1,2 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
2
+["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]);

+ 2 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-mumps.js View File

@@ -0,0 +1,2 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"]|\\.)*"/,null,'"']],[["com",/^;[^\n\r]*/,null,";"],["dec",/^\$(?:d|device|ec|ecode|es|estack|et|etrap|h|horolog|i|io|j|job|k|key|p|principal|q|quit|st|stack|s|storage|sy|system|t|test|tl|tlevel|tr|trestart|x|y|z[a-z]*|a|ascii|c|char|d|data|e|extract|f|find|fn|fnumber|g|get|j|justify|l|length|na|name|o|order|p|piece|ql|qlength|qs|qsubscript|q|query|r|random|re|reverse|s|select|st|stack|t|text|tr|translate|nan)\b/i,
2
+null],["kwd",/^(?:[^$]b|break|c|close|d|do|e|else|f|for|g|goto|h|halt|h|hang|i|if|j|job|k|kill|l|lock|m|merge|n|new|o|open|q|quit|r|read|s|set|tc|tcommit|tre|trestart|tro|trollback|ts|tstart|u|use|v|view|w|write|x|xecute)\b/i,null],["lit",/^[+-]?(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?/i],["pln",/^[a-z][^\W_]*/i],["pun",/^[^\w\t\n\r"$%;^\xa0]|_/]]),["mumps"]);

+ 4 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-n.js View File

@@ -0,0 +1,4 @@
1
+var a=null;
2
+PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/,
3
+a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/,
4
+a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]);

+ 3 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-pascal.js View File

@@ -0,0 +1,3 @@
1
+var a=null;
2
+PR.registerLangHandler(PR.createSimpleLexer([["str",/^'(?:[^\n\r'\\]|\\.)*(?:'|$)/,a,"'"],["pln",/^\s+/,a," \r\n\t\u00a0"]],[["com",/^\(\*[\S\s]*?(?:\*\)|$)|^{[\S\s]*?(?:}|$)/,a],["kwd",/^(?:absolute|and|array|asm|assembler|begin|case|const|constructor|destructor|div|do|downto|else|end|external|for|forward|function|goto|if|implementation|in|inline|interface|interrupt|label|mod|not|object|of|or|packed|procedure|program|record|repeat|set|shl|shr|then|to|type|unit|until|uses|var|virtual|while|with|xor)\b/i,a],
3
+["lit",/^(?:true|false|self|nil)/i,a],["pln",/^[a-z][^\W_]*/i,a],["lit",/^(?:\$[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)/i,a,"0123456789"],["pun",/^.[^\s\w$'./@]*/,a]]),["pascal"]);

+ 1 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-proto.js View File

@@ -0,0 +1 @@
1
+PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]);

+ 2 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-r.js View File

@@ -0,0 +1,2 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^'\\]|\\[\S\s])*(?:'|$)/,null,"'"]],[["com",/^#.*/],["kwd",/^(?:if|else|for|while|repeat|in|next|break|return|switch|function)(?![\w.])/],["lit",/^0[Xx][\dA-Fa-f]+([Pp]\d+)?[Li]?/],["lit",/^[+-]?(\d+(\.\d+)?|\.\d+)([Ee][+-]?\d+)?[Li]?/],["lit",/^(?:NULL|NA(?:_(?:integer|real|complex|character)_)?|Inf|TRUE|FALSE|NaN|\.\.(?:\.|\d+))(?![\w.])/],
2
+["pun",/^(?:<<?-|->>?|-|==|<=|>=|<|>|&&?|!=|\|\|?|[!*+/^]|%.*?%|[$=@~]|:{1,3}|[(),;?[\]{}])/],["pln",/^(?:[A-Za-z]+[\w.]*|\.[^\W\d][\w.]*)(?![\w.])/],["str",/^`.+`/]]),["r","s","R","S","Splus"]);

+ 1 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-rd.js View File

@@ -0,0 +1 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["lit",/^\\(?:cr|l?dots|R|tab)\b/],["kwd",/^\\[@-Za-z]+/],["kwd",/^#(?:ifn?def|endif)/],["pln",/^\\[{}]/],["pun",/^[()[\]{}]+/]]),["Rd","rd"]);

+ 2 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-scala.js View File

@@ -0,0 +1,2 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
2
+["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]);

+ 2 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-sql.js View File

@@ -0,0 +1,2 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|apply|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|connect|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|following|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|matched|merge|natural|national|nocheck|nonclustered|nocycle|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|partition|percent|pivot|plan|preceding|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rows?|rule|save|schema|select|session_user|set|setuser|shutdown|some|start|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|unbounded|union|unique|unpivot|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|within|writetext|xml)(?=[^\w-]|$)/i,
2
+null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]);

+ 3 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-tcl.js View File

@@ -0,0 +1,3 @@
1
+var a=null;
2
+PR.registerLangHandler(PR.createSimpleLexer([["opn",/^{+/,a,"{"],["clo",/^}+/,a,"}"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \u00a0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:after|append|apply|array|break|case|catch|continue|error|eval|exec|exit|expr|for|foreach|if|incr|info|proc|return|set|switch|trace|uplevel|upvar|while)\b/,a],["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",
3
+/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["tcl"]);

+ 1 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-tex.js View File

@@ -0,0 +1 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]);

+ 2 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-vb.js View File

@@ -0,0 +1,2 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"\u201c\u201d'],["com",/^['\u2018\u2019](?:_(?:\r\n?|[^\r]?)|[^\n\r_\u2028\u2029])*/,null,"'\u2018\u2019"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i,
2
+null],["com",/^rem\b.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*(?:\[[!#%&@]+])?|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]);

+ 3 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-vhdl.js View File

@@ -0,0 +1,3 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
2
+null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i],
3
+["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]);

+ 2 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-wiki.js View File

@@ -0,0 +1,2 @@
1
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]);
2
+PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]);

File diff suppressed because it is too large
+ 3 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-xq.js


+ 2 - 0
pboard/pboard/public/javascript/external/google-code-prettify/lang-yaml.js View File

@@ -0,0 +1,2 @@
1
+var a=null;
2
+PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]);

+ 30 - 0
pboard/pboard/public/javascript/external/google-code-prettify/prettify.js View File

@@ -0,0 +1,30 @@
1
+!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
2
+(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=
3
+b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a<f;++a){var h=b[a];if(/\\[bdsw]/i.test(h))c.push(h);else{var h=d(h),l;a+2<f&&"-"===b[a+1]?(l=d(b[a+2]),a+=2):l=h;e.push([h,l]);l<65||h>122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;a<e.length;++a)h=e[a],h[0]<=f[1]+1?f[1]=Math.max(f[1],h[1]):b.push(f=h);for(a=0;a<b.length;++a)h=b[a],c.push(g(h[0])),
4
+h[1]>h[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f<c;++f){var l=a[f];l==="("?++h:"\\"===l.charAt(0)&&(l=+l.substring(1))&&(l<=h?d[l]=-1:a[f]=g(l))}for(f=1;f<d.length;++f)-1===d[f]&&(d[f]=++x);for(h=f=0;f<c;++f)l=a[f],l==="("?(++h,d[h]||(a[f]="(?:")):"\\"===l.charAt(0)&&(l=+l.substring(1))&&l<=h&&
5
+(a[f]="\\"+d[l]);for(f=0;f<c;++f)"^"===a[f]&&"^"!==a[f+1]&&(a[f]="");if(e.ignoreCase&&m)for(f=0;f<c;++f)l=a[f],e=l.charAt(0),l.length>=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k<c;++k){var i=a[k];if(i.ignoreCase)j=!0;else if(/[a-z]/i.test(i.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){m=!0;j=!1;break}}for(var r={b:8,t:9,n:10,v:11,
6
+f:12,r:13},n=[],k=0,c=a.length;k<c;++k){i=a[k];if(i.global||i.multiline)throw Error(""+i);n.push("(?:"+s(i)+")")}return RegExp(n.join("|"),j?"gi":"g")}function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)g(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)s[j]="\n",m[j<<1]=x++,m[j++<<1|1]=a}}else if(c==3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),s[j]=c,m[j<<1]=x,x+=c.length,m[j++<<1|1]=
7
+a)}var b=/(?:^|\s)nocode(?:\s|$)/,s=[],x=0,m=[],j=0;g(a);return{a:s.join("").replace(/\n$/,""),d:m}}function H(a,d,g,b){d&&(a={a:d,e:a},g(a),b.push.apply(b,a.g))}function U(a){for(var d=void 0,g=a.firstChild;g;g=g.nextSibling)var b=g.nodeType,d=b===1?d?a:g:b===3?V.test(g.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function g(a){for(var j=a.e,k=[j,"pln"],c=0,i=a.a.match(s)||[],r={},n=0,e=i.length;n<e;++n){var z=i[n],w=r[z],t=void 0,f;if(typeof w==="string")f=!1;else{var h=b[z.charAt(0)];
8
+if(h)t=z.match(h[1]),w=h[0];else{for(f=0;f<x;++f)if(h=d[f],t=z.match(h[1])){w=h[0];break}t||(w="pln")}if((f=w.length>=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c<i;++c){var r=
9
+g[c],n=r[3];if(n)for(var e=n.length;--e>=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
10
+q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com",
11
+/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+
12
+s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,
13
+q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=
14
+c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i<c.length;++i)b(c[i]);d===(d|0)&&c[0].setAttribute("value",d);var r=j.createElement("ol");
15
+r.className="linenums";for(var d=Math.max(0,d-1|0)||0,i=0,n=c.length;i<n;++i)k=c[i],k.className="L"+(i+d)%10,k.firstChild||k.appendChild(j.createTextNode("\u00a0")),r.appendChild(k);a.appendChild(r)}function p(a,d){for(var g=d.length;--g>=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";return F[a]}function K(a){var d=a.h;try{var g=T(a.c,a.i),b=g.a;
16
+a.a=b;a.d=g.d;a.e=0;I(d,b)(a);var s=/\bMSIE\s(\d+)/.exec(navigator.userAgent),s=s&&+s[1]<=8,d=/\n/g,x=a.a,m=x.length,g=0,j=a.d,k=j.length,b=0,c=a.g,i=c.length,r=0;c[i]=m;var n,e;for(e=n=0;e<i;)c[e]!==c[e+2]?(c[n++]=c[e++],c[n++]=c[e++]):e+=2;i=n;for(e=n=0;e<i;){for(var p=c[e],w=c[e+1],t=e+2;t+2<=i&&c[t+1]===w;)t+=2;c[n++]=p;c[n++]=w;e=t}c.length=n;var f=a.c,h;if(f)h=f.style.display,f.style.display="none";try{for(;b<k;){var l=j[b+2]||m,B=c[r+2]||m,t=Math.min(l,B),A=j[b+1],G;if(A.nodeType!==1&&(G=x.substring(g,
17
+t))){s&&(G=G.replace(d,"\r"));A.nodeValue=G;var L=A.ownerDocument,o=L.createElement("span");o.className=c[r+1];var v=A.parentNode;v.replaceChild(o,A);o.appendChild(A);g<l&&(j[b+1]=A=L.createTextNode(x.substring(t,l)),v.insertBefore(A,o.nextSibling))}g=t;g>=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
18
+"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
19
+O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
20
+Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
21
+V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
22
+/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],
23
+["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}),
24
+["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q,
25
+hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);
26
+p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1});
27
+return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i<p.length&&c.now()<b;i++){for(var d=p[i],j=h,k=d;k=k.previousSibling;){var m=k.nodeType,o=(m===7||m===8)&&k.nodeValue;if(o?!/^\??prettify\b/.test(o):m!==3||/\S/.test(k.nodeValue))break;if(o){j={};o.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(a,b,c){j[b]=c});break}}k=d.className;if((j!==h||e.test(k))&&!v.test(k)){m=!1;for(o=d.parentNode;o;o=o.parentNode)if(f.test(o.tagName)&&
28
+o.className&&e.test(o.className)){m=!0;break}if(!m){d.className+=" prettyprinted";m=j.lang;if(!m){var m=k.match(n),y;if(!m&&(y=U(d))&&t.test(y.tagName))m=y.className.match(n);m&&(m=m[1])}if(w.test(d.tagName))o=1;else var o=d.currentStyle,u=s.defaultView,o=(o=o?o.whiteSpace:u&&u.getComputedStyle?u.getComputedStyle(d,q).getPropertyValue("white-space"):0)&&"pre"===o.substring(0,3);u=j.linenums;if(!(u=u==="true"||+u))u=(u=k.match(/\blinenums\b(?::(\d+))?/))?u[1]&&u[1].length?+u[1]:!0:!1;u&&J(d,u,o);r=
29
+{h:m,c:d,j:u,i:o};K(r)}}}i<p.length?setTimeout(g,250):"function"===typeof a&&a()}for(var b=d||document.body,s=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],p=[],m=0;m<b.length;++m)for(var j=0,k=b[m].length;j<k;++j)p.push(b[m][j]);var b=q,c=Date;c.now||(c={now:function(){return+new Date}});var i=0,r,n=/\blang(?:uage)?-([\w.]+)(?!\S)/,e=/\bprettyprint\b/,v=/\bprettyprinted\b/,w=/pre|xmp/i,t=/^code$/i,f=/^(?:pre|code|xmp)$/i,
30
+h={};g()}};typeof define==="function"&&define.amd&&define("google-code-prettify",[],function(){return Y})})();}()

+ 34 - 0
pboard/pboard/public/javascript/external/google-code-prettify/run_prettify.js View File

@@ -0,0 +1,34 @@
1
+!function(){var r=null;
2
+(function(){function X(e){function j(){try{J.doScroll("left")}catch(e){P(j,50);return}w("poll")}function w(j){if(!(j.type=="readystatechange"&&x.readyState!="complete")&&((j.type=="load"?n:x)[z](i+j.type,w,!1),!m&&(m=!0)))e.call(n,j.type||j)}var Y=x.addEventListener,m=!1,C=!0,t=Y?"addEventListener":"attachEvent",z=Y?"removeEventListener":"detachEvent",i=Y?"":"on";if(x.readyState=="complete")e.call(n,"lazy");else{if(x.createEventObject&&J.doScroll){try{C=!n.frameElement}catch(A){}C&&j()}x[t](i+"DOMContentLoaded",
3
+w,!1);x[t](i+"readystatechange",w,!1);n[t](i+"load",w,!1)}}function Q(){S&&X(function(){var e=K.length;$(e?function(){for(var j=0;j<e;++j)(function(e){P(function(){n.exports[K[e]].apply(n,arguments)},0)})(j)}:void 0)})}for(var n=window,P=n.setTimeout,x=document,J=x.documentElement,L=x.head||x.getElementsByTagName("head")[0]||J,z="",A=x.scripts,m=A.length;--m>=0;){var M=A[m],T=M.src.match(/^[^#?]*\/run_prettify\.js(\?[^#]*)?(?:#.*)?$/);if(T){z=T[1]||"";M.parentNode.removeChild(M);break}}var S=!0,D=
4
+[],N=[],K=[];z.replace(/[&?]([^&=]+)=([^&]+)/g,function(e,j,w){w=decodeURIComponent(w);j=decodeURIComponent(j);j=="autorun"?S=!/^[0fn]/i.test(w):j=="lang"?D.push(w):j=="skin"?N.push(w):j=="callback"&&K.push(w)});m=0;for(z=D.length;m<z;++m)(function(){var e=x.createElement("script");e.onload=e.onerror=e.onreadystatechange=function(){if(e&&(!e.readyState||/loaded|complete/.test(e.readyState)))e.onerror=e.onload=e.onreadystatechange=r,--R,R||P(Q,0),e.parentNode&&e.parentNode.removeChild(e),e=r};e.type=
5
+"text/javascript";e.src="https://google-code-prettify.googlecode.com/svn/loader/lang-"+encodeURIComponent(D[m])+".js";L.insertBefore(e,L.firstChild)})(D[m]);for(var R=D.length,A=[],m=0,z=N.length;m<z;++m)A.push("https://google-code-prettify.googlecode.com/svn/loader/skins/"+encodeURIComponent(N[m])+".css");A.push("https://google-code-prettify.googlecode.com/svn/loader/prettify.css");(function(e){function j(m){if(m!==w){var n=x.createElement("link");n.rel="stylesheet";n.type="text/css";if(m+1<w)n.error=
6
+n.onerror=function(){j(m+1)};n.href=e[m];L.appendChild(n)}}var w=e.length;j(0)})(A);var $=function(){window.PR_SHOULD_USE_CONTINUATION=!0;var e;(function(){function j(a){function d(f){var b=f.charCodeAt(0);if(b!==92)return b;var a=f.charAt(1);return(b=i[a])?b:"0"<=a&&a<="7"?parseInt(f.substring(1),8):a==="u"||a==="x"?parseInt(f.substring(2),16):f.charCodeAt(1)}function h(f){if(f<32)return(f<16?"\\x0":"\\x")+f.toString(16);f=String.fromCharCode(f);return f==="\\"||f==="-"||f==="]"||f==="^"?"\\"+f:
7
+f}function b(f){var b=f.substring(1,f.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),f=[],a=b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,g=b.length;a<g;++a){var k=b[a];if(/\\[bdsw]/i.test(k))c.push(k);else{var k=d(k),o;a+2<g&&"-"===b[a+1]?(o=d(b[a+2]),a+=2):o=k;f.push([k,o]);o<65||k>122||(o<65||k>90||f.push([Math.max(65,k)|32,Math.min(o,90)|32]),o<97||k>122||f.push([Math.max(97,k)&-33,Math.min(o,122)&-33]))}}f.sort(function(f,a){return f[0]-
8
+a[0]||a[1]-f[1]});b=[];g=[];for(a=0;a<f.length;++a)k=f[a],k[0]<=g[1]+1?g[1]=Math.max(g[1],k[1]):b.push(g=k);for(a=0;a<b.length;++a)k=b[a],c.push(h(k[0])),k[1]>k[0]&&(k[1]+1>k[0]&&c.push("-"),c.push(h(k[1])));c.push("]");return c.join("")}function e(f){for(var a=f.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],g=0,k=0;g<c;++g){var o=a[g];o==="("?++k:"\\"===o.charAt(0)&&(o=+o.substring(1))&&(o<=k?d[o]=-1:a[g]=h(o))}for(g=
9
+1;g<d.length;++g)-1===d[g]&&(d[g]=++j);for(k=g=0;g<c;++g)o=a[g],o==="("?(++k,d[k]||(a[g]="(?:")):"\\"===o.charAt(0)&&(o=+o.substring(1))&&o<=k&&(a[g]="\\"+d[o]);for(g=0;g<c;++g)"^"===a[g]&&"^"!==a[g+1]&&(a[g]="");if(f.ignoreCase&&F)for(g=0;g<c;++g)o=a[g],f=o.charAt(0),o.length>=2&&f==="["?a[g]=b(o):f!=="\\"&&(a[g]=o.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var j=0,F=!1,l=!1,I=0,c=a.length;I<c;++I){var p=a[I];if(p.ignoreCase)l=
10
+!0;else if(/[a-z]/i.test(p.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){F=!0;l=!1;break}}for(var i={b:8,t:9,n:10,v:11,f:12,r:13},q=[],I=0,c=a.length;I<c;++I){p=a[I];if(p.global||p.multiline)throw Error(""+p);q.push("(?:"+e(p)+")")}return RegExp(q.join("|"),l?"gi":"g")}function m(a,d){function h(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)h(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)e[l]="\n",F[l<<1]=j++,F[l++<<1|1]=a}}else if(c==
11
+3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),e[l]=c,F[l<<1]=j,j+=c.length,F[l++<<1|1]=a)}var b=/(?:^|\s)nocode(?:\s|$)/,e=[],j=0,F=[],l=0;h(a);return{a:e.join("").replace(/\n$/,""),d:F}}function n(a,d,h,b){d&&(a={a:d,e:a},h(a),b.push.apply(b,a.g))}function x(a){for(var d=void 0,h=a.firstChild;h;h=h.nextSibling)var b=h.nodeType,d=b===1?d?a:h:b===3?S.test(h.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function h(a){for(var l=a.e,j=[l,"pln"],c=
12
+0,p=a.a.match(e)||[],m={},q=0,f=p.length;q<f;++q){var B=p[q],y=m[B],u=void 0,g;if(typeof y==="string")g=!1;else{var k=b[B.charAt(0)];if(k)u=B.match(k[1]),y=k[0];else{for(g=0;g<i;++g)if(k=d[g],u=B.match(k[1])){y=k[0];break}u||(y="pln")}if((g=y.length>=5&&"lang-"===y.substring(0,5))&&!(u&&typeof u[1]==="string"))g=!1,y="src";g||(m[B]=y)}k=c;c+=B.length;if(g){g=u[1];var o=B.indexOf(g),H=o+g.length;u[2]&&(H=B.length-u[2].length,o=H-g.length);y=y.substring(5);n(l+k,B.substring(0,o),h,j);n(l+k+o,g,A(y,
13
+g),j);n(l+k+H,B.substring(H),h,j)}else j.push(l+k,y)}a.g=j}var b={},e;(function(){for(var h=a.concat(d),l=[],i={},c=0,p=h.length;c<p;++c){var m=h[c],q=m[3];if(q)for(var f=q.length;--f>=0;)b[q.charAt(f)]=m;m=m[1];q=""+m;i.hasOwnProperty(q)||(l.push(m),i[q]=r)}l.push(/[\S\s]/);e=j(l)})();var i=d.length;return h}function t(a){var d=[],h=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,
14
+r,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,r,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,r,"\"'"]);a.verbatimStrings&&h.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,r]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,r,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,
15
+r,"#"]),h.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,r])):d.push(["com",/^#[^\n\r]*/,r,"#"]));a.cStyleComments&&(h.push(["com",/^\/\/[^\n\r]*/,r]),h.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,r]));if(b=a.regexLiterals){var e=(b=b>1?"":"\n\r")?".":"[\\S\\s]";h.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+
16
+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+e+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+e+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&h.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&h.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),r]);d.push(["pln",/^\s+/,r," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");h.push(["lit",/^@[$_a-z][\w$@]*/i,r],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,r],["pln",/^[$_a-z][\w$@]*/i,r],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,
17
+r,"0123456789"],["pln",/^\\[\S\s]?/,r],["pun",RegExp(b),r]);return C(d,h)}function z(a,d,h){function b(a){var c=a.nodeType;if(c==1&&!j.test(a.className))if("br"===a.nodeName)e(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&h){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(l.createTextNode(d),a.nextSibling),e(a),c||a.parentNode.removeChild(a)}}
18
+function e(a){function b(a,c){var d=c?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),h=a.nextSibling;f.appendChild(d);for(var e=h;e;e=h)h=e.nextSibling,f.appendChild(e)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var j=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,l=a.ownerDocument,i=l.createElement("li");a.firstChild;)i.appendChild(a.firstChild);for(var c=[i],p=0;p<c.length;++p)b(c[p]);d===(d|0)&&c[0].setAttribute("value",
19
+d);var n=l.createElement("ol");n.className="linenums";for(var d=Math.max(0,d-1|0)||0,p=0,q=c.length;p<q;++p)i=c[p],i.className="L"+(p+d)%10,i.firstChild||i.appendChild(l.createTextNode("\u00a0")),n.appendChild(i);a.appendChild(n)}function i(a,d){for(var h=d.length;--h>=0;){var b=d[h];U.hasOwnProperty(b)?V.console&&console.warn("cannot override language handler %s",b):U[b]=a}}function A(a,d){if(!a||!U.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";return U[a]}function D(a){var d=
20
+a.h;try{var h=m(a.c,a.i),b=h.a;a.a=b;a.d=h.d;a.e=0;A(d,b)(a);var e=/\bMSIE\s(\d+)/.exec(navigator.userAgent),e=e&&+e[1]<=8,d=/\n/g,i=a.a,j=i.length,h=0,l=a.d,n=l.length,b=0,c=a.g,p=c.length,t=0;c[p]=j;var q,f;for(f=q=0;f<p;)c[f]!==c[f+2]?(c[q++]=c[f++],c[q++]=c[f++]):f+=2;p=q;for(f=q=0;f<p;){for(var x=c[f],y=c[f+1],u=f+2;u+2<=p&&c[u+1]===y;)u+=2;c[q++]=x;c[q++]=y;f=u}c.length=q;var g=a.c,k;if(g)k=g.style.display,g.style.display="none";try{for(;b<n;){var o=l[b+2]||j,H=c[t+2]||j,u=Math.min(o,H),E=l[b+
21
+1],W;if(E.nodeType!==1&&(W=i.substring(h,u))){e&&(W=W.replace(d,"\r"));E.nodeValue=W;var Z=E.ownerDocument,s=Z.createElement("span");s.className=c[t+1];var z=E.parentNode;z.replaceChild(s,E);s.appendChild(E);h<o&&(l[b+1]=E=Z.createTextNode(i.substring(u,o)),z.insertBefore(E,s.nextSibling))}h=u;h>=o&&(b+=2);h>=H&&(t+=2)}}finally{if(g)g.style.display=k}}catch(v){V.console&&console.log(v&&v.stack||v)}}var V=window,G=["break,continue,do,else,for,if,return,while"],O=[[G,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
22
+"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],J=[O,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],K=[O,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
23
+L=[K,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],O=[O,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],M=[G,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
24
+N=[G,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],R=[G,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],G=[G,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],Q=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
25
+S=/\S/,T=t({keywords:[J,L,O,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",M,N,G],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),U={};i(T,["default-code"]);i(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
26
+/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);i(C([["pln",/^\s+/,r," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,r,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],
27
+["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);i(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);i(t({keywords:J,hashComments:!0,cStyleComments:!0,types:Q}),["c","cc","cpp","cxx","cyc","m"]);i(t({keywords:"null,true,false"}),["json"]);i(t({keywords:L,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Q}),
28
+["cs"]);i(t({keywords:K,cStyleComments:!0}),["java"]);i(t({keywords:G,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);i(t({keywords:M,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);i(t({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);i(t({keywords:N,
29
+hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);i(t({keywords:O,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);i(t({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);i(t({keywords:R,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);
30
+i(C([],[["str",/^[\S\s]+/]]),["regex"]);var X=V.PR={createSimpleLexer:C,registerLangHandler:i,sourceDecorator:t,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:function(a,d,e){var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;e&&z(b,e,!0);D({h:d,j:e,c:b,i:1});return b.innerHTML},
31
+prettyPrint:e=e=function(a,d){function e(){for(var b=V.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;p<j.length&&c.now()<b;p++){for(var d=j[p],m=k,l=d;l=l.previousSibling;){var n=l.nodeType,s=(n===7||n===8)&&l.nodeValue;if(s?!/^\??prettify\b/.test(s):n!==3||/\S/.test(l.nodeValue))break;if(s){m={};s.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(a,b,c){m[b]=c});break}}l=d.className;if((m!==k||f.test(l))&&!w.test(l)){n=!1;for(s=d.parentNode;s;s=s.parentNode)if(g.test(s.tagName)&&s.className&&f.test(s.className)){n=
32
+!0;break}if(!n){d.className+=" prettyprinted";n=m.lang;if(!n){var n=l.match(q),A;if(!n&&(A=x(d))&&u.test(A.tagName))n=A.className.match(q);n&&(n=n[1])}if(y.test(d.tagName))s=1;else var s=d.currentStyle,v=i.defaultView,s=(s=s?s.whiteSpace:v&&v.getComputedStyle?v.getComputedStyle(d,r).getPropertyValue("white-space"):0)&&"pre"===s.substring(0,3);v=m.linenums;if(!(v=v==="true"||+v))v=(v=l.match(/\blinenums\b(?::(\d+))?/))?v[1]&&v[1].length?+v[1]:!0:!1;v&&z(d,v,s);t={h:n,c:d,j:v,i:s};D(t)}}}p<j.length?
33
+P(e,250):"function"===typeof a&&a()}for(var b=d||document.body,i=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],j=[],m=0;m<b.length;++m)for(var l=0,n=b[m].length;l<n;++l)j.push(b[m][l]);var b=r,c=Date;c.now||(c={now:function(){return+new Date}});var p=0,t,q=/\blang(?:uage)?-([\w.]+)(?!\S)/,f=/\bprettyprint\b/,w=/\bprettyprinted\b/,y=/pre|xmp/i,u=/^code$/i,g=/^(?:pre|code|xmp)$/i,k={};e()}};typeof define==="function"&&define.amd&&
34
+define("google-code-prettify",[],function(){return X})})();return e}();R||P(Q,0)})();}()

+ 100 - 0
pboard/pboard/public/javascript/external/jquery.hotkeys.js View File

@@ -0,0 +1,100 @@
1
+/*
2
+ * jQuery Hotkeys Plugin
3
+ * Copyright 2010, John Resig
4
+ * Dual licensed under the MIT or GPL Version 2 licenses.
5
+ *
6
+ * Based upon the plugin by Tzury Bar Yochay:
7
+ * http://github.com/tzuryby/hotkeys
8
+ *
9
+ * Original idea by:
10
+ * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/
11
+*/
12
+
13
+(function(jQuery){
14
+	
15
+	jQuery.hotkeys = {
16
+		version: "0.8",
17
+
18
+		specialKeys: {
19
+			8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause",
20
+			20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home",
21
+			37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del", 
22
+			96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7",
23
+			104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111 : "/", 
24
+			112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8", 
25
+			120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 191: "/", 224: "meta"
26
+		},
27
+	
28
+		shiftNums: {
29
+			"`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&", 
30
+			"8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ": ", "'": "\"", ",": "<", 
31
+			".": ">",  "/": "?",  "\\": "|"
32
+		}
33
+	};
34
+
35
+	function keyHandler( handleObj ) {
36
+		// Only care when a possible input has been specified
37
+		if ( typeof handleObj.data !== "string" ) {
38
+			return;
39
+		}
40
+		
41
+		var origHandler = handleObj.handler,
42
+			keys = handleObj.data.toLowerCase().split(" "),
43
+			textAcceptingInputTypes = ["text", "password", "number", "email", "url", "range", "date", "month", "week", "time", "datetime", "datetime-local", "search", "color"];
44
+	
45
+		handleObj.handler = function( event ) {
46
+			// Don't fire in text-accepting inputs that we didn't directly bind to
47
+			if ( this !== event.target && (/textarea|select/i.test( event.target.nodeName ) ||
48
+				jQuery.inArray(event.target.type, textAcceptingInputTypes) > -1 ) ) {
49
+				return;
50
+			}
51
+			
52
+			// Keypress represents characters, not special keys
53
+			var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[ event.which ],
54
+				character = String.fromCharCode( event.which ).toLowerCase(),
55
+				key, modif = "", possible = {};
56
+
57
+			// check combinations (alt|ctrl|shift+anything)
58
+			if ( event.altKey && special !== "alt" ) {
59
+				modif += "alt+";
60
+			}
61
+
62
+			if ( event.ctrlKey && special !== "ctrl" ) {
63
+				modif += "ctrl+";
64
+			}
65
+			
66
+			// TODO: Need to make sure this works consistently across platforms
67
+			if ( event.metaKey && !event.ctrlKey && special !== "meta" ) {
68
+				modif += "meta+";
69
+			}
70
+
71
+			if ( event.shiftKey && special !== "shift" ) {
72
+				modif += "shift+";
73
+			}
74
+
75
+			if ( special ) {
76
+				possible[ modif + special ] = true;
77
+
78
+			} else {
79
+				possible[ modif + character ] = true;
80
+				possible[ modif + jQuery.hotkeys.shiftNums[ character ] ] = true;
81
+
82
+				// "$" can be triggered as "Shift+4" or "Shift+$" or just "$"
83
+				if ( modif === "shift+" ) {
84
+					possible[ jQuery.hotkeys.shiftNums[ character ] ] = true;
85
+				}
86
+			}
87
+
88
+			for ( var i = 0, l = keys.length; i < l; i++ ) {
89
+				if ( possible[ keys[i] ] ) {
90
+					return origHandler.apply( this, arguments );
91
+				}
92
+			}
93
+		};
94
+	}
95
+
96
+	jQuery.each([ "keydown", "keyup", "keypress" ], function() {
97
+		jQuery.event.special[ this ] = { add: keyHandler };
98
+	});
99
+
100
+})( jQuery );

+ 257 - 254
pboard/pboard/templates/document.mak View File

@@ -24,12 +24,12 @@
24 24
 <%def name="node_treeview(node_list, indentation=-1)">
25 25
   % if indentation==-1:
26 26
     <div id='pod-menu-item-0' class="pod-toolbar-parent" style="padding-left: 0.5em; position: relative;">
27
-      <a class="toggle-child-menu-items"><i class='icon-g-folder-open'></i></a>
27
+      <a class="toggle-child-menu-items"><i class='fa fa-folder-open'></i></a>
28 28
       <a href="?node=0" title="${_('Root')}">
29 29
         ${_('Root')}
30 30
       </a>
31 31
       <div class="pod-toolbar">
32
-        <a href="${tg.url('/api/create_document?parent_id=0')}" title="${_('Add child document')}"><i class="icon-g-circle-plus"></i></a>
32
+        <a href="${tg.url('/api/create_document?parent_id=0')}" title="${_('Add child document')}"><i class="fa fa-plus-circle"></i></a>
33 33
       </div>
34 34
     </div>
35 35
     <div id="pod-menu-item-0-children">${node_treeview(node_list, 0)}</div>
@@ -49,9 +49,9 @@
49 49
             % endif
50 50
           </a>
51 51
           <div class="pod-toolbar">
52
-            <a href="${tg.url('/api/move_node_upper?node_id=%i'%(node.node_id))}" title="${_('Move up')}"><i class="icon-g-up-arrow"></i></a>
53
-            <a href="${tg.url('/api/move_node_lower?node_id=%i'%(node.node_id))}" title="${_('Move down')}"><i class="icon-g-down-arrow"></i></a>
54
-            <a href="${tg.url('/api/create_document?parent_id=%i'%(node.node_id))}" title="${_('Add child document')}"><i class="icon-g-circle-plus"></i></a>
52
+            <a href="${tg.url('/api/move_node_upper?node_id=%i'%(node.node_id))}" title="${_('Move up')}"><i class="fa fa-arrow-up"></i></a>
53
+            <a href="${tg.url('/api/move_node_lower?node_id=%i'%(node.node_id))}" title="${_('Move down')}"><i class="fa fa-arrow-down"></i></a>
54
+            <a href="${tg.url('/api/create_document?parent_id=%i'%(node.node_id))}" title="${_('Add child document')}"><i class="fa  fa-plus-circle"></i></a>
55 55
           </div>
56 56
           <div class="pod-status ${node.getStatus().css}" title='${node.getStatus().label}'>
57 57
              <i class='${node.getStatus().icon}'></i>
@@ -114,267 +114,270 @@ POD :: ${current_node.getTruncatedLabel(40)} [${current_node.getStatus().label}]
114 114
 
115 115
         <a href='${tg.url('/api/force_delete_node?node_id=%i'%(current_node.node_id))}' id='current-document-force-delete-button' class="btn" onclick="return confirm('${_('Delete current document?')}');"><i class="icon-g-remove"></i> ${_('Delete')}</a>
116 116
       </div>
117
-          
118
-      <h3 id="current-document-title">#${current_node.node_id} - ${current_node.data_label}</h3>
119
-      <form style='display: none; margin-top: 1em;' id="current-document-title-edit-form" method='post' action='${tg.url('/api/edit_label')}'>
120
-        <div class="input-prepend input-append">
121
-          <input type='hidden' name='node_id' value='${current_node.node_id}'/>
122
-          ${POD.CancelButton('current-document-title-edit-cancel-button')}
123
-          <input type='text' name='data_label' value='${current_node.data_label}' class="span2" />
124
-          ${POD.SaveButton('current-document-title-save-cancel-button')}
125
-        </div>
126
-      </form>
127 117
 
128
-      <div id='application-document-panel' class="span5">
129
-        <p>
130
-          <div id='current-document-content' class="">
131
-            ${current_node.getContentWithTags()|n}
132
-          </div>
133
-          <form style='display: none;' id="current-document-content-edit-form" method='post' action='${tg.url('/api/edit_content')}'>
134
-            <input type='hidden' name='node_id' value='${current_node.node_id}'/>
135
-            <textarea id="current_node_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="Enter something ...">
136
-              ${current_node.data_content|n}
137
-            </textarea>
138
-            ${POD.CancelButton('current-document-content-edit-cancel-button', True)}
139
-            ${POD.SaveButton('current-document-content-edit-save-button', True)}
140
-          </form>
141
-        </p>
142
-      </div>
143
-      ## FIXME - D.A - 2013-11-07 - The following div should be span4 instead of span3 but some bug make it impossible
144
-      <div id='application-metadata-panel' class="span3">
145
-        <div class="tabbable">
146
-          <ul class="nav nav-tabs">
147
-              ## DEBUG - D.A. - 2013-11-07 -  <li class="active"><a href="#tags" data-toggle="tab" title="${_('Tags')}"><i class='icon-g-tags'></i></a></li>
148
-              <li class="active"><a href="#events" data-toggle="tab" title="History"><i class="icon-g-history"></i>${POD.ItemNb(current_node.getEvents())}</a></li>
149
-              <li><a href="#contacts" data-toggle="tab" title="Contacts"><i class="icon-g-user""></i>${POD.ItemNb(current_node.getContacts())}</a></li>
150
-              <li><a href="#comments" data-toggle="tab" title="Comments"><i class="icon-g-conversation"></i>${POD.ItemNb(current_node.getComments())}</a></li>
151
-              <li><a href="#files" data-toggle="tab" title="Files"><i class="icon-g-attach"></i>${POD.ItemNb(current_node.getFiles())}</a></li>
152
-          </ul>
153
-          <div class="tab-content">
154
-              ################################
155
-              ##
156
-              ## PANEL SHOWING LIST OF TAGS
157
-              ##
158
-              ################################
159
-              <!-- DEBUG - D.A. - 2013-11-07 - Not using tags for th moment
160
-              <div class="tab-pane" id="tags">
161
-                <div class="well">
162
-                  <p>
163
-                    <i>
164
-                      ${_('Tags are automatically extracted from document content:')}
165
-                      <ul>
166
-                        <li>${_('<code>@visible_keyword</code> is a visible keyword generating a tag.')|n}</li>
167
-                        <li>
168
-                          ${_('<code>@invisible_keyword</code> is an <u>invisible</u> keyword generating a tag.')|n}</li>
169
-                      </ul>
170
-                    </i>
171
-                  </p>
172
-                  % for tag in current_node.getTagList():
173
-                    ${POD.Badge(tag)}
174
-                  % endfor
118
+      <div class="row">
119
+        <div id='application-document-panel' class="span5">
120
+          <p>
121
+            <div id='current-document-content' class="">
122
+              <h3 id="current-document-title">#${current_node.node_id} - ${current_node.data_label}</h3>
123
+              ${current_node.getContentWithTags()|n}
124
+            </div>
125
+            <form style='display: none;' id="current-document-content-edit-form" method='post' action='${tg.url('/api/edit_label_and_content')}'>
126
+              <input type='hidden' name='node_id' value='${current_node.node_id}'/>
127
+              <input type="hidden" name='data_content' id="current_node_textarea" />
128
+              <input type='text' name='data_label' value='${current_node.data_label}' class="span4" placeholder="document title" />
129
+              ${POD.RichTextEditor('current_node_textarea_wysiwyg', current_node.data_content)}
130
+              ${POD.CancelButton('current-document-content-edit-cancel-button', True)}
131
+              ${POD.SaveButton('current-document-content-edit-save-button', True)}
132
+
133
+
134
+            </form>
135
+          </p>
136
+        </div>
137
+        ## FIXME - D.A - 2013-11-07 - The following div should be span4 instead of span3 but some bug make it impossible
138
+        <div id='application-metadata-panel' class="span4">
139
+          <div class="tabbable">
140
+            <ul class="nav nav-tabs">
141
+                ## DEBUG - D.A. - 2013-11-07 -  <li class="active"><a href="#tags" data-toggle="tab" title="${_('Tags')}"><i class='icon-g-tags'></i></a></li>
142
+                <li class="active"><a href="#events" data-toggle="tab" title="History"><i class="icon-g-history"></i>${POD.ItemNb(current_node.getEvents())}</a></li>
143
+                <li><a href="#contacts" data-toggle="tab" title="Contacts"><i class="icon-g-user""></i>${POD.ItemNb(current_node.getContacts())}</a></li>
144
+                <li><a href="#comments" data-toggle="tab" title="Comments"><i class="icon-g-conversation"></i>${POD.ItemNb(current_node.getComments())}</a></li>
145
+                <li><a href="#files" data-toggle="tab" title="Files"><i class="icon-g-attach"></i>${POD.ItemNb(current_node.getFiles())}</a></li>
146
+            </ul>
147
+            <div class="tab-content">
148
+                ################################
149
+                ##
150
+                ## PANEL SHOWING LIST OF TAGS
151
+                ##
152
+                ################################
153
+                <!-- DEBUG - D.A. - 2013-11-07 - Not using tags for th moment
154
+                <div class="tab-pane" id="tags">
155
+                  <div class="well">
156
+                    <p>
157
+                      <i>
158
+                        ${_('Tags are automatically extracted from document content:')}
159
+                        <ul>
160
+                          <li>${_('<code>@visible_keyword</code> is a visible keyword generating a tag.')|n}</li>
161
+                          <li>
162
+                            ${_('<code>@invisible_keyword</code> is an <u>invisible</u> keyword generating a tag.')|n}</li>
163
+                        </ul>
164
+                      </i>
165
+                    </p>
166
+                    % for tag in current_node.getTagList():
167
+                      ${POD.Badge(tag)}
168
+                    % endfor
169
+                  </div>
175 170
                 </div>
176
-              </div>
177
-              -->
178
-              ################################
179
-              ##
180
-              ## PANEL SHOWING LIST OF EVENTS
181
-              ##
182
-              ################################
183
-              <div class="tab-pane active" id="events">
184
-                ${POD.AddButton('current-document-add-event-button', True, _(' Add event'))}
185
-                <form style='display: none;' id='current-document-add-event-form' action='${tg.url('/api/create_event')}' method='post' class="well">
186
-                  <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
187
-                  <fieldset>
188
-                    <legend>Add an event</legend>
189
-                    <label>
190
-                      <input type="text" name='data_label' placeholder="Event"/>
191
-                    </label>
192
-                    <label>
193
-                      <div class="datetime-picker-input-div input-append date">
194
-                        <input name='data_datetime' data-format="dd/MM/yyyy hh:mm" type="text" placeholder="date and time"/>
195
-                        <span class="add-on"><i data-time-icon="icon-g-clock" data-date-icon="icon-g-calendar"></i></span>
196
-                      </div>
197
-                    </label>
198
-                    <label>
199
-                      <div>
200
-                        <textarea id="add_event_data_content_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="${_('detail...')}"></textarea>
201
-                      </div>
202
-                    </label>
203
-                    <label class="checkbox">
204
-                      <input disabled name='add_reminder' type="checkbox"> add a reminder
205
-                    </label>
206
-                    <label>
207
-                      <div class="datetime-picker-input-div input-append date">
208
-                        <input disabled name='data_reminder_datetime' data-format="dd/MM/yyyy hh:mm" type="text" placeholder="date and time"/>
209
-                        <span class="add-on"><i data-time-icon="icon-g-clock" data-date-icon="icon-g-calendar"></i></span>
210
-                      </div>
211
-                    </label>
171
+                -->
172
+                ################################
173
+                ##
174
+                ## PANEL SHOWING LIST OF EVENTS
175
+                ##
176
+                ################################
177
+                <div class="tab-pane active" id="events">
178
+                  ${POD.AddButton('current-document-add-event-button', True, _(' Add event'))}
179
+                  <form style='display: none;' id='current-document-add-event-form' action='${tg.url('/api/create_event')}' method='post' class="well">
180
+                    <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
181
+                    <fieldset>
182
+                      <legend>Add an event</legend>
183
+                      <label>
184
+                        <input type="text" name='data_label' placeholder="Event"/>
185
+                      </label>
186
+                      <label>
187
+                        <div class="datetime-picker-input-div input-append date">
188
+                          <input name='data_datetime' data-format="dd/MM/yyyy hh:mm" type="text" placeholder="date and time"/>
189
+                          <span class="add-on"><i data-time-icon="icon-g-clock" data-date-icon="icon-g-calendar"></i></span>
190
+                        </div>
191
+                      </label>
192
+                      <label>
193
+                        <div>
194
+                          <input type="hidden" id="add_event_data_content_textarea" name='data_content' />
195
+                          ${POD.RichTextEditor('add_event_data_content_textarea_wysiwyg', '', 'boldanditalic')}
196
+                        </div>
197
+                      </label>
198
+                      <label class="checkbox">
199
+                        <input disabled name='add_reminder' type="checkbox"> add a reminder
200
+                      </label>
201
+                      <label>
202
+                        <div class="datetime-picker-input-div input-append date">
203
+                          <input disabled name='data_reminder_datetime' data-format="dd/MM/yyyy hh:mm" type="text" placeholder="date and time"/>
204
+                          <span class="add-on"><i data-time-icon="icon-g-clock" data-date-icon="icon-g-calendar"></i></span>
205
+                        </div>
206
+                      </label>
212 207
 
213 208
 
214
-                    ${POD.CancelButton('current-document-add-event-cancel-button', True)}
215
-                    ${POD.SaveButton('current-document-add-event-save-button', True)}
216
-                  </fieldset>
217
-                </form>
209
+                      ${POD.CancelButton('current-document-add-event-cancel-button', True)}
210
+                      ${POD.SaveButton('current-document-add-event-save-button', True)}
211
+                    </fieldset>
212
+                  </form>
218 213
 
219
-              % if len(current_node.getEvents())<=0:
220
-                <p><i>${_('No history for the moment.')}</i></p>
221
-              % else:
222
-                <table class="table table-striped table-hover table-condensed">
223
-                  <thead>
224
-                    <tr>
225
-                      <th>Date</th>
226
-                      <th>Time</th>
227
-                      <th>
228
-                        Event
229
-                      </th>
230
-                      <th>
231
-                        <a href="" title="Add an event"><i class="icon-g-plus"></i></a>
232
-                      </th>
233
-                    </tr>
234
-                  </thead>
235
-                  % for event in current_node.getEvents():
236
-                    <tr class="item-with-data-popoverable" data-content="${event.data_content}" rel="popover" data-placement="left" data-trigger="hover">
237
-                      <td>${event.getFormattedDate(event.data_datetime)}</td>
238
-                      <td>${event.getFormattedTime(event.data_datetime)}</td>
239
-                      <td>${event.data_label}</td>
240
-                    </tr>
241
-                  % endfor
242
-                </table>
243
-              % endif
244
-              </div>
245
-              ##############################
246
-              ## 
247
-              ## PANEL SHOWING LIST OF CONTACTS
248
-              ##
249
-              ##############################
250
-              <div class="tab-pane" id="contacts">
251
-              
252
-                <!-- ADD CONTACT FORM -->
253
-                ${POD.AddButton('current-document-add-contact-button', True, _(' Add contact'))}
254
-                <form style='display: none;' id='current-document-add-contact-form' action='${tg.url('/api/create_contact')}' method='post' class="well">
255
-                  <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
256
-                  <fieldset>
257
-                    <legend>${_('Add a contact')}</legend>
258
-                    <label>
259
-                      <input type="text" name='data_label' placeholder="Title"/>
260
-                    </label>
261
-                    <label>
214
+                % if len(current_node.getEvents())<=0:
215
+                  <p><i>${_('No history for the moment.')}</i></p>
216
+                % else:
217
+                  <table class="table table-striped table-hover table-condensed">
218
+                    <thead>
219
+                      <tr>
220
+                        <th>Date</th>
221
+                        <th>Time</th>
222
+                        <th>
223
+                          Event
224
+                        </th>
225
+                        <th>
226
+                          <a href="" title="Add an event"><i class="icon-g-plus"></i></a>
227
+                        </th>
228
+                      </tr>
229
+                    </thead>
230
+                    % for event in current_node.getEvents():
231
+                      <tr class="item-with-data-popoverable" data-content="${event.data_content}" rel="popover" data-placement="left" data-trigger="hover">
232
+                        <td>${event.getFormattedDate(event.data_datetime)}</td>
233
+                        <td>${event.getFormattedTime(event.data_datetime)}</td>
234
+                        <td>${event.data_label}</td>
235
+                      </tr>
236
+  ## FIXME                    <script>
237
+  ##                      $('.item-with-data-popoverable').popover({ html: true});
238
+  ##                    </script>
239
+
240
+                    % endfor
241
+                  </table>
242
+                % endif
243
+                </div>
244
+                ##############################
245
+                ## 
246
+                ## PANEL SHOWING LIST OF CONTACTS
247
+                ##
248
+                ##############################
249
+                <div class="tab-pane" id="contacts">
250
+                
251
+                  <!-- ADD CONTACT FORM -->
252
+                  ${POD.AddButton('current-document-add-contact-button', True, _(' Add contact'))}
253
+                  <form style='display: none;' id='current-document-add-contact-form' action='${tg.url('/api/create_contact')}' method='post' class="well">
254
+                    <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
255
+                    <fieldset>
256
+                      <legend>${_('Add a contact')}</legend>
257
+                      <label>
258
+                        <input type="text" name='data_label' placeholder="Title"/>
259
+                      </label>
260
+                      <label>
261
+                        <div>
262
+                          <input type="hidden" id="add_contact_data_content_textarea" name='data_content' />
263
+                          ${POD.RichTextEditor('add_contact_data_content_textarea_wysiwyg', '', 'boldanditalic')}
264
+                        </div>
265
+                      </label>
266
+                      ${POD.CancelButton('current-document-add-contact-cancel-button', True)}
267
+                      ${POD.SaveButton('current-document-add-contact-save-button', True)}
268
+                    </fieldset>
269
+                  </form>
270
+
271
+                  <!-- LIST OF CONTACT NODES -->
272
+                  % for contact in current_node.getContacts():
273
+                    <div class="well">
274
+                      <legend class="text-info">${contact.data_label}</legend>
262 275
                       <div>
263
-                        <textarea id="add_contact_data_content_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="${_('detail...')}"></textarea>
276
+                        <a style='float: right;' href="" title='${_('Search on google maps')}'><i class='icon-g-google-maps'></i></a>
277
+                        ${contact.data_content|n}
264 278
                       </div>
265
-                    </label>
266
-                    ${POD.CancelButton('current-document-add-contact-cancel-button', True)}
267
-                    ${POD.SaveButton('current-document-add-contact-save-button', True)}
268
-                  </fieldset>
269
-                </form>
270
-
271
-                <!-- LIST OF CONTACT NODES -->
272
-                % for contact in current_node.getContacts():
273
-                  <div class="well">
274
-                    <legend class="text-info">${contact.data_label}</legend>
275
-                    <div>
276
-                      <a style='float: right;' href="" title='${_('Search on google maps')}'><i class='icon-g-google-maps'></i></a>
277
-                      ${contact.data_content|n}
278 279
                     </div>
279
-                  </div>
280
-                % endfor
280
+                  % endfor
281 281
 
282 282
 
283
-              </div>
284
-              ################################
285
-              ##
286
-              ## PANEL SHOWING LIST OF COMMENTS
287
-              ##
288
-              ################################
289
-              <div class="tab-pane" id="comments">
290
-                <!-- ADD COMMENT FORM -->
291
-                ${POD.AddButton('current-document-add-comment-button', True, _(' Add comment'))}
292
-                <form style='display: none;' id='current-document-add-comment-form' action='${tg.url('/api/create_comment')}' method='post' class="well">
293
-                  <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
294
-                  <fieldset>
295
-                    <legend>${_('Add a comment')}</legend>
296
-                    <label>
297
-                      <input type="text" name='data_label' placeholder="Title"/>
298
-                    </label>
299
-                    <label>
300
-                      <div>
301
-                        <textarea id="add_comment_data_content_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="${_('comment...')}"></textarea>
302
-                      </div>
303
-                    </label>
304
-                    ${POD.CancelButton('current-document-add-comment-cancel-button', True)}
305
-                    ${POD.SaveButton('current-document-add-comment-save-button', True)}
306
-                  </fieldset>
307
-                </form>
283
+                </div>
284
+                ################################
285
+                ##
286
+                ## PANEL SHOWING LIST OF COMMENTS
287
+                ##
288
+                ################################
289
+                <div class="tab-pane" id="comments">
290
+                  <!-- ADD COMMENT FORM -->
291
+                  ${POD.AddButton('current-document-add-comment-button', True, _(' Add comment'))}
292
+                  <form style='display: none;' id='current-document-add-comment-form' action='${tg.url('/api/create_comment')}' method='post' class="well">
293
+                    <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
294
+                    <fieldset>
295
+                      <legend>${_('Add a comment')}</legend>
296
+                      <label>
297
+                        <input type="text" name='data_label' placeholder="Title"/>
298
+                      </label>
299
+                      <label>
300
+                        <div>
301
+                          <input type="hidden" id="add_comment_data_content_textarea" name='data_content' />
302
+                          ${POD.RichTextEditor('add_comment_data_content_textarea_wysiwyg', '', 'boldanditalic')}
303
+                        </div>
304
+                      </label>
305
+                      ${POD.CancelButton('current-document-add-comment-cancel-button', True)}
306
+                      ${POD.SaveButton('current-document-add-comment-save-button', True)}
307
+                    </fieldset>
308
+                  </form>
308 309
 
309
-                <!-- LIST OF COMMENTS -->
310
-              % if len(current_node.getComments())<=0:
311
-                <p><i>${_('No comments.')}</i></p>
312
-              % else:
313
-                <table class="table table-striped table-hover table-condensed">
314
-                  % for comment in current_node.getComments():
315
-                    <tr title="Last updated: ${comment.updated_at}">
316
-                      <td>
317
-                        <i>The ${comment.getFormattedDate(comment.updated_at)} at ${comment.getFormattedTime(comment.updated_at)}, comment.author wrote: </i><br/>
318
-                        <b>${comment.data_label}</b><br/>
319
-                        <p>
320
-                          ${comment.data_content|n}
321
-                        </p>
322
-                      </td>
323
-                    </tr>
324
-                  % endfor
325
-                </table>
326
-              % endif
327
-              </div>
328
-              ################################
329
-              ##
330
-              ## PANEL SHOWING LIST OF FILES
331
-              ##
332
-              ################################
333
-              <div class="tab-pane" id="files">
334
-                <!-- ADD FILE FORM -->
335
-                ${POD.AddButton('current-document-add-file-button', True, _(' Add file'))}
336
-                <form style='display: none;' id='current-document-add-file-form' enctype="multipart/form-data" action='${tg.url('/api/create_file')}' method='post' class="well">
337
-                  <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
338
-                  <fieldset>
339
-                    <legend>${_('Add a file')}</legend>
340
-                    <label>
341
-                      <input type="text" name='data_label' placeholder="Title"/>
342
-                    </label>
343
-                    <label>
344
-                      <input type="file" name='data_file' placeholder="choose a file..."/>
345
-                    </label>
346
-                    <label>
347
-                      <div>
348
-                        <textarea id="add_file_data_content_textarea" name='data_content' spellcheck="false" wrap="off" autofocus placeholder="${_('comment...')}"></textarea>
349
-                      </div>
350
-                    </label>
351
-                    ${POD.CancelButton('current-document-add-file-cancel-button', True)}
352
-                    ${POD.SaveButton('current-document-add-file-save-button', True)}
353
-                  </fieldset>
354
-                </form>
310
+                  <!-- LIST OF COMMENTS -->
311
+                % if len(current_node.getComments())<=0:
312
+                  <p><i>${_('No comments.')}</i></p>
313
+                % else:
314
+                  <table class="table table-striped table-hover table-condensed">
315
+                    % for comment in current_node.getComments():
316
+                      <tr title="Last updated: ${comment.updated_at}">
317
+                        <td>
318
+                          <i>The ${comment.getFormattedDate(comment.updated_at)} at ${comment.getFormattedTime(comment.updated_at)}, comment.author wrote: </i><br/>
319
+                          <b>${comment.data_label}</b><br/>
320
+                          <p>
321
+                            ${comment.data_content|n}
322
+                          </p>
323
+                        </td>
324
+                      </tr>
325
+                    % endfor
326
+                  </table>
327
+                % endif
328
+                </div>
329
+                ################################
330
+                ##
331
+                ## PANEL SHOWING LIST OF FILES
332
+                ##
333
+                ################################
334
+                <div class="tab-pane" id="files">
335
+                  <!-- ADD FILE FORM -->
336
+                  ${POD.AddButton('current-document-add-file-button', True, _(' Add file'))}
337
+                  <form style='display: none;' id='current-document-add-file-form' enctype="multipart/form-data" action='${tg.url('/api/create_file')}' method='post' class="well">
338
+                    <input type="hidden" name='parent_id' value='${current_node.node_id}'/>
339
+                    <fieldset>
340
+                      <legend>${_('Add a file')}</legend>
341
+                      <label>
342
+                        <input type="text" name='data_label' placeholder="Title"/>
343
+                      </label>
344
+                      <label>
345
+                        <input type="file" name='data_file' placeholder="choose a file..."/>
346
+                      </label>
347
+                      <label>
348
+                        <div>
349
+                          <input type="hidden" id="add_file_data_content_textarea" name='data_content' />
350
+                          ${POD.RichTextEditor('add_file_data_content_textarea_wysiwyg', '', 'boldanditalic')}
351
+                        </div>
352
+                      </label>
353
+                      ${POD.CancelButton('current-document-add-file-cancel-button', True)}
354
+                      ${POD.SaveButton('current-document-add-file-save-button', True)}
355
+                    </fieldset>
356
+                  </form>
355 357
 
356
-                <!-- LIST OF FILES -->
357
-              % if len(current_node.getFiles())<=0:
358
-                <p><i>${_('No files.')}</i></p>
359
-              % else:
360
-                <table class="table table-striped table-hover table-condensed">
361
-                  % for current_file in current_node.getFiles():
362
-                    <tr title="Last updated: ${current_file.updated_at}">
363
-                      <td>
364
-                        <a href="${tg.url('/api/get_file_content/%s'%(current_file.node_id))}" title="${_("Download file")}"><i class="icon-g-attach"></i></a>
365
-                        ## FIXME - SHOW THUMBNAIL WHEN IT WILL BE OK<img src="${tg.url('/api/get_file_content_thumbnail/%s'%(current_file.node_id))}" class="img-polaroid">
366
-                      </td>
367
-                      <td>
368
-                        <b>${current_file.data_label}</b><br/>
369
-                        <i>commented by comment.author the ${current_file.getFormattedDate(current_file.updated_at)} at ${current_file.getFormattedTime(current_file.updated_at)}</i></br>
370
-                        <p>
371
-                          ${current_file.data_content|n}
372
-                        </p>
373
-                      </td>
374
-                    </tr>
375
-                  % endfor
376
-                </table>
377
-              % endif
358
+                  <!-- LIST OF FILES -->
359
+                % if len(current_node.getFiles())<=0:
360
+                  <p><i>${_('No files.')}</i></p>
361
+                % else:
362
+                  <table class="table table-striped table-hover table-condensed">
363
+                    % for current_file in current_node.getFiles():
364
+                      <tr title="Last updated: ${current_file.updated_at}">
365
+                        <td>
366
+                          <a href="${tg.url('/api/get_file_content/%s'%(current_file.node_id))}" title="${_("Download file")}"><i class="icon-g-attach"></i></a>
367
+                          ## FIXME - SHOW THUMBNAIL WHEN IT WILL BE OK<img src="${tg.url('/api/get_file_content_thumbnail/%s'%(current_file.node_id))}" class="img-polaroid">
368
+                        </td>
369
+                        <td>
370
+                          <b>${current_file.data_label}</b><br/>
371
+                          <i>commented by comment.author the ${current_file.getFormattedDate(current_file.updated_at)} at ${current_file.getFormattedTime(current_file.updated_at)}</i></br>
372
+                          <p>
373
+                            ${current_file.data_content|n}
374
+                          </p>
375
+                        </td>
376
+                      </tr>
377
+                    % endfor
378
+                  </table>
379
+                % endif
380
+                </div>
378 381
               </div>
379 382
             </div>
380 383
           </div>

+ 282 - 166
pboard/pboard/templates/master.mak View File

@@ -9,7 +9,7 @@
9 9
     <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/glyphicons.css')}" />
10 10
 
11 11
     <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/bootstrap-datetimepicker.min.css')}" />
12
-
12
+    <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/external/font-awesome-4.0.3/css/font-awesome.min.css')}" />
13 13
     <style>
14 14
       /* Wrapper for page content to push down footer */
15 15
       #wrap {
@@ -84,12 +84,91 @@ body { padding-top: 60px; }
84 84
 }
85 85
 
86 86
 ul.nav li.dropdown:hover > ul.dropdown-menu {
87
-    display: block;    
87
+    display: block;
88 88
 }
89 89
 
90 90
     </style>
91 91
 </head>
92 92
 <body class="${self.body_class()}">
93
+  <script src="http://code.jquery.com/jquery.js"></script>
94
+
95
+##########################
96
+##
97
+## HERE COMES THE FULLSCREEN CODE FOR RICH TEXT EDITING
98
+##
99
+## FIXME - D.A. - 2013-11-13 - This code is testing, to remove later
100
+<style>
101
+  .full-size-overlay {
102
+    height:100%;
103
+    width:100%;
104
+    position:fixed;
105
+    left:0;
106
+    top:0;
107
+    z-index:0 !important;
108
+    background-color:white;
109
+    
110
+    filter: alpha(opacity=90); /* internet explorer */
111
+    -khtml-opacity: 0.9;      /* khtml, old safari */
112
+    -moz-opacity: 0.9;       /* mozilla, netscape */
113
+    opacity: 0.9;           /* fx, safari, opera */
114
+  }
115
+  
116
+  .full-size-overlay-inner {
117
+    margin: 3.5em 0.5em 0.5em 0.5em;
118
+    overflow: auto;
119
+    max-height: 85%;
120
+  }
121
+
122
+</style>
123
+<script>
124
+
125
+  function toggleFullScreen(outerWidgetId, innerWidgetId) {
126
+    if($(outerWidgetId).hasClass('full-size-overlay')) {
127
+      // Toggle from fullscreen to "normal"
128
+      $(outerWidgetId).removeClass('full-size-overlay');
129
+      $(innerWidgetId).removeClass('full-size-overlay-inner');
130
+      $('.pod-toggle-full-screen-button > i').removeClass('fa-compress')
131
+      $('.pod-toggle-full-screen-button > i').addClass('fa-expand')
132
+    } else {
133
+      $(outerWidgetId).addClass('full-size-overlay');
134
+      $(innerWidgetId).addClass('full-size-overlay-inner');
135
+      $('.pod-toggle-full-screen-button > i').removeClass('fa-expand')
136
+      $('.pod-toggle-full-screen-button > i').addClass('fa-compress')
137
+    }
138
+  }
139
+
140
+  function initToolbarBootstrapBindings(richTextEditorId) {
141
+    // $('a[title]').tooltip({container:'body'});
142
+    $(richTextEditorId+' > .dropdown-menu input').click(function() {return false;})
143
+      .change(function () {$(this).parent('.dropdown-menu').siblings('.dropdown-toggle').dropdown('toggle');})
144
+      .keydown('esc', function () {this.value='';$(this).change();});
145
+
146
+    $('[data-role=magic-overlay]').each(function () { 
147
+      var overlay = $(this), target = $(overlay.data('target')); 
148
+      overlay.css('opacity', 0).css('position', 'absolute').offset(target.offset()).width(target.outerWidth()).height(target.outerHeight());
149
+    });
150
+    if ("onwebkitspeechchange" in document.createElement("input")) {
151
+      var editorOffset = $(richTextEditorId).offset();
152
+      $('#voiceBtn').css('position','absolute').offset({top: editorOffset.top, left: editorOffset.left+$(richTextEditorId).innerWidth()-35});
153
+    } else {
154
+      $('#voiceBtn').hide();
155
+    }
156
+  };
157
+  function showErrorAlert (reason, detail) {
158
+    var msg='';
159
+    if (reason==='unsupported-file-type') { msg = "Unsupported format " +detail; }
160
+    else {
161
+      console.log("error uploading file", reason, detail);
162
+    }
163
+    $('<div class="alert"> <button type="button" class="close" data-dismiss="alert">&times;</button>'+ 
164
+     '<strong>File upload error</strong> '+msg+' </div>').prependTo('#alerts');
165
+  };
166
+
167
+</script>
168
+##
169
+## END OF FULLSCREEN CODE FOR RICH TEXT EDITING
170
+##
171
+##########################
93 172
 
94 173
   <div class="container">
95 174
     ${self.main_menu()}
@@ -97,16 +176,29 @@ ul.nav li.dropdown:hover > ul.dropdown-menu {
97 176
     ${self.footer()}
98 177
   </div>
99 178
 
100
-  <script src="http://code.jquery.com/jquery.js"></script>
101
-  <script src="${tg.url('/javascript/bootstrap.min.js')}"></script>
179
+##  <script src="http://code.jquery.com/jquery.js"></script>
180
+  <script src="${tg.url('/javascript/external/bootstrap.min.js')}"></script>
181
+  
182
+  <link href="${tg.url('/css/external/google-code-prettify/prettify.css')}" rel="stylesheet">
183
+##  <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
184
+##  <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css" rel="stylesheet">
185
+## <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
186
+
187
+
188
+##  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
189
+  <script src="${tg.url('/javascript/external/jquery.hotkeys.js')}"></script>
190
+##  <script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
191
+  <script src="${tg.url('/javascript/external/google-code-prettify/prettify.js')}"></script>
192
+##  <link href="index.css" rel="stylesheet">
193
+  <script src="${tg.url('/javascript/external/bootstrap-wysiwyg.js')}"></script>
102 194
 
103 195
 <!-- WYSIWYG Text editor -->
104
-<link rel="stylesheet" type="text/css" href="/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.css"></link>
196
+## FIXME D.A. 2013-11-13 <link rel="stylesheet" type="text/css" href="/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.css"></link>
105 197
 <!--link rel="stylesheet" type="text/css" href="/bootstrap-wysihtml5-0.0.2/libs/css/bootstrap.min.css"></link-->
106 198
 
107
-<script src="/bootstrap-wysihtml5-0.0.2/libs/js/wysihtml5-0.3.0_rc2.js"></script>
108
-<script src="/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.js"></script>
109
-<script src="/javascript/bootstrap-datetimepicker.min.js"></script>
199
+## FIXME D.A. 2013-11-13 <script src="/bootstrap-wysihtml5-0.0.2/libs/js/wysihtml5-0.3.0_rc2.js"></script>
200
+## FIXME<script src="/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.js"></script>
201
+<script src="/javascript/external/bootstrap-datetimepicker.min.js"></script>
110 202
 
111 203
 <style>
112 204
 tr:Hover td div.pod-toolbar {
@@ -136,94 +228,46 @@ tr:Hover td div.pod-toolbar {
136 228
 
137 229
             <script>
138 230
               $(document).ready(function() {
139
-                $('#current_node_textarea').wysihtml5({
140
-                  "font-styles": true, //Font styling, e.g. h1, h2, etc. Default true
141
-                  "emphasis": true, //Italics, bold, etc. Default true
142
-                  "lists": true, //(Un)ordered lists, e.g. Bullets, Numbers. Default true
143
-                  "html": true, //Button which allows you to edit the generated HTML. Default false
144
-                  "link": true, //Button to insert a link. Default true
145
-                  "image": true, //Button to insert an image. Default true,
146
-                  // "color": true //Button to change color of font  
147
-                });
148
-                $('#current_node_textarea').css('margin-bottom', '0');
149
-                $('#current_node_textarea').css("min-height", "12em");
150
-                $('#current_node_textarea').addClass("span5");
151
-
152
-                /* ADD EVENT FORM */
153
-                $('#add_event_data_content_textarea').wysihtml5({
154
-                  "font-styles": false, //Font styling, e.g. h1, h2, etc. Default true
155
-                  "emphasis": true, //Italics, bold, etc. Default true
156
-                  "lists": false, //(Un)ordered lists, e.g. Bullets, Numbers. Default true
157
-                  "html": true, //Button which allows you to edit the generated HTML. Default false
158
-                  "link": true, //Button to insert a link. Default true
159
-                  "image": true, //Button to insert an image. Default true,
160
-                  // "color": true //Button to change color of font  
161
-                });
162
-                $('#add_event_data_content_textarea').css('margin-bottom', '0');
163
-                $('#add_event_data_content_textarea').css("height", "4em");
164
-                $('#add_event_data_content_textarea').addClass("span3");
165
-
166
-                /* ADD CONTACT FORM */
167
-                $('#add_contact_data_content_textarea').wysihtml5({
168
-                  "font-styles": false, //Font styling, e.g. h1, h2, etc. Default true
169
-                  "emphasis": true, //Italics, bold, etc. Default true
170
-                  "lists": false, //(Un)ordered lists, e.g. Bullets, Numbers. Default true
171
-                  "html": true, //Button which allows you to edit the generated HTML. Default false
172
-                  "link": true, //Button to insert a link. Default true
173
-                  "image": true, //Button to insert an image. Default true,
174
-                  // "color": true //Button to change color of font  
175
-                });
176
-                $('#add_contact_data_content_textarea').css('margin-bottom', '0');
177
-                $('#add_contact_data_content_textarea').css("height", "4em");
178
-                $('#add_contact_data_content_textarea').addClass("span3");
179
-
180
-
181
-                /* ADD COMMENT FORM */
182
-                $('#add_comment_data_content_textarea').wysihtml5({
183
-                  "font-styles": false, //Font styling, e.g. h1, h2, etc. Default true
184
-                  "emphasis": true, //Italics, bold, etc. Default true
185
-                  "lists": false, //(Un)ordered lists, e.g. Bullets, Numbers. Default true
186
-                  "html": true, //Button which allows you to edit the generated HTML. Default false
187
-                  "link": true, //Button to insert a link. Default true
188
-                  "image": true, //Button to insert an image. Default true,
189
-                  // "color": true //Button to change color of font  
190
-                });
191
-                $('#add_comment_data_content_textarea').css('margin-bottom', '0');
192
-                $('#add_comment_data_content_textarea').css("height", "4em");
193
-                $('#add_comment_data_content_textarea').addClass("span3");
194
-
195
-                /* ADD FILE FORM */
196
-                $('#add_file_data_content_textarea').wysihtml5({
197
-                  "font-styles": false, //Font styling, e.g. h1, h2, etc. Default true
198
-                  "emphasis": true, //Italics, bold, etc. Default true
199
-                  "lists": false, //(Un)ordered lists, e.g. Bullets, Numbers. Default true
200
-                  "html": true, //Button which allows you to edit the generated HTML. Default false
201
-                  "link": true, //Button to insert a link. Default true
202
-                  "image": true, //Button to insert an image. Default true,
203
-                  // "color": true //Button to change color of font  
204
-                });
205
-                $('#add_file_data_content_textarea').css('margin-bottom', '0');
206
-                $('#add_file_data_content_textarea').css("height", "4em");
207
-                $('#add_file_data_content_textarea').addClass("span3");
208
-
209
-
210
-                /* Edit title form */
211
-                $("#current-document-title-edit-form" ).css("display", "none");
212
-                $("#current-document-title" ).dblclick(function() {
213
-                  $("#current-document-title" ).css("display", "none");
214
-                  $("#current-document-title-edit-form" ).css("display", "block");
215
-                });
216
-                $("#current-document-title-edit-cancel-button" ).click(function() {
217
-                  $("#current-document-title" ).css("display", "block");
218
-                  $("#current-document-title-edit-form" ).css("display", "none");
219
-                });
220
-                $('#current-document-title-save-cancel-button').on('click', function(e){
221
-                  // We don't want this to act as a link so cancel the link action
222
-                  e.preventDefault();
223
-                  $('#current-document-title-edit-form').submit();
224
-                });
225
-
226
-                /* Edit content form */
231
+## FIXME                $('#current_node_textarea').wysihtml5({
232
+## FIXME                  "font-styles": true, //Font styling, e.g. h1, h2, etc. Default true
233
+## FIXME                  "emphasis": true, //Italics, bold, etc. Default true
234
+## FIXME                  "lists": true, //(Un)ordered lists, e.g. Bullets, Numbers. Default true
235
+## FIXME                  "html": true, //Button which allows you to edit the generated HTML. Default false
236
+## FIXME                  "link": true, //Button to insert a link. Default true
237
+## FIXME                  "image": true, //Button to insert an image. Default true,
238
+## FIXME                  // "color": true //Button to change color of font  
239
+## FIXME                });
240
+## FIXME                $('#current_node_textarea').css('margin-bottom', '0');
241
+## FIXME                $('#current_node_textarea').css("min-height", "12em");
242
+## FIXME                $('#current_node_textarea').addClass("span5");
243
+
244
+###################
245
+##
246
+## HERE
247
+##
248
+###################
249
+
250
+##
251
+## RE-IMPLEMENT THIS SOON !!!
252
+##
253
+##                /* Edit title form */
254
+##                $("#current-document-title-edit-form" ).css("display", "none");
255
+##                $("#current-document-title" ).dblclick(function() {
256
+##                  $("#current-document-title" ).css("display", "none");
257
+##                  $("#current-document-title-edit-form" ).css("display", "block");
258
+##                });
259
+##                $("#current-document-title-edit-cancel-button" ).click(function() {
260
+##                  $("#current-document-title" ).css("display", "block");
261
+##                  $("#current-document-title-edit-form" ).css("display", "none");
262
+##                });
263
+##                $('#current-document-title-save-cancel-button').on('click', function(e){
264
+##                  // We don't want this to act as a link so cancel the link action
265
+##                  e.preventDefault();
266
+##                  $('#current-document-title-edit-form').submit();
267
+##                });
268
+
269
+
270
+                /* EDIT CONTENT FORM */
227 271
                 $("#current-document-content-edit-form" ).css("display", "none");
228 272
                 $("#current-document-content-edit-button" ).click(function() {
229 273
                   $("#current-document-content" ).css("display", "none");
@@ -240,11 +284,17 @@ tr:Hover td div.pod-toolbar {
240 284
                 $('#current-document-content-edit-save-button').on('click', function(e){
241 285
                   // We don't want this to act as a link so cancel the link action
242 286
                   e.preventDefault();
287
+                  $('#current_node_textarea_wysiwyg').cleanHtml();
288
+                  $('#current_node_textarea').val($('#current_node_textarea_wysiwyg').html());
243 289
                   $('#current-document-content-edit-form').submit();
244 290
                 });
245 291
 
246
-
247
-                /* Add event form hide/show behavior */
292
+                /* ADD EVENT => FORM */
293
+                $('#add_event_data_content_textarea').wysiwyg();
294
+                $('#add_event_data_content_textarea').css('margin-bottom', '0');
295
+                $('#add_event_data_content_textarea').css("height", "4em");
296
+                $('#add_event_data_content_textarea').addClass("span3");
297
+                /* ADD EVENT => SHOW/HIDE/SUBMIT BUTTONS */
248 298
                 $("#current-document-add-event-button" ).click(function() {
249 299
                   $("#current-document-add-event-form" ).css("display", "block");
250 300
                   $("#current-document-add-event-button" ).css("display", "none");
@@ -255,10 +305,17 @@ tr:Hover td div.pod-toolbar {
255 305
                 });
256 306
                 $('#current-document-add-event-save-button').on('click', function(e){
257 307
                   e.preventDefault(); // We don't want this to act as a link so cancel the link action
308
+                  $('#add_event_data_content_textarea_wysiwyg').cleanHtml();
309
+                  $('#add_event_data_content_textarea').val($('#add_event_data_content_textarea_wysiwyg').html());
258 310
                   $('#current-document-add-event-form').submit();
259 311
                 });
260 312
 
261
-                /* Add contact form hide/show behavior */
313
+                /* ADD CONTACT => FORM */
314
+                $('#add_contact_data_content_textarea').wysiwyg();
315
+                $('#add_contact_data_content_textarea').css('margin-bottom', '0');
316
+                $('#add_contact_data_content_textarea').css("height", "4em");
317
+                $('#add_contact_data_content_textarea').addClass("span3");
318
+                /* ADD CONTACT => SHOW/HIDE/SUBMIT BUTTONS */
262 319
                 $("#current-document-add-contact-button" ).click(function() {
263 320
                   $("#current-document-add-contact-form" ).css("display", "block");
264 321
                   $("#current-document-add-contact-button" ).css("display", "none");
@@ -269,10 +326,18 @@ tr:Hover td div.pod-toolbar {
269 326
                 });
270 327
                 $('#current-document-add-contact-save-button').on('click', function(e){
271 328
                   e.preventDefault(); // We don't want this to act as a link so cancel the link action
329
+                  $('#add_contact_data_content_textarea_wysiwyg').cleanHtml();
330
+                  $('#add_contact_data_content_textarea').val($('#add_contact_data_content_textarea_wysiwyg').html());
272 331
                   $('#current-document-add-contact-form').submit();
273 332
                 });
274 333
 
275
-                /* Add comment form hide/show behavior */
334
+
335
+                /* ADD COMMENT => FORM */
336
+                $('#add_comment_data_content_textarea').wysiwyg();
337
+                $('#add_comment_data_content_textarea').css('margin-bottom', '0');
338
+                $('#add_comment_data_content_textarea').css("height", "4em");
339
+                $('#add_comment_data_content_textarea').addClass("span3");
340
+                /* ADD COMMENT => SHOW/HIDE/SUBMIT BUTTONS */
276 341
                 $("#current-document-add-comment-button" ).click(function() {
277 342
                   $("#current-document-add-comment-form" ).css("display", "block");
278 343
                   $("#current-document-add-comment-button" ).css("display", "none");
@@ -283,10 +348,17 @@ tr:Hover td div.pod-toolbar {
283 348
                 });
284 349
                 $('#current-document-add-comment-save-button').on('click', function(e){
285 350
                   e.preventDefault(); // We don't want this to act as a link so cancel the link action
351
+                  $('#add_comment_data_content_textarea_wysiwyg').cleanHtml();
352
+                  $('#add_comment_data_content_textarea').val($('#add_comment_data_content_textarea_wysiwyg').html());
286 353
                   $('#current-document-add-comment-form').submit();
287 354
                 });
288 355
 
289
-                /* Add file form hide/show behavior */
356
+                /* ADD FILE => FORM */
357
+                $('#add_file_data_content_textarea').wysiwyg();
358
+                $('#add_file_data_content_textarea').css('margin-bottom', '0');
359
+                $('#add_file_data_content_textarea').css("height", "4em");
360
+                $('#add_file_data_content_textarea').addClass("span3");
361
+                /* ADD FILE => SHOW/HIDE/SUBMIT BUTTONS */
290 362
                 $("#current-document-add-file-button" ).click(function() {
291 363
                   $("#current-document-add-file-form" ).css("display", "block");
292 364
                   $("#current-document-add-file-button" ).css("display", "none");
@@ -297,6 +369,8 @@ tr:Hover td div.pod-toolbar {
297 369
                 });
298 370
                 $('#current-document-add-file-save-button').on('click', function(e){
299 371
                   e.preventDefault(); // We don't want this to act as a link so cancel the link action
372
+                  $('#add_file_data_content_textarea_wysiwyg').cleanHtml();
373
+                  $('#add_file_data_content_textarea').val($('#add_file_data_content_textarea_wysiwyg').html());
300 374
                   $('#current-document-add-file-form').submit();
301 375
                 });
302 376
 
@@ -454,7 +528,10 @@ tr:Hover td div.pod-toolbar {
454 528
                 });
455 529
               });
456 530
 
457
-$('.item-with-data-popoverable').popover({ html: true});
531
+              // ALLOW TO SHOW POPOVER WITH SPECIFIC DATA
532
+              $('.item-with-data-popoverable').popover({ html: true});
533
+
534
+
458 535
 
459 536
       /** Make calculator available on all pages */
460 537
       $(document).ready(function() {
@@ -478,6 +555,39 @@ $('.item-with-data-popoverable').popover({ html: true});
478 555
       });
479 556
 
480 557
             </script>
558
+  <style>
559
+    .pod-rich-text-zone {
560
+      overflow:auto;
561
+      min-height:3em;
562
+      max-height: 10%;
563
+      border: 1px solid #CCC;
564
+      padding: 0.5em;
565
+      box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
566
+      border-radius: 4px;
567
+      background-color: white;
568
+    }
569
+    
570
+    .pod-input-like-shadow {
571
+      -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
572
+      -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
573
+      box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
574
+      -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
575
+      -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
576
+      -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
577
+      -o-transition: border linear 0.2s, box-shadow linear 0.2s;
578
+      transition: border linear 0.2s, box-shadow linear 0.2s;
579
+    }
580
+    .pod-input-like-shadow:focus {
581
+      border-color: rgba(82, 168, 236, 0.8);
582
+      -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
583
+      -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
584
+      box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
585
+      outline: 0;
586
+      outline: thin dotted \9;
587
+    }
588
+
589
+  </style>
590
+
481 591
 </body>
482 592
 
483 593
 <%def name="content_wrapper()">
@@ -515,75 +625,81 @@ $('.item-with-data-popoverable').popover({ html: true});
515 625
           <ul class="nav">
516 626
             <li>
517 627
               <a href="${tg.url('/')}">
518
-                <i class="icon-g-home"></i>
519
-                Home
628
+                <i class="fa fa-home"></i>
629
+                <strong>pod</strong>
520 630
               </a>
521 631
             </li>
522 632
           % if request.identity:
523 633
             <li>
524
-              <a href="${tg.url('/document')}"><i class="icon-g-book-open"></i> ${_('Documents')}</a>
634
+              <a href="${tg.url('/dashboard')}">
635
+                <i class="fa fa-dashboard"></i>
636
+                Dashboard
637
+              </a>
638
+            </li>
639
+            <li>
640
+              <a href="${tg.url('/document')}"><i class="fa fa-file-text-o"></i> ${_('Documents')}</a>
525 641
             </li>
526 642
 
527 643
             <li title=" ${_('Toggle view mode [narrow, medium, large]')}">
528
-              <a title="${_('Toggle view mode: narrow')}" id='view-size-toggle-button-small' style="display: none;"><i class='icon-g-eye-open'></i></a>
529
-              <a title="${_('Toggle view mode: medium')}" id='view-size-toggle-button-medium'><i class='icon-g-eye-open'></i></a>
530
-              <a title="${_('Toggle view mode: large')}" id='view-size-toggle-button-large' style="display: none;"><i class='icon-g-eye-open'></i></a>
644
+              <a title="${_('Toggle view mode: narrow')}" id='view-size-toggle-button-small' style="display: none;"><i class='fa fa-eye'></i></a>
645
+              <a title="${_('Toggle view mode: medium')}" id='view-size-toggle-button-medium'><i class='fa fa-eye'></i></a>
646
+              <a title="${_('Toggle view mode: large')}" id='view-size-toggle-button-large' style="display: none;"><i class='fa fa-eye'></i></a>
531 647
             </li>
532 648
 
533 649
             <li title="Rebuild document index">
534 650
             % if current_node is UNDEFINED:
535
-              <a href="${tg.url('/api/reindex_nodes?back_to_node_id=0')}"><i class="icon-g-refresh"></i></a>
651
+              <a href="${tg.url('/api/reindex_nodes?back_to_node_id=0')}"><i class="fa fa-refresh"></i></a>
536 652
             % else:
537
-              <a href="${tg.url('/api/reindex_nodes?back_to_node_id=%i'%(current_node.node_id))}"><i class="icon-g-refresh"></i></a>
653
+              <a href="${tg.url('/api/reindex_nodes?back_to_node_id=%i'%(current_node.node_id))}"><i class="fa fa-refresh"></i></a>
538 654
             % endif
539 655
             </li>
540 656
 
541
-            <li class="dropdown" title="Calculator">
542
-              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-g-calculator"></i></a>
543
-              <ul class="dropdown-menu pull-left">
544
-                <li class="text-center">
545
-                  <fieldset>
546
-                    <legend><i class="icon-g-calculator"></i> Calculator</legend>
547
-                    <table id='keyboard' style="margin:0.2em;">
548
-                      <tr>
549
-                        <td colspan="5">
550
-                          <input type='text' class="text-right" id='calculation'/><br/>
551
-                          <input type='text' class="text-right" readonly id='result'/>
552
-                        </td>
553
-                      </tr>
554
-                      <tr>
555
-                        <td><span class='btn'>7</span></td>
556
-                        <td><span class='btn'>8</span></td>
557
-                        <td><span class='btn'>9</span></td>
558
-                        <td><span class='btn'>(</span></td>
559
-                        <td><span class='btn'>)</span></td>
560
-                      </tr>
561
-                      <tr>
562
-                        <td><span class='btn'>4</span></td>
563
-                        <td><span class='btn'>5</span></td>
564
-                        <td><span class='btn'>6</span></td>
565
-                        <td><span class='btn'>-</span></td>
566
-                        <td><span class='btn'>+</span></td>
567
-                      </tr>
568
-                      <tr>
569
-                        <td><span class='btn'>1</span></td>
570
-                        <td><span class='btn'>2</span></td>
571
-                        <td><span class='btn'>3</span></td>
572
-                        <td><span class='btn'>/</span></td>
573
-                        <td><span class='btn'>*</span></td>
574
-                      </tr>
575
-                      <tr>
576
-                        <td><span class='btn'>.</span></td>
577
-                        <td><span class='btn'>0</span></td>
578
-                        <td><span class='btn'>%</span></td>
579
-                        <td><span class='btn btn-success'>=</span></td>
580
-                        <td><span class='btn btn-danger'>C</span></td>
581
-                      </tr>
582
-                    </table>
583
-                  </fieldset>
584
-                  <p></p>
585
-               </ul>
586
-            </li>
657
+##            <li class="dropdown" title="Calculator">
658
+##              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-g-calculator"></i></a>
659
+##              <ul class="dropdown-menu pull-left">
660
+##                <li class="text-center">
661
+##                  <fieldset>
662
+##                    <legend><i class="icon-g-calculator"></i> Calculator</legend>
663
+##                    <table id='keyboard' style="margin:0.2em;">
664
+##                      <tr>
665
+##                        <td colspan="5">
666
+##                          <input type='text' class="text-right" id='calculation'/><br/>
667
+##                          <input type='text' class="text-right" readonly id='result'/>
668
+##                        </td>
669
+##                      </tr>
670
+##                      <tr>
671
+##                        <td><span class='btn'>7</span></td>
672
+##                        <td><span class='btn'>8</span></td>
673
+##                        <td><span class='btn'>9</span></td>
674
+##                        <td><span class='btn'>(</span></td>
675
+##                        <td><span class='btn'>)</span></td>
676
+##                      </tr>
677
+##                      <tr>
678
+##                        <td><span class='btn'>4</span></td>
679
+##                        <td><span class='btn'>5</span></td>
680
+##                        <td><span class='btn'>6</span></td>
681
+##                        <td><span class='btn'>-</span></td>
682
+##                        <td><span class='btn'>+</span></td>
683
+##                      </tr>
684
+##                      <tr>
685
+##                        <td><span class='btn'>1</span></td>
686
+##                        <td><span class='btn'>2</span></td>
687
+##                        <td><span class='btn'>3</span></td>
688
+##                        <td><span class='btn'>/</span></td>
689
+##                        <td><span class='btn'>*</span></td>
690
+##                      </tr>
691
+##                      <tr>
692
+##                        <td><span class='btn'>.</span></td>
693
+##                        <td><span class='btn'>0</span></td>
694
+##                        <td><span class='btn'>%</span></td>
695
+##                        <td><span class='btn btn-success'>=</span></td>
696
+##                        <td><span class='btn btn-danger'>C</span></td>
697
+##                      </tr>
698
+##                    </table>
699
+##                  </fieldset>
700
+##                  <p></p>
701
+##               </ul>
702
+##            </li>
587 703
 
588 704
 
589 705
           % endif
@@ -592,16 +708,16 @@ $('.item-with-data-popoverable').popover({ html: true});
592 708
             <li class="dropdown">
593 709
               <a href="#" class="dropdown-toggle" data-toggle="dropdown">Admin <b class="caret"></b></a>
594 710
               <ul class="dropdown-menu">
595
-                <li><a href="${tg.url('/admin')}">Manage</a></li>
711
+                <li><a href="${tg.url('/admin')}"><i class="fa fa-magic"></i> Manage</a></li>
596 712
               </ul>
597 713
             </li>
598 714
             
599 715
             <li class="dropdown">
600
-              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-g-adjust"></i> Debug <b class="caret"></b></a>
716
+              <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-cogs "></i> Debug <b class="caret"></b></a>
601 717
               <ul class="dropdown-menu">
602
-                <li><a href="${tg.url('/debug/iconset')}">icon set</a></li>
603
-                <li><a href="${tg.url('/debug/environ')}">request.environ</a></li>
604
-                <li><a href="${tg.url('/debug/identity')}">request.identity</a></li>
718
+                <li><a href="${tg.url('/debug/iconset')}"><i class="fa fa-picture-o"></i> icon set</a></li>
719
+                <li><a href="${tg.url('/debug/environ')}"><i class="fa fa-globe"></i>     request.environ</a></li>
720
+                <li><a href="${tg.url('/debug/identity')}"><i class="fa fa-user-md"></i>  request.identity</a></li>
605 721
               </ul>
606 722
             </li>
607 723
             
@@ -612,12 +728,12 @@ $('.item-with-data-popoverable').popover({ html: true});
612 728
           <ul class="nav pull-right">
613 729
             % if not request.identity:
614 730
               <li class="dropdown">
615
-                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> Login</a>
731
+                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> Login</a>
616 732
                 <ul class="dropdown-menu pull-right">
617 733
                   <li class="text-center">
618 734
                     <form action="${tg.url('/login_handler')}">
619 735
                       <fieldset>
620
-                        <legend><i class="icon-g-keys" style="vertical-align: baseline !important;"></i> Login</legend>
736
+                        <legend><i class="fa fa-key" style="vertical-align: baseline !important;"></i> Login</legend>
621 737
                         <input class="span2" type="text" id="login" name="login" placeholder="email...">
622 738
                         <input class="span2" type="password" id="password" name="password" placeholder="password...">
623 739
                         <div class="span2 control-group">
@@ -630,12 +746,12 @@ $('.item-with-data-popoverable').popover({ html: true});
630 746
               </li>
631 747
             % else:
632 748
               <li class="dropdown">
633
-                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-user"></i> ${request.identity['user']}</a>
749
+                <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> ${request.identity['user']}</a>
634 750
                 <ul class="dropdown-menu pull-right">
635 751
                   <li class="text-center">
636 752
                     <fieldset>
637
-                      <legend><i class="icon-g-keys"></i> Logout</legend>
638
-                      <a class="btn btn-danger" href="${tg.url('/logout_handler')}">Logout <i class="icon-off icon-white"></i> </a>
753
+                      <legend><i class="fa fa-key"></i> Logout</legend>
754
+                      <a class="btn btn-danger" href="${tg.url('/logout_handler')}">Logout <i class="fa fa-power-off"></i> </a>
639 755
                     </fieldset>
640 756
                     <p></p>
641 757
                  </ul>