Mirador hasn't been enabled. Please contact Toolkit staff to enable this feature.
28 | 31 | 32 |├── .gitmodules ├── assets ├── mirador │ ├── plugins │ │ ├── example_dependency │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── compat3x │ │ │ ├── img │ │ │ │ ├── icons.gif │ │ │ │ ├── items.gif │ │ │ │ ├── tabs.gif │ │ │ │ ├── buttons.png │ │ │ │ ├── progress.gif │ │ │ │ ├── menu_arrow.gif │ │ │ │ └── menu_check.gif │ │ │ ├── utils │ │ │ │ └── editable_selects.js │ │ │ └── plugin.min.js │ │ ├── media │ │ │ └── moxieplayer.swf │ │ ├── visualblocks │ │ │ ├── img │ │ │ │ ├── dl.gif │ │ │ │ ├── h1.gif │ │ │ │ ├── h2.gif │ │ │ │ ├── h3.gif │ │ │ │ ├── h4.gif │ │ │ │ ├── h5.gif │ │ │ │ ├── h6.gif │ │ │ │ ├── ol.gif │ │ │ │ ├── p.gif │ │ │ │ ├── ul.gif │ │ │ │ ├── div.gif │ │ │ │ ├── pre.gif │ │ │ │ ├── address.gif │ │ │ │ ├── article.gif │ │ │ │ ├── aside.gif │ │ │ │ ├── figure.gif │ │ │ │ ├── hgroup.gif │ │ │ │ ├── section.gif │ │ │ │ └── blockquote.gif │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── emoticons │ │ │ ├── img │ │ │ │ ├── smiley-cry.gif │ │ │ │ ├── smiley-cool.gif │ │ │ │ ├── smiley-frown.gif │ │ │ │ ├── smiley-kiss.gif │ │ │ │ ├── smiley-smile.gif │ │ │ │ ├── smiley-wink.gif │ │ │ │ ├── smiley-yell.gif │ │ │ │ ├── smiley-innocent.gif │ │ │ │ ├── smiley-laughing.gif │ │ │ │ ├── smiley-sealed.gif │ │ │ │ ├── smiley-embarassed.gif │ │ │ │ ├── smiley-surprised.gif │ │ │ │ ├── smiley-tongue-out.gif │ │ │ │ ├── smiley-undecided.gif │ │ │ │ ├── smiley-foot-in-mouth.gif │ │ │ │ └── smiley-money-mouth.gif │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── example │ │ │ ├── dialog.html │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── print │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── hr │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── anchor │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── nonbreaking │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── code │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── directionality │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── contextmenu │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── wordcount │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── visualchars │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── save │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── pagebreak │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── colorpicker │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── tabfocus │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── advlist │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── preview │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── fullscreen │ │ │ └── plugin.min.js │ │ ├── autoresize │ │ │ └── plugin.min.js │ │ ├── autolink │ │ │ └── plugin.min.js │ │ ├── importcss │ │ │ └── plugin.min.js │ │ ├── insertdatetime │ │ │ └── plugin.min.js │ │ ├── autosave │ │ │ └── plugin.min.js │ │ ├── textpattern │ │ │ └── plugin.min.js │ │ ├── layer │ │ │ └── plugin.min.js │ │ ├── bbcode │ │ │ └── plugin.min.js │ │ ├── legacyoutput │ │ │ └── plugin.min.js │ │ ├── spellchecker │ │ │ └── plugin.dev.js │ │ ├── table │ │ │ └── plugin.dev.js │ │ ├── paste │ │ │ ├── classes │ │ │ │ ├── Plugin.js │ │ │ │ └── Utils.js │ │ │ └── plugin.dev.js │ │ └── textcolor │ │ │ └── plugin.min.js │ ├── ZeroClipboard.swf │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── MaterialIcons-Regular.eot │ │ ├── MaterialIcons-Regular.ttf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ ├── fontawesome-webfont.woff2 │ │ ├── MaterialIcons-Regular.woff │ │ └── MaterialIcons-Regular.woff2 │ ├── images │ │ ├── debut_dark.png │ │ ├── border_type_1.png │ │ ├── border_type_2.png │ │ └── border_type_3.png │ ├── skins │ │ └── lightgray │ │ │ ├── img │ │ │ ├── anchor.gif │ │ │ ├── loader.gif │ │ │ ├── object.gif │ │ │ └── trans.gif │ │ │ ├── fonts │ │ │ ├── tinymce.eot │ │ │ ├── tinymce.ttf │ │ │ ├── tinymce.woff │ │ │ ├── tinymce-small.eot │ │ │ ├── tinymce-small.ttf │ │ │ └── tinymce-small.woff │ │ │ ├── content.inline.min.css │ │ │ └── content.min.css │ ├── sample_manifest.js │ └── locales │ │ ├── es │ │ └── translation.json │ │ ├── ga │ │ └── translation.json │ │ ├── ar │ │ └── translation.json │ │ ├── nl │ │ └── translation.json │ │ ├── de │ │ └── translation.json │ │ ├── zh-CN │ │ └── translation.json │ │ ├── zh-TW │ │ └── translation.json │ │ ├── zh │ │ └── translation.json │ │ ├── ko │ │ └── translation.json │ │ ├── ja │ │ └── translation.json │ │ ├── en │ │ └── translation.json │ │ └── fr │ │ └── translation.json ├── css │ ├── icons │ │ ├── tl-icons.ttf │ │ └── tl-icons.woff2 │ ├── podcasts.css │ └── carousel.css ├── images │ ├── DPLA-square-logo-color.jpeg │ ├── Overcastbutton2-300x106.png │ ├── Spotify-images-300x110.png │ ├── Stitcher-button-300x110.jpg │ ├── subscribe-iTunes-300x91.png │ └── PodcastAvailableonGooglePlayMusic-300x110.png └── js │ ├── zoom.js │ ├── breadcrumb.js │ ├── mce-button.js │ ├── tiles.js │ ├── gallery.js │ └── item_meta_helper.js ├── query ├── wrappers.php └── Query.php ├── templates ├── download.php ├── mirador.php ├── browse.php └── item.php ├── public-ui └── wrappers.php ├── .gitignore ├── debug └── Debug.php ├── config.php ├── config.php.dist ├── devMessage.php.dist ├── inc ├── breadcrumb.php ├── browse.php └── metabox.php ├── admin-ui ├── callbacks │ ├── Leaflet.php │ ├── Form.php │ ├── Iiif.php │ ├── Collections.php │ ├── Niec.php │ ├── Browse.php │ └── Search.php ├── Scripts.php └── wrappers.php └── util ├── AdminConfig.php ├── WPOptionsUtilities.php └── wrappers.php /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "libraries/Ceres"] 2 | path = libraries/Ceres 3 | url = https://github.com/NEU-DSG/Ceres 4 | -------------------------------------------------------------------------------- /assets/mirador/plugins/example_dependency/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("example_dependency",function(){},["example"]); -------------------------------------------------------------------------------- /assets/css/icons/tl-icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/css/icons/tl-icons.ttf -------------------------------------------------------------------------------- /assets/css/icons/tl-icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/css/icons/tl-icons.woff2 -------------------------------------------------------------------------------- /assets/mirador/ZeroClipboard.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/ZeroClipboard.swf -------------------------------------------------------------------------------- /assets/mirador/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /assets/mirador/images/debut_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/images/debut_dark.png -------------------------------------------------------------------------------- /assets/images/DPLA-square-logo-color.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/images/DPLA-square-logo-color.jpeg -------------------------------------------------------------------------------- /assets/images/Overcastbutton2-300x106.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/images/Overcastbutton2-300x106.png -------------------------------------------------------------------------------- /assets/images/Spotify-images-300x110.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/images/Spotify-images-300x110.png -------------------------------------------------------------------------------- /assets/images/Stitcher-button-300x110.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/images/Stitcher-button-300x110.jpg -------------------------------------------------------------------------------- /assets/images/subscribe-iTunes-300x91.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/images/subscribe-iTunes-300x91.png -------------------------------------------------------------------------------- /assets/mirador/images/border_type_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/images/border_type_1.png -------------------------------------------------------------------------------- /assets/mirador/images/border_type_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/images/border_type_2.png -------------------------------------------------------------------------------- /assets/mirador/images/border_type_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/images/border_type_3.png -------------------------------------------------------------------------------- /assets/mirador/fonts/MaterialIcons-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/fonts/MaterialIcons-Regular.eot -------------------------------------------------------------------------------- /assets/mirador/fonts/MaterialIcons-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/fonts/MaterialIcons-Regular.ttf -------------------------------------------------------------------------------- /assets/mirador/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /assets/mirador/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /assets/mirador/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /assets/mirador/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /assets/mirador/plugins/compat3x/img/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/compat3x/img/icons.gif -------------------------------------------------------------------------------- /assets/mirador/plugins/compat3x/img/items.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/compat3x/img/items.gif -------------------------------------------------------------------------------- /assets/mirador/plugins/compat3x/img/tabs.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/compat3x/img/tabs.gif -------------------------------------------------------------------------------- /assets/mirador/plugins/media/moxieplayer.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/media/moxieplayer.swf -------------------------------------------------------------------------------- /assets/mirador/plugins/visualblocks/img/dl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/visualblocks/img/dl.gif -------------------------------------------------------------------------------- /assets/mirador/plugins/visualblocks/img/h1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/visualblocks/img/h1.gif -------------------------------------------------------------------------------- /assets/mirador/plugins/visualblocks/img/h2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/visualblocks/img/h2.gif -------------------------------------------------------------------------------- /assets/mirador/plugins/visualblocks/img/h3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/visualblocks/img/h3.gif -------------------------------------------------------------------------------- /assets/mirador/plugins/visualblocks/img/h4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/visualblocks/img/h4.gif -------------------------------------------------------------------------------- /assets/mirador/plugins/visualblocks/img/h5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/visualblocks/img/h5.gif -------------------------------------------------------------------------------- /assets/mirador/plugins/visualblocks/img/h6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/visualblocks/img/h6.gif -------------------------------------------------------------------------------- /assets/mirador/plugins/visualblocks/img/ol.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/visualblocks/img/ol.gif -------------------------------------------------------------------------------- /assets/mirador/plugins/visualblocks/img/p.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/visualblocks/img/p.gif -------------------------------------------------------------------------------- /assets/mirador/plugins/visualblocks/img/ul.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/plugins/visualblocks/img/ul.gif -------------------------------------------------------------------------------- /assets/mirador/skins/lightgray/img/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/skins/lightgray/img/anchor.gif -------------------------------------------------------------------------------- /assets/mirador/skins/lightgray/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/skins/lightgray/img/loader.gif -------------------------------------------------------------------------------- /assets/mirador/skins/lightgray/img/object.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/skins/lightgray/img/object.gif -------------------------------------------------------------------------------- /assets/mirador/skins/lightgray/img/trans.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NEU-Libraries/drs-toolkit-wp-plugin/HEAD/assets/mirador/skins/lightgray/img/trans.gif -------------------------------------------------------------------------------- /query/wrappers.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |This is a dev site.
16 |On branch:
17 |Mirador hasn't been enabled. Please contact Toolkit staff to enable this feature.
28 | 31 | 32 |"+e+"
":e)}),a.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),a.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),a.on("ResolveName",function(c){"IMG"==c.target.nodeName&&a.dom.hasClass(c.target,b)&&(c.name="pagebreak")}),a.on("click",function(c){c=c.target,"IMG"===c.nodeName&&a.dom.hasClass(c,b)&&a.selection.select(c)}),a.on("BeforeSetContent",function(a){a.content=a.content.replace(d,e)}),a.on("PreInit",function(){a.serializer.addNodeFilter("img",function(b){for(var d,e,f=b.length;f--;)if(d=b[f],e=d.attr("class"),e&&-1!==e.indexOf("mce-pagebreak")){var g=d.parent;if(a.schema.getBlockElements()[g.name]&&a.settings.pagebreak_split_block){g.type=3,g.value=c,g.raw=!0,d.remove();continue}d.type=3,d.value=c,d.raw=!0}})})}); -------------------------------------------------------------------------------- /assets/mirador/plugins/anchor/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*global tinymce:true */ 12 | 13 | tinymce.PluginManager.add('anchor', function(editor) { 14 | function showDialog() { 15 | var selectedNode = editor.selection.getNode(), name = ''; 16 | 17 | if (selectedNode.tagName == 'A') { 18 | name = selectedNode.name || selectedNode.id || ''; 19 | } 20 | 21 | editor.windowManager.open({ 22 | title: 'Anchor', 23 | body: {type: 'textbox', name: 'name', size: 40, label: 'Name', value: name}, 24 | onsubmit: function(e) { 25 | editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', { 26 | id: e.data.name 27 | })); 28 | } 29 | }); 30 | } 31 | 32 | editor.addButton('anchor', { 33 | icon: 'anchor', 34 | tooltip: 'Anchor', 35 | onclick: showDialog, 36 | stateSelector: 'a:not([href])' 37 | }); 38 | 39 | editor.addMenuItem('anchor', { 40 | icon: 'anchor', 41 | text: 'Anchor', 42 | context: 'insert', 43 | onclick: showDialog 44 | }); 45 | }); -------------------------------------------------------------------------------- /admin-ui/callbacks/Iiif.php: -------------------------------------------------------------------------------- 1 | Display'; 13 | } 14 | 15 | static function miradorPageTitle(): void { 16 | echo ''; 23 | } 24 | 25 | static function miradorUrl(): void { 26 | $mirador_url = get_option('drstk_mirador_url') == '' ? 'mirador' : get_option('drstk_mirador_url'); 27 | echo 'Reference PIDs for dev and testing:
16 || '; 22 | echo ' | |
| '; 28 | echo ' |
' + pageBreakPlaceHolderHtml + '
'); 27 | } else { 28 | editor.insertContent(pageBreakPlaceHolderHtml); 29 | } 30 | }); 31 | 32 | // Register buttons 33 | editor.addButton('pagebreak', { 34 | title: 'Page break', 35 | cmd: 'mcePageBreak' 36 | }); 37 | 38 | editor.addMenuItem('pagebreak', { 39 | text: 'Page break', 40 | icon: 'pagebreak', 41 | cmd: 'mcePageBreak', 42 | context: 'insert' 43 | }); 44 | 45 | editor.on('ResolveName', function(e) { 46 | if (e.target.nodeName == 'IMG' && editor.dom.hasClass(e.target, pageBreakClass)) { 47 | e.name = 'pagebreak'; 48 | } 49 | }); 50 | 51 | editor.on('click', function(e) { 52 | e = e.target; 53 | 54 | if (e.nodeName === 'IMG' && editor.dom.hasClass(e, pageBreakClass)) { 55 | editor.selection.select(e); 56 | } 57 | }); 58 | 59 | editor.on('BeforeSetContent', function(e) { 60 | e.content = e.content.replace(pageBreakSeparatorRegExp, pageBreakPlaceHolderHtml); 61 | }); 62 | 63 | editor.on('PreInit', function() { 64 | editor.serializer.addNodeFilter('img', function(nodes) { 65 | var i = nodes.length, node, className; 66 | 67 | while (i--) { 68 | node = nodes[i]; 69 | className = node.attr('class'); 70 | if (className && className.indexOf('mce-pagebreak') !== -1) { 71 | // Replace parent block node if pagebreak_split_block is enabled 72 | var parentNode = node.parent; 73 | if (editor.schema.getBlockElements()[parentNode.name] && editor.settings.pagebreak_split_block) { 74 | parentNode.type = 3; 75 | parentNode.value = separatorHtml; 76 | parentNode.raw = true; 77 | node.remove(); 78 | continue; 79 | } 80 | 81 | node.type = 3; 82 | node.value = separatorHtml; 83 | node.raw = true; 84 | } 85 | } 86 | }); 87 | }); 88 | }); -------------------------------------------------------------------------------- /assets/mirador/plugins/layer/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("layer",function(a){function b(a){do if(a.className&&-1!=a.className.indexOf("mceItemLayer"))return a;while(a=a.parentNode)}function c(b){var c=a.dom;tinymce.each(c.select("div,p",b),function(a){/^(absolute|relative|fixed)$/i.test(a.style.position)&&(a.hasVisual?c.addClass(a,"mceItemVisualAid"):c.removeClass(a,"mceItemVisualAid"),c.addClass(a,"mceItemLayer"))})}function d(c){var d,e,f=[],g=b(a.selection.getNode()),h=-1,i=-1;for(e=[],tinymce.walk(a.getBody(),function(a){1==a.nodeType&&/^(absolute|relative|static)$/i.test(a.style.position)&&e.push(a)},"childNodes"),d=0;d]*>/gi,"[quote]"),b(/<\/blockquote>/gi,"[/quote]"),b(/
/gi,"\n"),b(/
/gi,"\n"),b(/
/gi,"\n"),b(//gi,""),b(/<\/p>/gi,"\n"),b(/ |\u00a0/gi," "),b(/"/gi,'"'),b(/</gi,"<"),b(/>/gi,">"),b(/&/gi,"&"),a},_punbb_bbcode2html:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/\n/gi,"
"),b(/\[b\]/gi,""),b(/\[\/b\]/gi,""),b(/\[i\]/gi,""),b(/\[\/i\]/gi,""),b(/\[u\]/gi,""),b(/\[\/u\]/gi,""),b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2'),b(/\[url\](.*?)\[\/url\]/gi,'$1'),b(/\[img\](.*?)\[\/img\]/gi,''),b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2'),b(/\[code\](.*?)\[\/code\]/gi,'$1 '),b(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 '),a}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}(); -------------------------------------------------------------------------------- /assets/mirador/plugins/tabfocus/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /*global tinymce:true */ 12 | 13 | tinymce.PluginManager.add('tabfocus', function(editor) { 14 | var DOM = tinymce.DOM, each = tinymce.each, explode = tinymce.explode; 15 | 16 | function tabCancel(e) { 17 | if (e.keyCode === 9 && !e.ctrlKey && !e.altKey && !e.metaKey) { 18 | e.preventDefault(); 19 | } 20 | } 21 | 22 | function tabHandler(e) { 23 | var x, el, v, i; 24 | 25 | if (e.keyCode !== 9 || e.ctrlKey || e.altKey || e.metaKey || e.isDefaultPrevented()) { 26 | return; 27 | } 28 | 29 | function find(direction) { 30 | el = DOM.select(':input:enabled,*[tabindex]:not(iframe)'); 31 | 32 | function canSelectRecursive(e) { 33 | return e.nodeName === "BODY" || (e.type != 'hidden' && 34 | e.style.display != "none" && 35 | e.style.visibility != "hidden" && canSelectRecursive(e.parentNode)); 36 | } 37 | 38 | function canSelect(el) { 39 | return /INPUT|TEXTAREA|BUTTON/.test(el.tagName) && tinymce.get(e.id) && el.tabIndex != -1 && canSelectRecursive(el); 40 | } 41 | 42 | each(el, function(e, i) { 43 | if (e.id == editor.id) { 44 | x = i; 45 | return false; 46 | } 47 | }); 48 | if (direction > 0) { 49 | for (i = x + 1; i < el.length; i++) { 50 | if (canSelect(el[i])) { 51 | return el[i]; 52 | } 53 | } 54 | } else { 55 | for (i = x - 1; i >= 0; i--) { 56 | if (canSelect(el[i])) { 57 | return el[i]; 58 | } 59 | } 60 | } 61 | 62 | return null; 63 | } 64 | 65 | v = explode(editor.getParam('tab_focus', editor.getParam('tabfocus_elements', ':prev,:next'))); 66 | 67 | if (v.length == 1) { 68 | v[1] = v[0]; 69 | v[0] = ':prev'; 70 | } 71 | 72 | // Find element to focus 73 | if (e.shiftKey) { 74 | if (v[0] == ':prev') { 75 | el = find(-1); 76 | } else { 77 | el = DOM.get(v[0]); 78 | } 79 | } else { 80 | if (v[1] == ':next') { 81 | el = find(1); 82 | } else { 83 | el = DOM.get(v[1]); 84 | } 85 | } 86 | 87 | if (el) { 88 | var focusEditor = tinymce.get(el.id || el.name); 89 | 90 | if (el.id && focusEditor) { 91 | focusEditor.focus(); 92 | } else { 93 | window.setTimeout(function() { 94 | if (!tinymce.Env.webkit) { 95 | window.focus(); 96 | } 97 | 98 | el.focus(); 99 | }, 10); 100 | } 101 | 102 | e.preventDefault(); 103 | } 104 | } 105 | 106 | editor.on('init', function() { 107 | if (editor.inline) { 108 | // Remove default tabIndex in inline mode 109 | tinymce.DOM.setAttrib(editor.getBody(), 'tabIndex', null); 110 | } 111 | 112 | editor.on('keyup', tabCancel); 113 | 114 | if (tinymce.Env.gecko) { 115 | editor.on('keypress keydown', tabHandler); 116 | } else { 117 | editor.on('keydown', tabHandler); 118 | } 119 | }); 120 | }); 121 | -------------------------------------------------------------------------------- /assets/mirador/plugins/legacyoutput/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(a){a.on("AddEditor",function(a){a.editor.settings.inline_styles=!1}),a.PluginManager.add("legacyoutput",function(b,c,d){b.on("init",function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",d=a.explode(b.settings.font_size_style_values),e=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignjustify:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(b){return a.inArray(d,b.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),a.each("b,i,u,strike".split(","),function(a){e.addValidElements(a+"[*]")}),e.getElementRule("font")||e.addValidElements("font[face|size|color|style]"),a.each(c.split(","),function(a){var b=e.getElementRule(a);b&&(b.attributes.align||(b.attributes.align={},b.attributesOrder.push("align")))})}),b.addButton("fontsizeselect",function(){var a=[],c="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7",d=b.settings.fontsize_formats||c;return b.$.each(d.split(" "),function(b,c){var d=c,e=c,f=c.split("=");f.length>1&&(d=f[0],e=f[1]),a.push({text:d,value:e})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:a,fixedWidth:!0,onPostRender:function(){var a=this;b.on("NodeChange",function(){var c;c=b.dom.getParent(b.selection.getNode(),"font"),a.value(c?c.size:"")})},onclick:function(a){a.control.settings.value&&b.execCommand("FontSize",!1,a.control.settings.value)}}}),b.addButton("fontselect",function(){function a(a){a=a.replace(/;$/,"").split(";");for(var b=a.length;b--;)a[b]=a[b].split("=");return a}var c="Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",e=[],f=a(b.settings.font_formats||c);return d.each(f,function(a,b){e.push({text:{raw:b[0]},value:b[1],textStyle:-1==b[1].indexOf("dings")?"font-family:"+b[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:e,fixedWidth:!0,onPostRender:function(){var a=this;b.on("NodeChange",function(){var c;c=b.dom.getParent(b.selection.getNode(),"font"),a.value(c?c.face:"")})},onselect:function(a){a.control.settings.value&&b.execCommand("FontName",!1,a.control.settings.value)}}})})}(tinymce); -------------------------------------------------------------------------------- /inc/browse.php: -------------------------------------------------------------------------------- 1 | $errors['search']['missing_collection']); 12 | $data = json_encode($data); 13 | wp_send_json($data); 14 | wp_die(); 15 | } elseif ($collection == "https://repository.library.northeastern.edu/collections/neu:1") { 16 | $data = array('error'=>$errors['search']['missing_collection']); 17 | $data = json_encode($data); 18 | wp_send_json($data); 19 | wp_die(); 20 | } else { 21 | if (isset($_POST['params']['collection'])){ 22 | $url = drstk_api_url("drs", $_POST['params']['collection'], "search"); 23 | } else { 24 | $url = drstk_api_url("drs", $collection, "search"); 25 | } 26 | if (isset($_POST['params']['q'])){ 27 | $url .= "q=". urlencode(sanitize_text_field($_POST['params']['q'])); 28 | } 29 | if (isset($_GET['q'])){ 30 | $url .= "q=". urlencode(sanitize_text_field($_GET['q'])); 31 | } 32 | if (isset($_POST['params']['per_page'])) { 33 | $url .= "&per_page=" . $_POST['params']['per_page']; 34 | } 35 | if (isset($_POST['params']['page'])) { 36 | $url .= "&page=" . $_POST['params']['page']; 37 | } 38 | if (isset($_POST['params']['f'])) { 39 | foreach($_POST['params']['f'] as $facet=>$facet_val){ 40 | $url .= "&f[" . $facet . "][]=" . urlencode($facet_val); 41 | } 42 | 43 | } 44 | if (isset($_POST['params']['sort'])) { 45 | $url .= "&sort=" . $_POST['params']['sort']; 46 | } 47 | $response = get_response($url); 48 | wp_send_json($response['output']); 49 | wp_die(); 50 | } 51 | } 52 | 53 | add_action('wp_ajax_wp_search', 'ajax_wp_search'); 54 | add_action('wp_ajax_nopriv_wp_search', 'ajax_wp_search'); 55 | 56 | function ajax_wp_search(){ 57 | global $wp_query, $paged, $post; 58 | $related_content_title = get_option('drstk_search_related_content_title'); 59 | $query_string = isset($_GET['query']) ? $_GET['query'] : ""; 60 | $paged = $_GET['page']; 61 | if (isset($_GET['query']) && $query_string != ''){ 62 | $query_args = array( 's' => $query_string, 'post_type'=>array('post', 'page'), 'posts_per_page'=>3, 'paged'=>$paged, 'post_status'=>'publish'); 63 | $wp_query = new WP_Query( $query_args ); 64 | $rel_query = relevanssi_do_query($wp_query); 65 | if (count($rel_query) > 0){ 66 | foreach($rel_query as $r_post){ 67 | $post = $r_post; 68 | $the_post = $post; 69 | get_template_part( 'content', 'excerpt' ); 70 | } 71 | echo the_posts_pagination( array( 'mid_size' => 2 ) ); 72 | } else { 73 | echo "No ".strtolower($related_content_title)." was found"; 74 | } 75 | } else { 76 | echo "Please enter a search term to retrieve ".strtolower($related_content_title); 77 | } 78 | wp_reset_postdata(); 79 | die(); 80 | } 81 | -------------------------------------------------------------------------------- /assets/js/gallery.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function($) { 2 | 3 | if($().carousel) { 4 | $(".carousel").each(function(){ 5 | var this_carousel = $(this); 6 | $(this).carousel(); 7 | 8 | $(window).on('load', function(){ 9 | fix_dimensions(this_carousel); 10 | fix_caption($('.carousel .item:first-of-type img')); 11 | }); 12 | 13 | var cHeight = 0; 14 | $(this).on('slide.bs.carousel', function(e) { 15 | var $nextImage = $(e.relatedTarget).find('img'); 16 | $activeItem = $('.active.item', this); 17 | 18 | // prevents the slide decrease in height 19 | if (cHeight == 0) { 20 | cHeight = $(this).height(); 21 | $activeItem.next('.item').find("img").height(cHeight); 22 | } 23 | 24 | // prevents the loaded image if it is already loaded 25 | var src = $nextImage.data('src'); 26 | 27 | if (typeof src !== "undefined" && src != "") { 28 | $nextImage.attr('src', src) 29 | $nextImage.data('src', ''); 30 | $nextImage.on('load', function(){ 31 | fix_caption($nextImage); 32 | fix_dimensions(this_carousel); 33 | }); 34 | } 35 | }); 36 | }); 37 | } 38 | 39 | 40 | function fix_dimensions(carousel){ 41 | if (carousel.data("max-height") > 0){ 42 | carousel.css("max-height", carousel.data("max-height")); 43 | carousel.find(".carousel-inner, .item").css("max-height", carousel.data("max-height")); 44 | if (carousel.find(".carousel-caption").css("position") == 'relative'){ 45 | var img_height = carousel.data("max-height")-carousel.find(".carousel-caption").outerHeight(); 46 | carousel.find("img").css("max-height", img_height); 47 | } else { 48 | carousel.find("img").css("max-height", carousel.data("max-height")); 49 | } 50 | } else {//no max-height is set 51 | var height = 0; 52 | var caption_height = 0; 53 | carousel.find("img").each(function(){ 54 | if ($(this).data("src") != undefined){ 55 | this_height = $(this).data("height"); 56 | } else { 57 | this_height = $(this).prop('naturalHeight'); 58 | } 59 | this_caption_height = $(this).parents(".item").find(".carousel-caption").outerHeight(); 60 | if (this_height > height) { 61 | height = this_height; 62 | } 63 | if (this_caption_height > caption_height){ 64 | caption_height = this_caption_height; 65 | } 66 | }); 67 | carousel.find("img").css("max-height", height); 68 | if (carousel.find(".carousel-caption").css("position") == 'relative'){ 69 | carousel.find(".carousel-caption").css("min-height", caption_height); 70 | } 71 | } 72 | if (carousel.data("max-width") > 0){ 73 | carousel.css("max-width", carousel.data("max-width")); 74 | carousel.find(".carousel-inner, img").css("max-width", carousel.data("max-width")); 75 | } 76 | } 77 | 78 | function fix_caption(image){ 79 | var caption = image.parents(".item").find(".carousel-caption"); 80 | if (typeof caption.attr('data-caption-width') !== typeof undefined && caption.attr('data-caption-width') !== false && caption.attr('data-caption-width') == 'image'){ 81 | caption.css("width", image.innerWidth()); 82 | } 83 | } 84 | 85 | $(".hidden").each(function(){ 86 | $(this).appendTo("body"); 87 | }); 88 | }); 89 | -------------------------------------------------------------------------------- /assets/mirador/plugins/spellchecker/plugin.dev.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Inline development version. Only to be used while developing since it uses document.write to load scripts. 3 | */ 4 | 5 | /*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */ 6 | /*globals $code */ 7 | 8 | (function(exports) { 9 | "use strict"; 10 | 11 | var html = "", baseDir; 12 | var modules = {}, exposedModules = [], moduleCount = 0; 13 | 14 | var scripts = document.getElementsByTagName('script'); 15 | for (var i = 0; i < scripts.length; i++) { 16 | var src = scripts[i].src; 17 | 18 | if (src.indexOf('/plugin.dev.js') != -1) { 19 | baseDir = src.substring(0, src.lastIndexOf('/')); 20 | } 21 | } 22 | 23 | function require(ids, callback) { 24 | var module, defs = []; 25 | 26 | for (var i = 0; i < ids.length; ++i) { 27 | module = modules[ids[i]] || resolve(ids[i]); 28 | if (!module) { 29 | throw 'module definition dependecy not found: ' + ids[i]; 30 | } 31 | 32 | defs.push(module); 33 | } 34 | 35 | callback.apply(null, defs); 36 | } 37 | 38 | function resolve(id) { 39 | var target = exports; 40 | var fragments = id.split(/[.\/]/); 41 | 42 | for (var fi = 0; fi < fragments.length; ++fi) { 43 | if (!target[fragments[fi]]) { 44 | return; 45 | } 46 | 47 | target = target[fragments[fi]]; 48 | } 49 | 50 | return target; 51 | } 52 | 53 | function register(id) { 54 | var target = exports; 55 | var fragments = id.split(/[.\/]/); 56 | 57 | for (var fi = 0; fi < fragments.length - 1; ++fi) { 58 | if (target[fragments[fi]] === undefined) { 59 | target[fragments[fi]] = {}; 60 | } 61 | 62 | target = target[fragments[fi]]; 63 | } 64 | 65 | target[fragments[fragments.length - 1]] = modules[id]; 66 | } 67 | 68 | function define(id, dependencies, definition) { 69 | if (typeof id !== 'string') { 70 | throw 'invalid module definition, module id must be defined and be a string'; 71 | } 72 | 73 | if (dependencies === undefined) { 74 | throw 'invalid module definition, dependencies must be specified'; 75 | } 76 | 77 | if (definition === undefined) { 78 | throw 'invalid module definition, definition function must be specified'; 79 | } 80 | 81 | require(dependencies, function() { 82 | modules[id] = definition.apply(null, arguments); 83 | }); 84 | 85 | if (--moduleCount === 0) { 86 | for (var i = 0; i < exposedModules.length; i++) { 87 | register(exposedModules[i]); 88 | } 89 | } 90 | } 91 | 92 | function expose(ids) { 93 | exposedModules = ids; 94 | } 95 | 96 | function writeScripts() { 97 | document.write(html); 98 | } 99 | 100 | function load(path) { 101 | html += '\n'; 102 | moduleCount++; 103 | } 104 | 105 | // Expose globally 106 | exports.define = define; 107 | exports.require = require; 108 | 109 | expose(["tinymce/spellcheckerplugin/DomTextMatcher"]); 110 | 111 | load('classes/DomTextMatcher.js'); 112 | load('classes/Plugin.js'); 113 | 114 | writeScripts(); 115 | })(this); 116 | 117 | // $hash: 8869896f1265f5c8b422a19894956678 -------------------------------------------------------------------------------- /assets/mirador/plugins/table/plugin.dev.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Inline development version. Only to be used while developing since it uses document.write to load scripts. 3 | */ 4 | 5 | /*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */ 6 | /*globals $code */ 7 | 8 | (function(exports) { 9 | "use strict"; 10 | 11 | var html = "", baseDir; 12 | var modules = {}, exposedModules = [], moduleCount = 0; 13 | 14 | var scripts = document.getElementsByTagName('script'); 15 | for (var i = 0; i < scripts.length; i++) { 16 | var src = scripts[i].src; 17 | 18 | if (src.indexOf('/plugin.dev.js') != -1) { 19 | baseDir = src.substring(0, src.lastIndexOf('/')); 20 | } 21 | } 22 | 23 | function require(ids, callback) { 24 | var module, defs = []; 25 | 26 | for (var i = 0; i < ids.length; ++i) { 27 | module = modules[ids[i]] || resolve(ids[i]); 28 | if (!module) { 29 | throw 'module definition dependecy not found: ' + ids[i]; 30 | } 31 | 32 | defs.push(module); 33 | } 34 | 35 | callback.apply(null, defs); 36 | } 37 | 38 | function resolve(id) { 39 | var target = exports; 40 | var fragments = id.split(/[.\/]/); 41 | 42 | for (var fi = 0; fi < fragments.length; ++fi) { 43 | if (!target[fragments[fi]]) { 44 | return; 45 | } 46 | 47 | target = target[fragments[fi]]; 48 | } 49 | 50 | return target; 51 | } 52 | 53 | function register(id) { 54 | var target = exports; 55 | var fragments = id.split(/[.\/]/); 56 | 57 | for (var fi = 0; fi < fragments.length - 1; ++fi) { 58 | if (target[fragments[fi]] === undefined) { 59 | target[fragments[fi]] = {}; 60 | } 61 | 62 | target = target[fragments[fi]]; 63 | } 64 | 65 | target[fragments[fragments.length - 1]] = modules[id]; 66 | } 67 | 68 | function define(id, dependencies, definition) { 69 | if (typeof id !== 'string') { 70 | throw 'invalid module definition, module id must be defined and be a string'; 71 | } 72 | 73 | if (dependencies === undefined) { 74 | throw 'invalid module definition, dependencies must be specified'; 75 | } 76 | 77 | if (definition === undefined) { 78 | throw 'invalid module definition, definition function must be specified'; 79 | } 80 | 81 | require(dependencies, function() { 82 | modules[id] = definition.apply(null, arguments); 83 | }); 84 | 85 | if (--moduleCount === 0) { 86 | for (var i = 0; i < exposedModules.length; i++) { 87 | register(exposedModules[i]); 88 | } 89 | } 90 | } 91 | 92 | function expose(ids) { 93 | exposedModules = ids; 94 | } 95 | 96 | function writeScripts() { 97 | document.write(html); 98 | } 99 | 100 | function load(path) { 101 | html += '\n'; 102 | moduleCount++; 103 | } 104 | 105 | // Expose globally 106 | exports.define = define; 107 | exports.require = require; 108 | 109 | load('classes/TableGrid.js'); 110 | load('classes/Quirks.js'); 111 | load('classes/CellSelection.js'); 112 | load('classes/Dialogs.js'); 113 | load('classes/Plugin.js'); 114 | 115 | writeScripts(); 116 | })(this); 117 | 118 | // $hash: a13998323851e68e073e373581ee90e4 -------------------------------------------------------------------------------- /assets/mirador/plugins/paste/classes/Plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Plugin.js 3 | * 4 | * Copyright, Moxiecode Systems AB 5 | * Released under LGPL License. 6 | * 7 | * License: http://www.tinymce.com/license 8 | * Contributing: http://www.tinymce.com/contributing 9 | */ 10 | 11 | /** 12 | * This class contains the tinymce plugin logic for the paste plugin. 13 | * 14 | * @class tinymce.pasteplugin.Plugin 15 | * @private 16 | */ 17 | define("tinymce/pasteplugin/Plugin", [ 18 | "tinymce/PluginManager", 19 | "tinymce/pasteplugin/Clipboard", 20 | "tinymce/pasteplugin/WordFilter", 21 | "tinymce/pasteplugin/Quirks" 22 | ], function(PluginManager, Clipboard, WordFilter, Quirks) { 23 | var userIsInformed; 24 | 25 | PluginManager.add('paste', function(editor) { 26 | var self = this, clipboard, settings = editor.settings; 27 | 28 | function togglePlainTextPaste() { 29 | if (clipboard.pasteFormat == "text") { 30 | this.active(false); 31 | clipboard.pasteFormat = "html"; 32 | } else { 33 | clipboard.pasteFormat = "text"; 34 | this.active(true); 35 | 36 | if (!userIsInformed) { 37 | editor.windowManager.alert( 38 | 'Paste is now in plain text mode. Contents will now ' + 39 | 'be pasted as plain text until you toggle this option off.' 40 | ); 41 | 42 | userIsInformed = true; 43 | } 44 | } 45 | } 46 | 47 | self.clipboard = clipboard = new Clipboard(editor); 48 | self.quirks = new Quirks(editor); 49 | self.wordFilter = new WordFilter(editor); 50 | 51 | if (editor.settings.paste_as_text) { 52 | self.clipboard.pasteFormat = "text"; 53 | } 54 | 55 | if (settings.paste_preprocess) { 56 | editor.on('PastePreProcess', function(e) { 57 | settings.paste_preprocess.call(self, self, e); 58 | }); 59 | } 60 | 61 | if (settings.paste_postprocess) { 62 | editor.on('PastePostProcess', function(e) { 63 | settings.paste_postprocess.call(self, self, e); 64 | }); 65 | } 66 | 67 | editor.addCommand('mceInsertClipboardContent', function(ui, value) { 68 | if (value.content) { 69 | self.clipboard.pasteHtml(value.content); 70 | } 71 | 72 | if (value.text) { 73 | self.clipboard.pasteText(value.text); 74 | } 75 | }); 76 | 77 | // Block all drag/drop events 78 | if (editor.paste_block_drop) { 79 | editor.on('dragend dragover draggesture dragdrop drop drag', function(e) { 80 | e.preventDefault(); 81 | e.stopPropagation(); 82 | }); 83 | } 84 | 85 | // Prevent users from dropping data images on Gecko 86 | if (!editor.settings.paste_data_images) { 87 | editor.on('drop', function(e) { 88 | var dataTransfer = e.dataTransfer; 89 | 90 | if (dataTransfer && dataTransfer.files && dataTransfer.files.length > 0) { 91 | e.preventDefault(); 92 | } 93 | }); 94 | } 95 | 96 | editor.addButton('pastetext', { 97 | icon: 'pastetext', 98 | tooltip: 'Paste as text', 99 | onclick: togglePlainTextPaste, 100 | active: self.clipboard.pasteFormat == "text" 101 | }); 102 | 103 | editor.addMenuItem('pastetext', { 104 | text: 'Paste as text', 105 | selectable: true, 106 | active: clipboard.pasteFormat, 107 | onclick: togglePlainTextPaste 108 | }); 109 | }); 110 | }); -------------------------------------------------------------------------------- /assets/mirador/locales/en/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "addItem": "Add Item", 3 | "addNewObject": "Add new object from URL", 4 | "addSlotAbove": "Add Slot Above", 5 | "addSlotBelow": "Add Slot Below", 6 | "addSlotLeft": "Add Slot Left", 7 | "addSlotRight": "Add Slot Right", 8 | "addTagsHere": "Add tags here", 9 | "annotationTooltip": "Toggle annotations", 10 | "bookmark": "Bookmark", 11 | "bookmarkTitle": "Bookmark or Share Your Workspace", 12 | "bookmarkTooltip": "Bookmark this Mirador instance", 13 | "bookView": "Book View", 14 | "borderColorTooltip": "Choose border color", 15 | "borderTypeTooltip": "Choose border style", 16 | "brightnessTooltip": "Adjust brightness", 17 | "cancel": "Cancel", 18 | "cancelAnnotation": "Do you want to cancel this annotation?", 19 | "changeLayout": "Change Layout", 20 | "changeLayoutTooltip": "Change the number of visible slots", 21 | "close": "Close", 22 | "closeTooltip": "Close this window", 23 | "comments": "Comments", 24 | "contrastTooltip": "Adjust contrast", 25 | "dashed":"Dashes", 26 | "delete": "Delete", 27 | "deleteAnnotation": "Do you want to delete this annotation and all associated shapes?", 28 | "deleteShape":"Do you want to delete this shape?", 29 | "details": "Details", 30 | "dotDashed":"Dots & Dashes", 31 | "dropToLoad": "Drop to Load Manifest", 32 | "edit": "Edit", 33 | "editModalBtnDeleteAnnotation":"Delete this annotation", 34 | "editModalBtnSaveWithoutShapes":"Save annotation without shapes", 35 | "editModalSaveAnnotationWithNoShapesMsg":"There are no shapes associated with this annotation.", 36 | "ellipseTooltip": "Oval annotation", 37 | "fillColorTooltip": "Choose fill color", 38 | "filterObjects": "Filter objects", 39 | "freehandTooltip": "Freeform annotation", 40 | "fullScreen": "Full Screen", 41 | "fullScreenTooltip": "Toggle full screen", 42 | "fullScreenWindowTooltip": "Toggle this window to full screen", 43 | "grayscaleTooltip": "Toggle grayscale", 44 | "imageManipulationTooltip": "Toggle image manipulation", 45 | "imageView": "Image View", 46 | "invertTooltip": "Invert colors", 47 | "item": "item", 48 | "items": "items", 49 | "links": "Links", 50 | "load": "Load", 51 | "logo": "Logo", 52 | "metadataTooltip": "View information/metadata about this object", 53 | "more": "more", 54 | "newObject": "Replace Object", 55 | "no": "No", 56 | "objectMetadata": "Object Metadata", 57 | "pinTooltip": "Pin annotation", 58 | "pointerTooltip": "Pointer", 59 | "polygonTooltip": "Polygon annotation", 60 | "rectangleTooltip": "Rectangle annotation", 61 | "resetTooltip": "Reset image", 62 | "rights": "Rights", 63 | "rightsStatus": "Rights Status", 64 | "rotateLeftTooltip": "Rotate 90° left", 65 | "rotateRightTooltip": "Rotate 90° right", 66 | "saturationTooltip": "Adjust saturation", 67 | "save": "Save", 68 | "scrollView": "Scroll View", 69 | "selectGrid": "Select a grid below", 70 | "sidePanelTooltip": "Toggle the side panel", 71 | "solid":"Solid", 72 | "thumbnailsView": "Gallery View", 73 | "unspecified": "Unspecified", 74 | "url": "URL", 75 | "viewTypeTooltip": "Change view type", 76 | "yes": "Yes" 77 | } 78 | -------------------------------------------------------------------------------- /assets/mirador/plugins/paste/plugin.dev.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Inline development version. Only to be used while developing since it uses document.write to load scripts. 3 | */ 4 | 5 | /*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */ 6 | /*globals $code */ 7 | 8 | (function(exports) { 9 | "use strict"; 10 | 11 | var html = "", baseDir; 12 | var modules = {}, exposedModules = [], moduleCount = 0; 13 | 14 | var scripts = document.getElementsByTagName('script'); 15 | for (var i = 0; i < scripts.length; i++) { 16 | var src = scripts[i].src; 17 | 18 | if (src.indexOf('/plugin.dev.js') != -1) { 19 | baseDir = src.substring(0, src.lastIndexOf('/')); 20 | } 21 | } 22 | 23 | function require(ids, callback) { 24 | var module, defs = []; 25 | 26 | for (var i = 0; i < ids.length; ++i) { 27 | module = modules[ids[i]] || resolve(ids[i]); 28 | if (!module) { 29 | throw 'module definition dependecy not found: ' + ids[i]; 30 | } 31 | 32 | defs.push(module); 33 | } 34 | 35 | callback.apply(null, defs); 36 | } 37 | 38 | function resolve(id) { 39 | var target = exports; 40 | var fragments = id.split(/[.\/]/); 41 | 42 | for (var fi = 0; fi < fragments.length; ++fi) { 43 | if (!target[fragments[fi]]) { 44 | return; 45 | } 46 | 47 | target = target[fragments[fi]]; 48 | } 49 | 50 | return target; 51 | } 52 | 53 | function register(id) { 54 | var target = exports; 55 | var fragments = id.split(/[.\/]/); 56 | 57 | for (var fi = 0; fi < fragments.length - 1; ++fi) { 58 | if (target[fragments[fi]] === undefined) { 59 | target[fragments[fi]] = {}; 60 | } 61 | 62 | target = target[fragments[fi]]; 63 | } 64 | 65 | target[fragments[fragments.length - 1]] = modules[id]; 66 | } 67 | 68 | function define(id, dependencies, definition) { 69 | if (typeof id !== 'string') { 70 | throw 'invalid module definition, module id must be defined and be a string'; 71 | } 72 | 73 | if (dependencies === undefined) { 74 | throw 'invalid module definition, dependencies must be specified'; 75 | } 76 | 77 | if (definition === undefined) { 78 | throw 'invalid module definition, definition function must be specified'; 79 | } 80 | 81 | require(dependencies, function() { 82 | modules[id] = definition.apply(null, arguments); 83 | }); 84 | 85 | if (--moduleCount === 0) { 86 | for (var i = 0; i < exposedModules.length; i++) { 87 | register(exposedModules[i]); 88 | } 89 | } 90 | } 91 | 92 | function expose(ids) { 93 | exposedModules = ids; 94 | } 95 | 96 | function writeScripts() { 97 | document.write(html); 98 | } 99 | 100 | function load(path) { 101 | html += '\n'; 102 | moduleCount++; 103 | } 104 | 105 | // Expose globally 106 | exports.define = define; 107 | exports.require = require; 108 | 109 | expose(["tinymce/pasteplugin/Utils","tinymce/pasteplugin/WordFilter"]); 110 | 111 | load('classes/Utils.js'); 112 | load('classes/Clipboard.js'); 113 | load('classes/WordFilter.js'); 114 | load('classes/Quirks.js'); 115 | load('classes/Plugin.js'); 116 | 117 | writeScripts(); 118 | })(this); 119 | 120 | // $hash: 8403b8385314b80e512b060ca1712a1e -------------------------------------------------------------------------------- /assets/mirador/locales/fr/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "addItem": "Ajouter un objet", 3 | "addNewObject": "Ajouter un objet à partir de son URL", 4 | "addSlotAbove": "Ajouter une fenêtre en dessous", 5 | "addSlotBelow": "Ajouter une fenêtre au-dessus", 6 | "addSlotLeft": "Ajouter une fenêtre à gauche", 7 | "addSlotRight": "Ajouter une fenêtre à droite", 8 | "addTagsHere": "Ajouter des mots-clés", 9 | "bookmark": "Sauvegarder / Partager", 10 | "bookmarkTitle": "Sauvegarder ou partager cet espace de travail", 11 | "bookmarkTooltip": "Obtenir le lien vers cet espace de travail", 12 | "bookView": "Double page", 13 | "borderColorTooltip": "Choisir la couleur de bordure", 14 | "borderTypeTooltip": "Choisir le style de bordure", 15 | "brightnessTooltip": "Luminosité", 16 | "cancel": "Annuler", 17 | "cancelAnnotation": "Voulez-vous supprimer cette annotation", 18 | "changeLayout": "Changer la disposition", 19 | "changeLayoutTooltip": "Changer le nombre de fenêtres visibles", 20 | "close": "Fermer", 21 | "closeTooltip": "Fermer cette fenêtre", 22 | "comments": "Commentaires", 23 | "contrastTooltip": "Contraste", 24 | "dashed":"Tirets", 25 | "delete": "Supprimer", 26 | "deleteAnnotation": "Voulez-vous supprimer cette annotation et toutes les formes associées", 27 | "deleteShape":"Voulez-vous supprimer cette forme", 28 | "details": "Détails", 29 | "dotDashed":"Pointillés et traits", 30 | "dropToLoad": "Déposer ici pour ajouter l'objet", 31 | "edit": "Editer", 32 | "editModalBtnDeleteAnnotation":"Supprimer cette annotation", 33 | "editModalBtnSaveWithoutShapes":"Enregistrer l'annotation sans aucune forme associée ?", 34 | "editModalSaveAnnotationWithNoShapesMsg":"Aucune forme n'est associée à cette annotation.", 35 | "ellipseTooltip": "Ovale", 36 | "fillColorTooltip": "Choisir une couleur de remplissage", 37 | "filterObjects": "Filtrer la liste", 38 | "freehandTooltip": "Tracé libre", 39 | "fullScreen": "Plein écran", 40 | "fullScreenTooltip": "Ouvrir en plein écran", 41 | "fullScreenWindowTooltip": "Ouvrir cette fenêtre en plein écran", 42 | "grayscaleTooltip": "Niveaux de gris", 43 | "imageView": "Simple page", 44 | "invertTooltip": "Couleurs inversées", 45 | "item": "objet", 46 | "items": "objets", 47 | "links": "Liens", 48 | "load": "Ajouter", 49 | "logo": "Logo", 50 | "metadataTooltip": "Afficher les informations/métadonnées", 51 | "more": "restants", 52 | "newObject": "Nouvel objet", 53 | "no": "Non", 54 | "objectMetadata": "Métadonnées", 55 | "pinTooltip": "Marqueur", 56 | "polygonTooltip": "Polygone", 57 | "rectangleTooltip": "Rectangle", 58 | "resetTooltip": "Réinitialiser", 59 | "rights": "Droits", 60 | "rightsStatus": "Statut des droits", 61 | "rotateLeftTooltip": "Rotation antihoraire 90°", 62 | "rotateRightTooltip": "Rotation horaire 90°", 63 | "saturationTooltip": "Saturation", 64 | "save": "Enregistrer", 65 | "scrollView": "Défilement horizontal", 66 | "selectGrid": "Sélectionner la grille de votre choix", 67 | "sidePanelTooltip": "Ouvrir le panneau latéral", 68 | "solid":"Ligne continue", 69 | "thumbnailsView": "Mosaïque", 70 | "unspecified": "Non spécifié", 71 | "url": "URL", 72 | "viewTypeTooltip": "Changer le type de vue", 73 | "yes": "Oui" 74 | } 75 | -------------------------------------------------------------------------------- /assets/js/item_meta_helper.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function () { 2 | function assoc_checked(input, klass) { 3 | // @TODO: this has clear signs of functionality creep beyond any semantic connection (PMJ) 4 | if (jQuery(input).is(":checked")) { 5 | jQuery(klass).css("display", "table-row"); 6 | } else { 7 | jQuery(klass).css("display", "none"); 8 | } 9 | } 10 | 11 | assoc_checked("input[name='drstk_assoc']", ".assoc"); 12 | assoc_checked("input[name='drstk_niec']", ".niec"); 13 | assoc_checked("input[name='drstk_appears']", ".appears"); 14 | assoc_checked("input[name='drstk_mirador']", ".mirador"); 15 | assoc_checked("input[name='drstk_is_podcast']", ".drstk_podcast_options"); 16 | 17 | jQuery("input[name='drstk_assoc']").on('change', function () { 18 | assoc_checked("input[name='drstk_assoc']", ".assoc"); 19 | }); 20 | jQuery("input[name='drstk_niec']").on('change', function () { 21 | assoc_checked("input[name='drstk_niec']", ".niec"); 22 | }); 23 | jQuery("input[name='drstk_appears']").on('change', function () { 24 | assoc_checked("input[name='drstk_appears']", ".appears"); 25 | }); 26 | jQuery("input[name='drstk_mirador']").on('change', function () { 27 | assoc_checked("input[name='drstk_mirador']", ".mirador"); 28 | }); 29 | 30 | jQuery("input[name='drstk_is_podcast']").on('change', function () { 31 | assoc_checked("input[name='drstk_is_podcast']", ".drstk_podcast_options"); 32 | }); 33 | 34 | 35 | 36 | jQuery("input[name='drstk_facets[]'], input[name='drstk_niec_metadata[]']").on('change', function () { 37 | if (jQuery(this).is(":checked")) { 38 | jQuery(this).parents("td").next(".title").css("display", "table-cell"); 39 | } else { 40 | jQuery(this).parents("td").next(".title").css("display", "none"); 41 | } 42 | }); 43 | 44 | jQuery("#facets_sortable").sortable(); 45 | jQuery("#niec_facets_sortable").sortable(); 46 | jQuery("#item_metadata_sortable").sortable(); 47 | jQuery(".add-item-meta").on("click", function (e) { 48 | e.preventDefault(); 49 | jQuery("#item_metadata_sortable").append('
'); 50 | jQuery("#item_metadata_sortable").sortable({ refresh: item_metadata_sortable }); 51 | update_values(); 52 | }); 53 | 54 | function update_values() { 55 | jQuery("#item_metadata_sortable input[type='text']").on("change", function (e) { 56 | val = jQuery(this).val(); 57 | jQuery(this).siblings('input[type="checkbox"]').val(val); 58 | if (val != "") { 59 | jQuery(this).siblings('input[type="checkbox"]').prop("checked", true); 60 | } else { 61 | jQuery(this).siblings('input[type="checkbox"]').prop("checked", false); 62 | } 63 | }); 64 | } 65 | 66 | // @todo WP doesn't make it easy to add a class to settings page section headers, 67 | // so cheekily stuffing it in here 68 | 69 | jQuery('.settings_page_drstk_admin_menu h2').addClass('closed'); 70 | 71 | jQuery('body').on('click', 'h2', function (e) { 72 | var sectionHeader = jQuery(e.target); 73 | sectionHeader.toggleClass('open closed'); 74 | sectionHeader.next().toggle('slow'); 75 | }); 76 | 77 | }); 78 | -------------------------------------------------------------------------------- /assets/mirador/plugins/textcolor/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("textcolor",function(a){function b(b){var c;return a.dom.getParents(a.selection.getStart(),function(a){var d;(d=a.style["forecolor"==b?"color":"background-color"])&&(c=d)}),c}function c(){var b,c,d=[];for(c=a.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],b=0;b '+(c?"×":"")+""}var d,e,f,g,h,k,l,m=this,n=m._id,o=0;for(d=c(),d.push({text:tinymce.translate("No color"),color:"transparent"}),f='',g=d.length-1,k=0;j>k;k++){for(f+="
"}function e(b,c){a.focus(),a.formatter.apply(b,{value:c}),a.nodeChanged()}function f(b){a.focus(),a.formatter.remove(b,{value:null},null,!0),a.nodeChanged()}function g(c){function d(a){j.hidePanel(),j.color(a),e(j.settings.format,a)}function g(a,b){a.style.background=b,a.setAttribute("data-mce-color",b)}var h,j=this.parent();if(tinymce.DOM.getParent(c.target,".mce-custom-color-btn")&&(j.hidePanel(),a.settings.color_picker_callback.call(a,function(a){var b,c,e,f=j.panel.getEl().getElementsByTagName("table")[0];for(b=tinymce.map(f.rows[f.rows.length-1].childNodes,function(a){return a.firstChild}),e=0;e",h=0;i>h;h++)l=k*i+h,l>g?f+=" "}if(a.settings.color_picker_callback){for(f+='":(e=d[l],f+=b(e.color,e.text));f+=" ",f+=" ",h=0;i>h;h++)f+=b("","Custom color");f+=" "}return f+="e;e++)g(b[e],b[e+1].getAttribute("data-mce-color"));g(c,a),d(a)},b(j.settings.format))),h=c.target.getAttribute("data-mce-color")){if(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),c.target.setAttribute("aria-selected",!0),this.lastId=c.target.id,"transparent"==h)return f(j.settings.format),void j.hidePanel();d(h)}else null!==h&&j.hidePanel()}function h(){var a=this;a._color&&e(a.settings.format,a._color)}var i,j;j=a.settings.textcolor_rows||5,i=a.settings.textcolor_cols||8,a.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:d,onclick:g},onclick:h}),a.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:d,onclick:g},onclick:h})}); -------------------------------------------------------------------------------- /admin-ui/wrappers.php: -------------------------------------------------------------------------------- 1 | /g // Conditional comments 91 | ]); 92 | 93 | walk(domParser.parse(html)); 94 | 95 | return text; 96 | } 97 | 98 | /** 99 | * Trims the specified HTML by removing all WebKit fragments, all elements wrapping the body trailing BR elements etc. 100 | * 101 | * @param {String} html Html string to trim contents on. 102 | * @return {String} Html contents that got trimmed. 103 | */ 104 | function trimHtml(html) { 105 | function trimSpaces(all, s1, s2) { 106 | // WebKit meant to preserve multiple spaces but instead inserted around all inline tags, 107 | // including the spans with inline styles created on paste 108 | if (!s1 && !s2) { 109 | return ' '; 110 | } 111 | 112 | return '\u00a0'; 113 | } 114 | 115 | html = filter(html, [ 116 | /^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g, // Remove anything but the contents within the BODY element 117 | /|/g, // Inner fragments (tables from excel on mac) 118 | [/( ?)\u00a0<\/span>( ?)/g, trimSpaces], 119 | /
$/i // Trailing BR elements 120 | ]); 121 | 122 | return html; 123 | } 124 | 125 | return { 126 | filter: filter, 127 | innerText: innerText, 128 | trimHtml: trimHtml 129 | }; 130 | }); -------------------------------------------------------------------------------- /assets/mirador/plugins/compat3x/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(a){function b(){}function c(a){!f&&window&&window.console&&(f=!0,console.log("Deprecated TinyMCE API call: "+a))}function d(a,d,e,f){return a=a||this,d?(this.add=function(b,g,h){function i(c){var h=[];if("string"==typeof e&&(e=e.split(" ")),e&&"function"!=typeof e)for(var i=0;i.on"+d+".add(..)"),a.on(d,i,h),i},this.addToTop=function(a,b){this.add(a,b,!0)},this.remove=function(b){return a.off(d,b)},void(this.dispatch=function(){return a.fire(d),!0})):void(this.add=this.addToTop=this.remove=this.dispatch=b)}function e(e){function f(b,c){a.each(b.split(" "),function(a){e["on"+a]=new d(e,a,c)})}function g(a,b,c){return[b.level,c]}function h(a){return function(b,c){return!c.selection&&!a||c.selection==a?[c]:void 0}}function i(){function b(){return i()}var d={},e="add addMenu addSeparator collapse createMenu destroy displayColor expand focus getLength hasMenus hideMenu isActive isCollapsed isDisabled isRendered isSelected mark postRender remove removeAll renderHTML renderMenu renderNode renderTo select selectByIndex setActive setAriaProperty setColor setDisabled setSelected setState showMenu update";return c("editor.controlManager.*"),a.each(e.split(" "),function(a){d[a]=b}),d}if(!e.controlManager){e.controlManager={buttons:{},setDisabled:function(a,b){c("controlManager.setDisabled(..)"),this.buttons[a]&&this.buttons[a].disabled(b)},setActive:function(a,b){c("controlManager.setActive(..)"),this.buttons[a]&&this.buttons[a].active(b)},onAdd:new d,onPostRender:new d,add:function(a){return a},createButton:i,createColorSplitButton:i,createControl:i,createDropMenu:i,createListBox:i,createMenuButton:i,createSeparator:i,createSplitButton:i,createToolbar:i,createToolbarGroup:i,destroy:b,get:b,setControlType:i},f("PreInit BeforeRenderUI PostRender Load Init Remove Activate Deactivate","editor"),f("Click MouseUp MouseDown DblClick KeyDown KeyUp KeyPress ContextMenu Paste Submit Reset"),f("BeforeExecCommand ExecCommand","command ui value args"),f("PreProcess PostProcess LoadContent SaveContent Change"),f("BeforeSetContent BeforeGetContent SetContent GetContent",h(!1)),f("SetProgressState","state time"),f("VisualAid","element hasVisual"),f("Undo Redo",g),f("NodeChange",function(a,b){return[e.controlManager,b.element,e.selection.isCollapsed(),b]});var j=e.addButton;e.addButton=function(b,c){function d(){return e.controlManager.buttons[b]=this,f?f.call(this):void 0}var f;for(var g in c)"onpostrender"===g.toLowerCase()&&(f=c[g],c.onPostRender=d);return f||(c.onPostRender=d),c.title&&(c.title=a.i18n.translate((e.settings.language||"en")+"."+c.title)),j.call(this,b,c)},e.on("init",function(){var a=e.undoManager,b=e.selection;a.onUndo=new d(e,"Undo",g,null,a),a.onRedo=new d(e,"Redo",g,null,a),a.onBeforeAdd=new d(e,"BeforeAddUndo",null,a),a.onAdd=new d(e,"AddUndo",null,a),b.onBeforeGetContent=new d(e,"BeforeGetContent",h(!0),b),b.onGetContent=new d(e,"GetContent",h(!0),b),b.onBeforeSetContent=new d(e,"BeforeSetContent",h(!0),b),b.onSetContent=new d(e,"SetContent",h(!0),b)}),e.on("BeforeRenderUI",function(){var b=e.windowManager;b.onOpen=new d,b.onClose=new d,b.createInstance=function(b,d,e,f,g,h){c("windowManager.createInstance(..)");var i=a.resolve(b);return new i(d,e,f,g,h)}})}}var f;a.util.Dispatcher=d,a.onBeforeUnload=new d(a,"BeforeUnload"),a.onAddEditor=new d(a,"AddEditor","editor"),a.onRemoveEditor=new d(a,"RemoveEditor","editor"),a.util.Cookie={get:b,getHash:b,remove:b,set:b,setHash:b},a.on("SetupEditor",e),a.PluginManager.add("compat3x",e),a.addI18n=function(b,c){var d=a.util.I18n,e=a.each;return"string"==typeof b&&-1===b.indexOf(".")?void d.add(b,c):void(a.is(b,"string")?e(c,function(a,c){d.data[b+"."+c]=a}):e(b,function(a,b){e(a,function(a,c){e(a,function(a,e){"common"===c?d.data[b+"."+e]=a:d.data[b+"."+c+"."+e]=a})})}))}}(tinymce); -------------------------------------------------------------------------------- /inc/metabox.php: -------------------------------------------------------------------------------- 1 | ID, "item-id", true); 36 | ?> 37 | 42 | 49 | 50 |53 | ID, "drstk-custom-content-placement", true); 59 | 60 | wp_nonce_field(basename(__FILE__), "meta-box-nonce"); 61 | $html = "Enter a custom URL alias for this item instead of its default, like item/neu:123. Do not include a leading slash. Examples could be "books/darwin" or "darwin"
51 | "> 52 |"; 62 | $html .= ""; 84 | echo $html; 85 | } 86 | 87 | function save_custom_meta_box($post_id, $post, $update){ 88 | $home_url = get_option('drstk_home_url'); 89 | if (!isset($_POST["meta-box-nonce"]) || !wp_verify_nonce($_POST["meta-box-nonce"], basename(__FILE__))) { 90 | return $post_id; 91 | } 92 | 93 | if(!current_user_can("edit_post", $post_id)) { 94 | return $post_id; 95 | } 96 | 97 | if(defined("DOING_AUTOSAVE") && DOING_AUTOSAVE) { 98 | return $post_id; 99 | } 100 | 101 | $slug = "drstk_item_extension"; 102 | if($slug != $post->post_type) { 103 | return $post_id; 104 | } 105 | 106 | $item_id = ""; 107 | 108 | if(isset($_POST["item-id"])){ 109 | $item_id = $_POST["item-id"]; 110 | } 111 | update_post_meta($post_id, "item-id", $item_id); 112 | if(isset($_POST["item-url"])){ 113 | $item_url = $_POST["item-url"]; 114 | } 115 | update_post_meta($post_id, "item-url", $item_url); 116 | 117 | update_post_meta($post_id, "drstk-custom-content-placement", $_POST['drstk-custom-content-placement']); 118 | } 119 | 120 | add_action("save_post", "save_custom_meta_box", 10, 3); 121 | --------------------------------------------------------------------------------Select the placement for this custom content
"; 63 | $html .= ""; 83 | $html .= "