diff --git a/admin/scripts/markitup/jquery.markitup.js b/admin/scripts/markitup/jquery.markitup.js new file mode 100755 index 0000000..4ea585c --- /dev/null +++ b/admin/scripts/markitup/jquery.markitup.js @@ -0,0 +1,673 @@ +// ---------------------------------------------------------------------------- +// markItUp! Universal MarkUp Engine, JQuery plugin +// v 1.1.x +// Dual licensed under the MIT and GPL licenses. +// ---------------------------------------------------------------------------- +// Copyright (C) 2007-2012 Jay Salvat +// http://markitup.jaysalvat.com/ +// ---------------------------------------------------------------------------- +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +// ---------------------------------------------------------------------------- +(function($) { + $.fn.markItUp = function(settings, extraSettings) { + var method, params, options, ctrlKey, shiftKey, altKey; ctrlKey = shiftKey = altKey = false; + + if (typeof settings == 'string') { + method = settings; + params = extraSettings; + } + + options = { id: '', + nameSpace: '', + root: '', + previewHandler: false, + previewInWindow: '', // 'width=800, height=600, resizable=yes, scrollbars=yes' + previewInElement: '', + previewAutoRefresh: true, + previewPosition: 'after', + previewTemplatePath: '~/templates/preview.html', + previewParser: false, + previewParserPath: '', + previewParserVar: 'data', + previewParserAjaxType: 'POST', + resizeHandle: true, + beforeInsert: '', + afterInsert: '', + onEnter: {}, + onShiftEnter: {}, + onCtrlEnter: {}, + onTab: {}, + markupSet: [ { /* set */ } ] + }; + $.extend(options, settings, extraSettings); + + // compute markItUp! path + if (!options.root) { + $('script').each(function(a, tag) { + var miuScript = $(tag).get(0).src.match(/(.*)jquery\.markitup(\.pack)?\.js$/); + if (miuScript !== null) { + options.root = miuScript[1]; + } + }); + } + + // Quick patch to keep compatibility with jQuery 1.9 + var uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + var matched = uaMatch( navigator.userAgent ); + var browser = {}; + + if (matched.browser) { + browser[matched.browser] = true; + browser.version = matched.version; + } + if (browser.chrome) { + browser.webkit = true; + } else if (browser.webkit) { + browser.safari = true; + } + + return this.each(function() { + var $$, textarea, levels, scrollPosition, caretPosition, caretOffset, + clicked, hash, header, footer, previewWindow, template, iFrame, abort; + $$ = $(this); + textarea = this; + levels = []; + abort = false; + scrollPosition = caretPosition = 0; + caretOffset = -1; + + options.previewParserPath = localize(options.previewParserPath); + options.previewTemplatePath = localize(options.previewTemplatePath); + + if (method) { + switch(method) { + case 'remove': + remove(); + break; + case 'insert': + markup(params); + break; + default: + $.error('Method ' + method + ' does not exist on jQuery.markItUp'); + } + return; + } + + // apply the computed path to ~/ + function localize(data, inText) { + if (inText) { + return data.replace(/("|')~\//g, "$1"+options.root); + } + return data.replace(/^~\//, options.root); + } + + // init and build editor + function init() { + id = ''; nameSpace = ''; + if (options.id) { + id = 'id="'+options.id+'"'; + } else if ($$.attr("id")) { + id = 'id="markItUp'+($$.attr("id").substr(0, 1).toUpperCase())+($$.attr("id").substr(1))+'"'; + + } + if (options.nameSpace) { + nameSpace = 'class="'+options.nameSpace+'"'; + } + $$.wrap('
'); + $$.wrap('
'); + $$.wrap('
'); + $$.addClass("markItUpEditor"); + + // add the header before the textarea + header = $('
').insertBefore($$); + $(dropMenus(options.markupSet)).appendTo(header); + + // add the footer after the textarea + footer = $('
').insertAfter($$); + + // add the resize handle after textarea + if (options.resizeHandle === true && browser.safari !== true) { + resizeHandle = $('
') + .insertAfter($$) + .bind("mousedown.markItUp", function(e) { + var h = $$.height(), y = e.clientY, mouseMove, mouseUp; + mouseMove = function(e) { + $$.css("height", Math.max(20, e.clientY+h-y)+"px"); + return false; + }; + mouseUp = function(e) { + $("html").unbind("mousemove.markItUp", mouseMove).unbind("mouseup.markItUp", mouseUp); + return false; + }; + $("html").bind("mousemove.markItUp", mouseMove).bind("mouseup.markItUp", mouseUp); + }); + footer.append(resizeHandle); + } + + // listen key events + $$.bind('keydown.markItUp', keyPressed).bind('keyup', keyPressed); + + // bind an event to catch external calls + $$.bind("insertion.markItUp", function(e, settings) { + if (settings.target !== false) { + get(); + } + if (textarea === $.markItUp.focused) { + markup(settings); + } + }); + + // remember the last focus + $$.bind('focus.markItUp', function() { + $.markItUp.focused = this; + }); + + if (options.previewInElement) { + refreshPreview(); + } + } + + // recursively build header with dropMenus from markupset + function dropMenus(markupSet) { + var ul = $(''), i = 0; + $('li:hover > ul', ul).css('display', 'block'); + $.each(markupSet, function() { + var button = this, t = '', title, li, j; + button.title ? title = (button.key) ? (button.title||'')+' [Ctrl+'+button.key+']' : (button.title||'') : title = (button.key) ? (button.name||'')+' [Ctrl+'+button.key+']' : (button.name||''); + key = (button.key) ? 'accesskey="'+button.key+'"' : ''; + if (button.separator) { + li = $('
  • '+(button.separator||'')+'
  • ').appendTo(ul); + } else { + i++; + for (j = levels.length -1; j >= 0; j--) { + t += levels[j]+"-"; + } + li = $('
  • '+(button.name||'')+'
  • ') + .bind("contextmenu.markItUp", function() { // prevent contextmenu on mac and allow ctrl+click + return false; + }).bind('click.markItUp', function(e) { + e.preventDefault(); + }).bind("focusin.markItUp", function(){ + $$.focus(); + }).bind('mouseup', function(e) { + if (button.call) { + eval(button.call)(e); // Pass the mouseup event to custom delegate + } + setTimeout(function() { markup(button) },1); + return false; + }).bind('mouseenter.markItUp', function() { + $('> ul', this).show(); + $(document).one('click', function() { // close dropmenu if click outside + $('ul ul', header).hide(); + } + ); + }).bind('mouseleave.markItUp', function() { + $('> ul', this).hide(); + }).appendTo(ul); + if (button.dropMenu) { + levels.push(i); + $(li).addClass('markItUpDropMenu').append(dropMenus(button.dropMenu)); + } + } + }); + levels.pop(); + return ul; + } + + // markItUp! markups + function magicMarkups(string) { + if (string) { + string = string.toString(); + string = string.replace(/\(\!\(([\s\S]*?)\)\!\)/g, + function(x, a) { + var b = a.split('|!|'); + if (altKey === true) { + return (b[1] !== undefined) ? b[1] : b[0]; + } else { + return (b[1] === undefined) ? "" : b[0]; + } + } + ); + // [![prompt]!], [![prompt:!:value]!] + string = string.replace(/\[\!\[([\s\S]*?)\]\!\]/g, + function(x, a) { + var b = a.split(':!:'); + if (abort === true) { + return false; + } + value = prompt(b[0], (b[1]) ? b[1] : ''); + if (value === null) { + abort = true; + } + return value; + } + ); + return string; + } + return ""; + } + + // prepare action + function prepare(action) { + if ($.isFunction(action)) { + action = action(hash); + } + return magicMarkups(action); + } + + // build block to insert + function build(string) { + var openWith = prepare(clicked.openWith); + var placeHolder = prepare(clicked.placeHolder); + var replaceWith = prepare(clicked.replaceWith); + var closeWith = prepare(clicked.closeWith); + var openBlockWith = prepare(clicked.openBlockWith); + var closeBlockWith = prepare(clicked.closeBlockWith); + var multiline = clicked.multiline; + + if (replaceWith !== "") { + block = openWith + replaceWith + closeWith; + } else if (selection === '' && placeHolder !== '') { + block = openWith + placeHolder + closeWith; + } else { + string = string || selection; + + var lines = [string], blocks = []; + + if (multiline === true) { + lines = string.split(/\r?\n/); + } + + for (var l = 0; l < lines.length; l++) { + line = lines[l]; + var trailingSpaces; + if (trailingSpaces = line.match(/ *$/)) { + blocks.push(openWith + line.replace(/ *$/g, '') + closeWith + trailingSpaces); + } else { + blocks.push(openWith + line + closeWith); + } + } + + block = blocks.join("\n"); + } + + block = openBlockWith + block + closeBlockWith; + + return { block:block, + openBlockWith:openBlockWith, + openWith:openWith, + replaceWith:replaceWith, + placeHolder:placeHolder, + closeWith:closeWith, + closeBlockWith:closeBlockWith + }; + } + + // define markup to insert + function markup(button) { + var len, j, n, i; + hash = clicked = button; + get(); + $.extend(hash, { line:"", + root:options.root, + textarea:textarea, + selection:(selection||''), + caretPosition:caretPosition, + ctrlKey:ctrlKey, + shiftKey:shiftKey, + altKey:altKey + } + ); + // callbacks before insertion + prepare(options.beforeInsert); + prepare(clicked.beforeInsert); + if ((ctrlKey === true && shiftKey === true) || button.multiline === true) { + prepare(clicked.beforeMultiInsert); + } + $.extend(hash, { line:1 }); + + if ((ctrlKey === true && shiftKey === true)) { + lines = selection.split(/\r?\n/); + for (j = 0, n = lines.length, i = 0; i < n; i++) { + if ($.trim(lines[i]) !== '') { + $.extend(hash, { line:++j, selection:lines[i] } ); + lines[i] = build(lines[i]).block; + } else { + lines[i] = ""; + } + } + + string = { block:lines.join('\n')}; + start = caretPosition; + len = string.block.length + ((browser.opera) ? n-1 : 0); + } else if (ctrlKey === true) { + string = build(selection); + start = caretPosition + string.openWith.length; + len = string.block.length - string.openWith.length - string.closeWith.length; + len = len - (string.block.match(/ $/) ? 1 : 0); + len -= fixIeBug(string.block); + } else if (shiftKey === true) { + string = build(selection); + start = caretPosition; + len = string.block.length; + len -= fixIeBug(string.block); + } else { + string = build(selection); + start = caretPosition + string.block.length ; + len = 0; + start -= fixIeBug(string.block); + } + if ((selection === '' && string.replaceWith === '')) { + caretOffset += fixOperaBug(string.block); + + start = caretPosition + string.openBlockWith.length + string.openWith.length; + len = string.block.length - string.openBlockWith.length - string.openWith.length - string.closeWith.length - string.closeBlockWith.length; + + caretOffset = $$.val().substring(caretPosition, $$.val().length).length; + caretOffset -= fixOperaBug($$.val().substring(0, caretPosition)); + } + $.extend(hash, { caretPosition:caretPosition, scrollPosition:scrollPosition } ); + + if (string.block !== selection && abort === false) { + insert(string.block); + set(start, len); + } else { + caretOffset = -1; + } + get(); + + $.extend(hash, { line:'', selection:selection }); + + // callbacks after insertion + if ((ctrlKey === true && shiftKey === true) || button.multiline === true) { + prepare(clicked.afterMultiInsert); + } + prepare(clicked.afterInsert); + prepare(options.afterInsert); + + // refresh preview if opened + if (previewWindow && options.previewAutoRefresh) { + refreshPreview(); + } + + // reinit keyevent + shiftKey = altKey = ctrlKey = abort = false; + } + + // Substract linefeed in Opera + function fixOperaBug(string) { + if (browser.opera) { + return string.length - string.replace(/\n*/g, '').length; + } + return 0; + } + // Substract linefeed in IE + function fixIeBug(string) { + if (browser.msie) { + return string.length - string.replace(/\r*/g, '').length; + } + return 0; + } + + // add markup + function insert(block) { + if (document.selection) { + var newSelection = document.selection.createRange(); + newSelection.text = block; + } else { + textarea.value = textarea.value.substring(0, caretPosition) + block + textarea.value.substring(caretPosition + selection.length, textarea.value.length); + } + } + + // set a selection + function set(start, len) { + if (textarea.createTextRange){ + // quick fix to make it work on Opera 9.5 + if (browser.opera && browser.version >= 9.5 && len == 0) { + return false; + } + range = textarea.createTextRange(); + range.collapse(true); + range.moveStart('character', start); + range.moveEnd('character', len); + range.select(); + } else if (textarea.setSelectionRange ){ + textarea.setSelectionRange(start, start + len); + } + textarea.scrollTop = scrollPosition; + textarea.focus(); + } + + // get the selection + function get() { + textarea.focus(); + + scrollPosition = textarea.scrollTop; + if (document.selection) { + selection = document.selection.createRange().text; + if (browser.msie) { // ie + var range = document.selection.createRange(), rangeCopy = range.duplicate(); + rangeCopy.moveToElementText(textarea); + caretPosition = -1; + while(rangeCopy.inRange(range)) { + rangeCopy.moveStart('character'); + caretPosition ++; + } + } else { // opera + caretPosition = textarea.selectionStart; + } + } else { // gecko & webkit + caretPosition = textarea.selectionStart; + + selection = textarea.value.substring(caretPosition, textarea.selectionEnd); + } + return selection; + } + + // open preview window + function preview() { + if (typeof options.previewHandler === 'function') { + previewWindow = true; + } else if (options.previewInElement) { + previewWindow = $(options.previewInElement); + } else if (!previewWindow || previewWindow.closed) { + if (options.previewInWindow) { + previewWindow = window.open('', 'preview', options.previewInWindow); + $(window).unload(function() { + previewWindow.close(); + }); + } else { + iFrame = $(''); + if (options.previewPosition == 'after') { + iFrame.insertAfter(footer); + } else { + iFrame.insertBefore(header); + } + previewWindow = iFrame[iFrame.length - 1].contentWindow || frame[iFrame.length - 1]; + } + } else if (altKey === true) { + if (iFrame) { + iFrame.remove(); + } else { + previewWindow.close(); + } + previewWindow = iFrame = false; + } + if (!options.previewAutoRefresh) { + refreshPreview(); + } + if (options.previewInWindow) { + previewWindow.focus(); + } + } + + // refresh Preview window + function refreshPreview() { + renderPreview(); + } + + function renderPreview() { + var phtml; + var parsedData = $$.val(); + if (options.previewParser && typeof options.previewParser === 'function') { + parsedData = options.previewParser(parsedData); + } + if (options.previewHandler && typeof options.previewHandler === 'function') { + options.previewHandler(parsedData); + } else if (options.previewParserPath !== '') { + $.ajax({ + type: options.previewParserAjaxType, + dataType: 'text', + global: false, + url: options.previewParserPath, + data: options.previewParserVar+'='+encodeURIComponent(parsedData), + success: function(data) { + writeInPreview( localize(data, 1) ); + } + }); + } else { + if (!template) { + $.ajax({ + url: options.previewTemplatePath, + dataType: 'text', + global: false, + success: function(data) { + writeInPreview( localize(data, 1).replace(//g, parsedData) ); + } + }); + } + } + return false; + } + + function writeInPreview(data) { + if (options.previewInElement) { + $(options.previewInElement).html(data); + } else if (previewWindow && previewWindow.document) { + try { + sp = previewWindow.document.documentElement.scrollTop + } catch(e) { + sp = 0; + } + previewWindow.document.open(); + previewWindow.document.write(data); + previewWindow.document.close(); + previewWindow.document.documentElement.scrollTop = sp; + } + } + + // set keys pressed + function keyPressed(e) { + shiftKey = e.shiftKey; + altKey = e.altKey; + ctrlKey = (!(e.altKey && e.ctrlKey)) ? (e.ctrlKey || e.metaKey) : false; + + if (e.type === 'keydown') { + if (ctrlKey === true) { + li = $('a[accesskey="'+((e.keyCode == 13) ? '\\n' : String.fromCharCode(e.keyCode))+'"]', header).parent('li'); + if (li.length !== 0) { + ctrlKey = false; + setTimeout(function() { + li.triggerHandler('mouseup'); + },1); + return false; + } + } + if (e.keyCode === 13 || e.keyCode === 10) { // Enter key + if (ctrlKey === true) { // Enter + Ctrl + ctrlKey = false; + markup(options.onCtrlEnter); + return options.onCtrlEnter.keepDefault; + } else if (shiftKey === true) { // Enter + Shift + shiftKey = false; + markup(options.onShiftEnter); + return options.onShiftEnter.keepDefault; + } else { // only Enter + markup(options.onEnter); + return options.onEnter.keepDefault; + } + } + if (e.keyCode === 9) { // Tab key + if (shiftKey == true || ctrlKey == true || altKey == true) { + return false; + } + if (caretOffset !== -1) { + get(); + caretOffset = $$.val().length - caretOffset; + set(caretOffset, 0); + caretOffset = -1; + return false; + } else { + markup(options.onTab); + return options.onTab.keepDefault; + } + } + } + } + + function remove() { + $$.unbind(".markItUp").removeClass('markItUpEditor'); + $$.parent('div').parent('div.markItUp').parent('div').replaceWith($$); + + var relativeRef = $$.parent('div').parent('div.markItUp').parent('div'); + if (relativeRef.length) { + relativeRef.replaceWith($$); + } + + $$.data('markItUp', null); + } + + init(); + }); + }; + + $.fn.markItUpRemove = function() { + return this.each(function() { + $(this).markItUp('remove'); + } + ); + }; + + $.markItUp = function(settings) { + var options = { target:false }; + $.extend(options, settings); + if (options.target) { + return $(options.target).each(function() { + $(this).focus(); + $(this).trigger('insertion', [options]); + }); + } else { + $('textarea').trigger('insertion', [options]); + } + }; +})(jQuery); diff --git a/admin/scripts/markitup/jquery.markitup.pack.js b/admin/scripts/markitup/jquery.markitup.pack.js deleted file mode 100755 index 3b6bf77..0000000 --- a/admin/scripts/markitup/jquery.markitup.pack.js +++ /dev/null @@ -1,27 +0,0 @@ -// ---------------------------------------------------------------------------- -// markItUp! Universal MarkUp Engine, JQuery plugin -// v 1.1.2 beta -// Dual licensed under the MIT and GPL licenses. -// ---------------------------------------------------------------------------- -// Copyright (C) 2007-2008 Jay Salvat -// http://markitup.jaysalvat.com/ -// ---------------------------------------------------------------------------- -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// ---------------------------------------------------------------------------- -eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(3($){$.23.T=3(f,g){E k,v,A,K;v=A=K=7;k={C:\'\',12:\'\',U:\'\',1k:\'\',1B:o,24:\'25\',1l:\'~/2P/1C.14\',1c:\'\',26:\'27\',1m:o,1D:\'\',1E:\'\',1F:{},1G:{},1H:{},1I:{},28:[{}]};$.V(k,f,g);2(!k.U){$(\'2Q\').1d(3(a,b){1J=$(b).15(0).2R.2S(/(.*)2T\\.2U(\\.2V)?\\.2W$/);2(1J!==29){k.U=1J[1]}})}4 F.1d(3(){E d,u,16,17,p,G,L,P,18,1n,w,1o,M,19;d=$(F);u=F;16=[];19=7;17=p=0;G=-1;k.1c=1e(k.1c);k.1l=1e(k.1l);3 1e(a,b){2(b){4 a.W(/("|\')~\\//g,"$1"+k.U)}4 a.W(/^~\\//,k.U)}3 2a(){C=\'\';12=\'\';2(k.C){C=\'C="\'+k.C+\'"\'}8 2(d.1K("C")){C=\'C="T\'+(d.1K("C").2b(0,1).2X())+(d.1K("C").2b(1))+\'"\'}2(k.12){12=\'N="\'+k.12+\'"\'}d.1L(\'\');d.1L(\'\');d.1L(\'\');d.2c("2d");18=$(\'\').2e(d);$(1M(k.28)).1N(18);1n=$(\'\').1O(d);2(k.1m===o&&$.X.31!==o){1m=$(\'\').1O(d).1f("33",3(e){E h=d.2f(),y=e.2g,1p,1q;1p=3(e){d.2h("2f",34.35(20,e.2g+h-y)+"36");4 7};1q=3(e){$("14").1P("2i",1p).1P("1r",1q);4 7};$("14").1f("2i",1p).1f("1r",1q)});1n.2j(1m)}d.2k(1Q).37(1Q);d.1f("1R",3(e,a){2(a.1s!==7){15()}2(u===$.T.2l){Y(a)}});d.1g(3(){$.T.2l=F})}3 1M(b){E c=$(\'\'),i=0;$(\'B:2m > Z\',c).2h(\'38\',\'q\');$(b).1d(3(){E a=F,t=\'\',1t,B,j;1t=(a.1a)?(a.1S||\'\')+\' [39+\'+a.1a+\']\':(a.1S||\'\');1a=(a.1a)?\'2n="\'+a.1a+\'"\':\'\';2(a.2o){B=$(\'\'+(a.2o||\'\')+\'\').1N(c)}8{i++;2p(j=16.6-1;j>=0;j--){t+=16[j]+"-"}B=$(\'\'+(a.1S||\'\')+\'\').1f("3d",3(){4 7}).2r(3(){4 7}).1r(3(){2(a.2s){3e(a.2s)()}Y(a);4 7}).2m(3(){$(\'> Z\',F).3f();$(D).3g(\'2r\',3(){$(\'Z Z\',18).2t()})},3(){$(\'> Z\',F).2t()}).1N(c);2(a.2u){16.3h(i);$(B).2c(\'3i\').2j(1M(a.2u))}}});16.3j();4 c}3 2v(c){2(c){c=c.3k();c=c.W(/\\(\\!\\(([\\s\\S]*?)\\)\\!\\)/g,3(x,a){E b=a.1T(\'|!|\');2(K===o){4(b[1]!==2w)?b[1]:b[0]}8{4(b[1]===2w)?"":b[0]}});c=c.W(/\\[\\!\\[([\\s\\S]*?)\\]\\!\\]/g,3(x,a){E b=a.1T(\':!:\');2(19===o){4 7}1U=3l(b[0],(b[1])?b[1]:\'\');2(1U===29){19=o}4 1U});4 c}4""}3 H(a){2($.3m(a)){a=a(P)}4 2v(a)}3 1h(a){I=H(L.I);1b=H(L.1b);Q=H(L.Q);O=H(L.O);2(Q!==""){q=I+Q+O}8 2(l===\'\'&&1b!==\'\'){q=I+1b+O}8{q=I+(a||l)+O}4{q:q,I:I,Q:Q,1b:1b,O:O}}3 Y(a){E b,j,n,i;P=L=a;15();$.V(P,{1u:"",U:k.U,u:u,l:(l||\'\'),p:p,v:v,A:A,K:K});H(k.1D);H(L.1D);2(v===o&&A===o){H(L.3n)}$.V(P,{1u:1});2(v===o&&A===o){R=l.1T(/\\r?\\n/);2p(j=0,n=R.6,i=0;i=9.5&&b==0){4 7}1j=u.2A();1j.3s(o);1j.2B(\'21\',a);1j.3t(\'21\',b);1j.3u()}8 2(u.2C){u.2C(a,a+b)}u.1w=17;u.1g()}3 15(){u.1g();17=u.1w;2(D.l){l=D.l.1Z().2z;2($.X.2y){E a=D.l.1Z(),1x=a.3v();1x.3w(u);p=-1;3x(1x.3y(a)){1x.2B(\'21\');p++}}8{p=u.2D}}8{p=u.2D;l=d.J().1i(p,u.3z)}4 l}3 1C(){2(!w||w.3A){2(k.1k){w=3B.2E(\'\',\'1C\',k.1k)}8{M=$(\'<2F N="3C">\');2(k.24==\'25\'){M.1O(1n)}8{M.2e(18)}w=M[M.6-1].3D||3E[M.6-1]}}8 2(K===o){2(M){M.3F()}w.2G();w=M=7}2(!k.1B){1Y()}}3 1Y(){2(w.D){3G{22=w.D.2H.1w}3H(e){22=0}w.D.2E();w.D.3I(2I());w.D.2G();w.D.2H.1w=22}2(k.1k){w.1g()}}3 2I(){2(k.1c!==\'\'){$.2J({2K:\'3J\',2L:7,2M:k.1c,27:k.26+\'=\'+3K(d.J()),2N:3(a){14=1e(a,1)}})}8{2(!1o){$.2J({2L:7,2M:k.1l,2N:3(a){1o=1e(a,1)}})}14=1o.W(//g,d.J())}4 14}3 1Q(e){A=e.A;K=e.K;v=(!(e.K&&e.v))?e.v:7;2(e.2K===\'2k\'){2(v===o){B=$("a[2n="+3M.3N(e.1y)+"]",18).1z(\'B\');2(B.6!==0){v=7;B.3O(\'1r\');4 7}}2(e.1y===13||e.1y===10){2(v===o){v=7;Y(k.1H);4 k.1H.1A}8 2(A===o){A=7;Y(k.1G);4 k.1G.1A}8{Y(k.1F);4 k.1F.1A}}2(e.1y===9){2(G!==-1){15();G=d.J().6-G;1X(G,0);G=-1;4 7}8{Y(k.1I);4 k.1I.1A}}}}2a()})};$.23.3P=3(){4 F.1d(3(){$$=$(F).1P().3Q(\'2d\');$$.1z(\'z\').1z(\'z.T\').1z(\'z\').Q($$)})};$.T=3(a){E b={1s:7};$.V(b,a);2(b.1s){4 $(b.1s).1d(3(){$(F).1g();$(F).2O(\'1R\',[b])})}8{$(\'u\').2O(\'1R\',[b])}}})(3R);',62,240,'||if|function|return||length|false|else|||||||||||||selection|string||true|caretPosition|block||||textarea|ctrlKey|previewWindow|||div|shiftKey|li|id|document|var|this|caretOffset|prepare|openWith|val|altKey|clicked|iFrame|class|closeWith|hash|replaceWith|lines||markItUp|root|extend|replace|browser|markup|ul||start|nameSpace||html|get|levels|scrollPosition|header|abort|key|placeHolder|previewParserPath|each|localize|bind|focus|build|substring|range|previewInWindow|previewTemplatePath|resizeHandle|footer|template|mouseMove|mouseUp|mouseup|target|title|line|fixIeBug|scrollTop|rangeCopy|keyCode|parent|keepDefault|previewAutoRefresh|preview|beforeInsert|afterInsert|onEnter|onShiftEnter|onCtrlEnter|onTab|miuScript|attr|wrap|dropMenus|appendTo|insertAfter|unbind|keyPressed|insertion|name|split|value|opera|fixOperaBug|set|refreshPreview|createRange||character|sp|fn|previewPosition|after|previewParserVar|data|markupSet|null|init|substr|addClass|markItUpEditor|insertBefore|height|clientY|css|mousemove|append|keydown|focused|hover|accesskey|separator|for|markItUpButton|click|call|hide|dropMenu|magicMarkups|undefined|insert|msie|text|createTextRange|moveStart|setSelectionRange|selectionStart|open|iframe|close|documentElement|renderPreview|ajax|type|async|url|success|trigger|templates|script|src|match|jquery|markitup|pack|js|toUpperCase|markItUpContainer|markItUpHeader|markItUpFooter|safari|markItUpResizeHandle|mousedown|Math|max|px|keyup|display|Ctrl|markItUpSeparator|className|href|contextmenu|eval|show|one|push|markItUpDropMenu|pop|toString|prompt|isFunction|beforeMultiInsert|trim|join|afterMultiInsert|version|collapse|moveEnd|select|duplicate|moveToElementText|while|inRange|selectionEnd|closed|window|markItUpPreviewFrame|contentWindow|frame|remove|try|catch|write|POST|encodeURIComponent|content|String|fromCharCode|triggerHandler|markItUpRemove|removeClass|jQuery'.split('|'),0,{})) \ No newline at end of file diff --git a/admin/scripts/markitup/sets/html/images/bold.png b/admin/scripts/markitup/sets/default/images/bold.png similarity index 100% rename from admin/scripts/markitup/sets/html/images/bold.png rename to admin/scripts/markitup/sets/default/images/bold.png diff --git a/admin/scripts/markitup/sets/html/images/clean.png b/admin/scripts/markitup/sets/default/images/clean.png similarity index 100% rename from admin/scripts/markitup/sets/html/images/clean.png rename to admin/scripts/markitup/sets/default/images/clean.png diff --git a/admin/scripts/markitup/sets/html/images/image.png b/admin/scripts/markitup/sets/default/images/image.png similarity index 100% rename from admin/scripts/markitup/sets/html/images/image.png rename to admin/scripts/markitup/sets/default/images/image.png diff --git a/admin/scripts/markitup/sets/html/images/italic.png b/admin/scripts/markitup/sets/default/images/italic.png similarity index 100% rename from admin/scripts/markitup/sets/html/images/italic.png rename to admin/scripts/markitup/sets/default/images/italic.png diff --git a/admin/scripts/markitup/sets/html/images/link.png b/admin/scripts/markitup/sets/default/images/link.png similarity index 100% rename from admin/scripts/markitup/sets/html/images/link.png rename to admin/scripts/markitup/sets/default/images/link.png diff --git a/admin/scripts/markitup/sets/html/images/list-bullet.png b/admin/scripts/markitup/sets/default/images/list-bullet.png similarity index 100% rename from admin/scripts/markitup/sets/html/images/list-bullet.png rename to admin/scripts/markitup/sets/default/images/list-bullet.png diff --git a/admin/scripts/markitup/sets/html/images/list-numeric.png b/admin/scripts/markitup/sets/default/images/list-numeric.png similarity index 100% rename from admin/scripts/markitup/sets/html/images/list-numeric.png rename to admin/scripts/markitup/sets/default/images/list-numeric.png diff --git a/admin/scripts/markitup/sets/html/images/picture.png b/admin/scripts/markitup/sets/default/images/picture.png similarity index 100% rename from admin/scripts/markitup/sets/html/images/picture.png rename to admin/scripts/markitup/sets/default/images/picture.png diff --git a/admin/scripts/markitup/sets/html/images/preview.png b/admin/scripts/markitup/sets/default/images/preview.png similarity index 100% rename from admin/scripts/markitup/sets/html/images/preview.png rename to admin/scripts/markitup/sets/default/images/preview.png diff --git a/admin/scripts/markitup/sets/html/images/stroke.png b/admin/scripts/markitup/sets/default/images/stroke.png similarity index 100% rename from admin/scripts/markitup/sets/html/images/stroke.png rename to admin/scripts/markitup/sets/default/images/stroke.png diff --git a/admin/scripts/markitup/sets/default/set.js b/admin/scripts/markitup/sets/default/set.js new file mode 100755 index 0000000..b7fdf81 --- /dev/null +++ b/admin/scripts/markitup/sets/default/set.js @@ -0,0 +1,30 @@ +// ---------------------------------------------------------------------------- +// markItUp! +// ---------------------------------------------------------------------------- +// Copyright (C) 2011 Jay Salvat +// http://markitup.jaysalvat.com/ +// ---------------------------------------------------------------------------- +// Html tags +// http://en.wikipedia.org/wiki/html +// ---------------------------------------------------------------------------- +// Basic set. Feel free to add more tags +// ---------------------------------------------------------------------------- +var mySettings = { + onShiftEnter: {keepDefault:false, replaceWith:'
    \n'}, + onCtrlEnter: {keepDefault:false, openWith:'\n

    ', closeWith:'

    '}, + onTab: {keepDefault:false, replaceWith:' '}, + markupSet: [ + {name:'Bold', key:'B', openWith:'(!(|!|)!)', closeWith:'(!(|!|)!)' }, + {name:'Italic', key:'I', openWith:'(!(|!|)!)', closeWith:'(!(|!|)!)' }, + {name:'Stroke through', key:'S', openWith:'', closeWith:'' }, + {separator:'---------------' }, + {name:'Bulleted List', openWith:'
  • ', closeWith:'
  • ', multiline:true, openBlockWith:''}, + {name:'Numeric List', openWith:'
  • ', closeWith:'
  • ', multiline:true, openBlockWith:'
      \n', closeBlockWith:'\n
    '}, + {separator:'---------------' }, + {name:'Picture', key:'P', replaceWith:'[![Alternative text]!]' }, + {name:'Link', key:'L', openWith:'', closeWith:'', placeHolder:'Your text to link...' }, + {separator:'---------------' }, + {name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } }, + {name:'Preview', className:'preview', call:'preview'} + ] +} diff --git a/admin/scripts/markitup/sets/default/style.css b/admin/scripts/markitup/sets/default/style.css new file mode 100755 index 0000000..b1d20d6 --- /dev/null +++ b/admin/scripts/markitup/sets/default/style.css @@ -0,0 +1,34 @@ +/* ------------------------------------------------------------------- +// markItUp! +// By Jay Salvat - http://markitup.jaysalvat.com/ +// ------------------------------------------------------------------*/ +.markItUp .markItUpButton1 a { + background-image:url(images/bold.png); +} +.markItUp .markItUpButton2 a { + background-image:url(images/italic.png); +} +.markItUp .markItUpButton3 a { + background-image:url(images/stroke.png); +} + +.markItUp .markItUpButton4 a { + background-image:url(images/list-bullet.png); +} +.markItUp .markItUpButton5 a { + background-image:url(images/list-numeric.png); +} + +.markItUp .markItUpButton6 a { + background-image:url(images/picture.png); +} +.markItUp .markItUpButton7 a { + background-image:url(images/link.png); +} + +.markItUp .markItUpButton8 a { + background-image:url(images/clean.png); +} +.markItUp .preview a { + background-image:url(images/preview.png); +} diff --git a/admin/scripts/markitup/sets/html/images/code.png b/admin/scripts/markitup/sets/html/images/code.png deleted file mode 100755 index 63fe6ce..0000000 Binary files a/admin/scripts/markitup/sets/html/images/code.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/images/fonts.png b/admin/scripts/markitup/sets/html/images/fonts.png deleted file mode 100755 index b7960db..0000000 Binary files a/admin/scripts/markitup/sets/html/images/fonts.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/images/h1.png b/admin/scripts/markitup/sets/html/images/h1.png deleted file mode 100755 index 9c122e9..0000000 Binary files a/admin/scripts/markitup/sets/html/images/h1.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/images/h2.png b/admin/scripts/markitup/sets/html/images/h2.png deleted file mode 100755 index fbd8765..0000000 Binary files a/admin/scripts/markitup/sets/html/images/h2.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/images/h3.png b/admin/scripts/markitup/sets/html/images/h3.png deleted file mode 100755 index c7836cf..0000000 Binary files a/admin/scripts/markitup/sets/html/images/h3.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/images/h4.png b/admin/scripts/markitup/sets/html/images/h4.png deleted file mode 100755 index 4e929ea..0000000 Binary files a/admin/scripts/markitup/sets/html/images/h4.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/images/h5.png b/admin/scripts/markitup/sets/html/images/h5.png deleted file mode 100755 index 30cabeb..0000000 Binary files a/admin/scripts/markitup/sets/html/images/h5.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/images/h6.png b/admin/scripts/markitup/sets/html/images/h6.png deleted file mode 100755 index 058170a..0000000 Binary files a/admin/scripts/markitup/sets/html/images/h6.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/images/list-item.png b/admin/scripts/markitup/sets/html/images/list-item.png deleted file mode 100755 index 8cb4d69..0000000 Binary files a/admin/scripts/markitup/sets/html/images/list-item.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/images/more.png b/admin/scripts/markitup/sets/html/images/more.png deleted file mode 100755 index 85bb2f0..0000000 Binary files a/admin/scripts/markitup/sets/html/images/more.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/images/paragraph.png b/admin/scripts/markitup/sets/html/images/paragraph.png deleted file mode 100755 index 95704fb..0000000 Binary files a/admin/scripts/markitup/sets/html/images/paragraph.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/images/quotes.png b/admin/scripts/markitup/sets/html/images/quotes.png deleted file mode 100755 index e54ebeb..0000000 Binary files a/admin/scripts/markitup/sets/html/images/quotes.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/images/underline.png b/admin/scripts/markitup/sets/html/images/underline.png deleted file mode 100755 index 90d0df2..0000000 Binary files a/admin/scripts/markitup/sets/html/images/underline.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/images/url.png b/admin/scripts/markitup/sets/html/images/url.png deleted file mode 100755 index b8edc12..0000000 Binary files a/admin/scripts/markitup/sets/html/images/url.png and /dev/null differ diff --git a/admin/scripts/markitup/sets/html/set.js b/admin/scripts/markitup/sets/html/set.js deleted file mode 100755 index 1db1e2e..0000000 --- a/admin/scripts/markitup/sets/html/set.js +++ /dev/null @@ -1 +0,0 @@ -my_html={nameSpace:"my_html",onShiftEnter:{keepDefault:!1,replaceWith:"
    \n"},onCtrlEnter:{keepDefault:!1,openWith:"\n

    ",closeWith:"

    \n"},onTab:{keepDefault:!1,openWith:"\t "},markupSet:[{name:"Paragraph",openWith:'',closeWith:"

    "},{separator:"---------------"},{name:"Bold",key:"B",openWith:"(!(|!|)!)",closeWith:"(!(|!|)!)"},{name:"Italic",key:"I",openWith:"(!(|!|)!)",closeWith:"(!(|!|)!)"},{name:"Stroke through",key:"S",openWith:"",closeWith:""},{separator:"---------------"},{name:"Ul",openWith:"
      \n",closeWith:"
    \n"},{name:"Ol",openWith:"
      \n",closeWith:"
    \n"},{name:"Li",openWith:"
  • ",closeWith:"
  • "},{separator:"---------------"},{name:"Link",key:"L",openWith:'',closeWith:"",placeHolder:"Your text to link..."},{separator:"---------------"},{name:"Quote block",openWith:"
    \n",closeWith:"
    \n"},{name:"Code block",openWith:"\n",closeWith:"\n"},{separator:"---------------"},{name:"Clean",replaceWith:function(e){return e.selection.replace(/<(.*?)>/g,"")}}]}; diff --git a/admin/scripts/markitup/sets/html/style.css b/admin/scripts/markitup/sets/html/style.css deleted file mode 100755 index 50acb8b..0000000 --- a/admin/scripts/markitup/sets/html/style.css +++ /dev/null @@ -1 +0,0 @@ -.markItUpButton1 a{background-image:url(images/paragraph.png)}.markItUpButton2 a{background-image:url(images/bold.png)}.markItUpButton3 a{background-image:url(images/italic.png)}.markItUpButton4 a{background-image:url(images/stroke.png)}.markItUpButton5 a{background-image:url(images/list-bullet.png)}.markItUpButton6 a{background-image:url(images/list-numeric.png)}.markItUpButton7 a{background-image:url(images/list-item.png)}.markItUpButton8 a{background-image:url(images/link.png)}.markItUpButton9 a{background-image:url(images/quotes.png)}.markItUpButton10 a{background-image:url(images/code.png)}.markItUpButton11 a{background-image:url(images/clean.png)} diff --git a/admin/scripts/markitup/skins/markitup/images/bg-container.png b/admin/scripts/markitup/skins/markitup/images/bg-container.png new file mode 100755 index 0000000..ec38b8e Binary files /dev/null and b/admin/scripts/markitup/skins/markitup/images/bg-container.png differ diff --git a/admin/scripts/markitup/skins/markitup/images/bg-editor-bbcode.png b/admin/scripts/markitup/skins/markitup/images/bg-editor-bbcode.png new file mode 100755 index 0000000..39cdbd8 Binary files /dev/null and b/admin/scripts/markitup/skins/markitup/images/bg-editor-bbcode.png differ diff --git a/admin/scripts/markitup/skins/markitup/images/bg-editor-dotclear.png b/admin/scripts/markitup/skins/markitup/images/bg-editor-dotclear.png new file mode 100755 index 0000000..b3188dc Binary files /dev/null and b/admin/scripts/markitup/skins/markitup/images/bg-editor-dotclear.png differ diff --git a/admin/scripts/markitup/skins/markitup/images/bg-editor-html.png b/admin/scripts/markitup/skins/markitup/images/bg-editor-html.png new file mode 100755 index 0000000..11bff45 Binary files /dev/null and b/admin/scripts/markitup/skins/markitup/images/bg-editor-html.png differ diff --git a/admin/scripts/markitup/skins/markitup/images/bg-editor-json.png b/admin/scripts/markitup/skins/markitup/images/bg-editor-json.png new file mode 100755 index 0000000..e898c1d Binary files /dev/null and b/admin/scripts/markitup/skins/markitup/images/bg-editor-json.png differ diff --git a/admin/scripts/markitup/skins/markitup/images/bg-editor-markdown.png b/admin/scripts/markitup/skins/markitup/images/bg-editor-markdown.png new file mode 100755 index 0000000..c199715 Binary files /dev/null and b/admin/scripts/markitup/skins/markitup/images/bg-editor-markdown.png differ diff --git a/admin/scripts/markitup/skins/markitup/images/bg-editor-textile.png b/admin/scripts/markitup/skins/markitup/images/bg-editor-textile.png new file mode 100755 index 0000000..3ab1e9f Binary files /dev/null and b/admin/scripts/markitup/skins/markitup/images/bg-editor-textile.png differ diff --git a/admin/scripts/markitup/skins/markitup/images/bg-editor-wiki.png b/admin/scripts/markitup/skins/markitup/images/bg-editor-wiki.png new file mode 100755 index 0000000..7887181 Binary files /dev/null and b/admin/scripts/markitup/skins/markitup/images/bg-editor-wiki.png differ diff --git a/admin/scripts/markitup/skins/markitup/images/bg-editor-xml.png b/admin/scripts/markitup/skins/markitup/images/bg-editor-xml.png new file mode 100755 index 0000000..33b1c5d Binary files /dev/null and b/admin/scripts/markitup/skins/markitup/images/bg-editor-xml.png differ diff --git a/admin/scripts/markitup/skins/markitup/images/bg-editor.png b/admin/scripts/markitup/skins/markitup/images/bg-editor.png new file mode 100755 index 0000000..ab7cde4 Binary files /dev/null and b/admin/scripts/markitup/skins/markitup/images/bg-editor.png differ diff --git a/admin/scripts/markitup/skins/markitup/images/handle.png b/admin/scripts/markitup/skins/markitup/images/handle.png new file mode 100755 index 0000000..3993b20 Binary files /dev/null and b/admin/scripts/markitup/skins/markitup/images/handle.png differ diff --git a/admin/scripts/markitup/skins/markitup/images/menu.png b/admin/scripts/markitup/skins/markitup/images/menu.png new file mode 100755 index 0000000..de337c8 Binary files /dev/null and b/admin/scripts/markitup/skins/markitup/images/menu.png differ diff --git a/admin/scripts/markitup/skins/markitup/images/submenu.png b/admin/scripts/markitup/skins/markitup/images/submenu.png new file mode 100755 index 0000000..03d1977 Binary files /dev/null and b/admin/scripts/markitup/skins/markitup/images/submenu.png differ diff --git a/admin/scripts/markitup/skins/markitup/style.css b/admin/scripts/markitup/skins/markitup/style.css new file mode 100755 index 0000000..c11c2ea --- /dev/null +++ b/admin/scripts/markitup/skins/markitup/style.css @@ -0,0 +1,147 @@ +/* ------------------------------------------------------------------- +// markItUp! Universal MarkUp Engine, JQuery plugin +// By Jay Salvat - http://markitup.jaysalvat.com/ +// ------------------------------------------------------------------*/ +.markItUp * { + margin:0px; padding:0px; + outline:none; +} +.markItUp a:link, +.markItUp a:visited { + color:#000; + text-decoration:none; +} +.markItUp { + width:700px; + margin:5px 0 5px 0; + border:5px solid #F5F5F5; +} +.markItUpContainer { + border:1px solid #3C769D; + background:#FFF url(images/bg-container.png) repeat-x top left; + padding:5px 5px 2px 5px; + font:11px Verdana, Arial, Helvetica, sans-serif; +} +.markItUpEditor { + font:12px 'Courier New', Courier, monospace; + padding:5px 5px 5px 35px; + border:3px solid #3C769D; + width:643px; + height:320px; + background:#FFF url(images/bg-editor.png) no-repeat; + clear:both; + line-height:18px; + overflow:auto; +} +.markItUpPreviewFrame { + overflow:auto; + background-color:#FFFFFF; + border:1px solid #3C769D; + width:99.9%; + height:300px; + margin:5px 0; +} +.markItUpFooter { + width:100%; + cursor:n-resize; +} +.markItUpResizeHandle { + overflow:hidden; + width:22px; height:5px; + margin-left:auto; + margin-right:auto; + background-image:url(images/handle.png); + cursor:n-resize; +} +/***************************************************************************************/ +/* first row of buttons */ +.markItUpHeader ul li { + list-style:none; + float:left; + position:relative; +} +.markItUpHeader ul li ul{ + display:none; +} +.markItUpHeader ul li:hover > ul{ + display:block; +} +.markItUpHeader ul .markItUpDropMenu { + background:transparent url(images/menu.png) no-repeat 115% 50%; + margin-right:5px; +} +.markItUpHeader ul .markItUpDropMenu li { + margin-right:0px; +} +.markItUpHeader ul .markItUpSeparator { + margin:0 10px; + width:1px; + height:16px; + overflow:hidden; + background-color:#CCC; +} +.markItUpHeader ul ul .markItUpSeparator { + width:auto; height:1px; + margin:0px; +} +/* next rows of buttons */ +.markItUpHeader ul ul { + display:none; + position:absolute; + top:18px; left:0px; + background:#F5F5F5; + border:1px solid #3C769D; + height:inherit; +} +.markItUpHeader ul ul li { + float:none; + border-bottom:1px solid #3C769D; +} +.markItUpHeader ul ul .markItUpDropMenu { + background:#F5F5F5 url(images/submenu.png) no-repeat 100% 50%; +} +/* next rows of buttons */ +.markItUpHeader ul ul ul { + position:absolute; + top:-1px; left:150px; +} +.markItUpHeader ul ul ul li { + float:none; +} +.markItUpHeader ul a { + display:block; + width:16px; height:16px; + text-indent:-10000px; + background-repeat:no-repeat; + padding:3px; + margin:0px; +} +.markItUpHeader ul ul a { + display:block; + padding-left:0px; + text-indent:0; + width:120px; + padding:5px 5px 5px 25px; + background-position:2px 50%; +} +.markItUpHeader ul ul a:hover { + color:#FFF; + background-color:#3C769D; +} +/***************************************************************************************/ +.html .markItUpEditor { + background-image:url(images/bg-editor-html.png); +} +.markdown .markItUpEditor { + background-image:url(images/bg-editor-markdown.png); +} +.textile .markItUpEditor { + background-image:url(images/bg-editor-textile.png); +} +.bbcode .markItUpEditor { + background-image:url(images/bg-editor-bbcode.png); +} +.wiki .markItUpEditor, +.dotclear .markItUpEditor { + background-image:url(images/bg-editor-wiki.png); +} \ No newline at end of file diff --git a/admin/scripts/markitup/skins/simple/style.css b/admin/scripts/markitup/skins/simple/style.css index d94ab94..fe3753c 100755 --- a/admin/scripts/markitup/skins/simple/style.css +++ b/admin/scripts/markitup/skins/simple/style.css @@ -1 +1,118 @@ -#poststuff{position:relative!important}#submitpost{position:absolute!important;right:0!important;float:none!important}.markItUp *{margin:0;padding:0;border:0;outline:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline}.markItUp a:link,.markItUp a:visited{color:#000;text-decoration:none}.markItUp{width:700px;margin:5px 0}.markItUpContainer{font:11px Verdana,Arial,Helvetica,sans-serif}.markItUpEditor{font:12px 'Courier New',Courier,monospace;padding:5px;width:690px;height:320px;clear:both;display:block;line-height:18px;overflow:auto}.markItUpPreviewFrame{overflow:auto;background-color:#FFF;width:99.9%;height:300px;margin:5px 0}.markItUpFooter{width:100%}.markItUpResizeHandle{overflow:hidden;width:22px;height:5px;margin-left:auto;margin-right:auto;background-image:url(images/handle.png);cursor:n-resize}.markItUpHeader ul li{list-style:none;float:left;position:relative}.markItUpHeader ul li:hover>ul{display:block}.markItUpHeader ul .markItUpDropMenu{background:url(images/menu.png) 115% 50% no-repeat;margin-right:5px}.markItUpHeader ul .markItUpDropMenu li{margin-right:0}.markItUpHeader ul ul{display:none;position:absolute;top:18px;left:0;background:#FFF;border:1px solid #000}.markItUpHeader ul ul li{float:none;border-bottom:1px solid #000}.markItUpHeader ul ul .markItUpDropMenu{background:url(images/submenu.png) 100% 50% no-repeat #FFF}.markItUpHeader ul .markItUpSeparator{margin:0 10px;width:1px;height:16px;overflow:hidden;background-color:#CCC}.markItUpHeader ul ul .markItUpSeparator{width:auto;height:1px;margin:0}.markItUpHeader ul ul ul{position:absolute;top:-1px;left:150px}.markItUpHeader ul ul ul li{float:none}.markItUpHeader ul a{display:block;width:16px;height:16px;text-indent:-10000px;background-repeat:no-repeat;padding:3px;margin:0}.markItUpHeader ul ul a{display:block;text-indent:0;width:120px;padding:5px 5px 5px 25px;background-position:2px 50%}.markItUpHeader ul ul a:hover{color:#FFF;background-color:#000} +/* ------------------------------------------------------------------- +// markItUp! Universal MarkUp Engine, JQuery plugin +// By Jay Salvat - http://markitup.jaysalvat.com/ +// ------------------------------------------------------------------*/ +.markItUp * { + margin:0px; padding:0px; + outline:none; +} +.markItUp a:link, +.markItUp a:visited { + color:#000; + text-decoration:none; +} +.markItUp { + width:700px; + margin:5px 0 5px 0; +} +.markItUpContainer { + font:11px Verdana, Arial, Helvetica, sans-serif; +} +.markItUpEditor { + font:12px 'Courier New', Courier, monospace; + padding:5px; + width:690px; + height:320px; + clear:both; + line-height:18px; + overflow:auto; +} +.markItUpPreviewFrame { + overflow:auto; + background-color:#FFF; + width:99.9%; + height:300px; + margin:5px 0; +} +.markItUpFooter { + width:100%; +} +.markItUpResizeHandle { + overflow:hidden; + width:22px; height:5px; + margin-left:auto; + margin-right:auto; + background-image:url(images/handle.png); + cursor:n-resize; +} +/***************************************************************************************/ +/* first row of buttons */ +.markItUpHeader ul li { + list-style:none; + float:left; + position:relative; +} +.markItUpHeader ul li:hover > ul{ + display:block; +} +.markItUpHeader ul .markItUpDropMenu { + background:transparent url(images/menu.png) no-repeat 115% 50%; + margin-right:5px; +} +.markItUpHeader ul .markItUpDropMenu li { + margin-right:0px; +} +/* next rows of buttons */ +.markItUpHeader ul ul { + display:none; + position:absolute; + top:18px; left:0px; + background:#FFF; + border:1px solid #000; +} +.markItUpHeader ul ul li { + float:none; + border-bottom:1px solid #000; +} +.markItUpHeader ul ul .markItUpDropMenu { + background:#FFF url(images/submenu.png) no-repeat 100% 50%; +} +.markItUpHeader ul .markItUpSeparator { + margin:0 10px; + width:1px; + height:16px; + overflow:hidden; + background-color:#CCC; +} +.markItUpHeader ul ul .markItUpSeparator { + width:auto; height:1px; + margin:0px; +} +/* next rows of buttons */ +.markItUpHeader ul ul ul { + position:absolute; + top:-1px; left:150px; +} +.markItUpHeader ul ul ul li { + float:none; +} +.markItUpHeader ul a { + display:block; + width:16px; height:16px; + text-indent:-10000px; + background-repeat:no-repeat; + padding:3px; + margin:0px; +} +.markItUpHeader ul ul a { + display:block; + padding-left:0px; + text-indent:0; + width:120px; + padding:5px 5px 5px 25px; + background-position:2px 50%; +} +.markItUpHeader ul ul a:hover { + color:#FFF; + background-color:#000; +} diff --git a/admin/scripts/markitup/templates/preview.css b/admin/scripts/markitup/templates/preview.css new file mode 100755 index 0000000..550c6b8 --- /dev/null +++ b/admin/scripts/markitup/templates/preview.css @@ -0,0 +1,5 @@ +/* preview style examples */ +body { + background-color:#EFEFEF; + font:70% Verdana, Arial, Helvetica, sans-serif; +} \ No newline at end of file diff --git a/admin/scripts/markitup/templates/preview.html b/admin/scripts/markitup/templates/preview.html new file mode 100755 index 0000000..181f114 --- /dev/null +++ b/admin/scripts/markitup/templates/preview.html @@ -0,0 +1,11 @@ + + + + +markItUp! preview template + + + + + +