├── .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 |

Custom dialog

5 | Input some text: 6 | 7 | 8 | -------------------------------------------------------------------------------- /templates/download.php: -------------------------------------------------------------------------------- 1 | ")}),a.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),a.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})}); -------------------------------------------------------------------------------- /public-ui/wrappers.php: -------------------------------------------------------------------------------- 1 | enable_cache(false); 8 | } 9 | 10 | function debug_change_feed_cache_transient_lifetime($seconds) { 11 | return 5; 12 | } 13 | 14 | 15 | function drstk_dev_site_status_admin_notice() { 16 | 17 | //include('devMessage.php'); 18 | } 19 | 20 | if (WP_DEBUG) { 21 | add_action('admin_notices', 'drstk_dev_site_status_admin_notice'); 22 | } 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /assets/mirador/plugins/anchor/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("anchor",function(a){function b(){var b=a.selection.getNode(),c="";"A"==b.tagName&&(c=b.name||b.id||""),a.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:c},onsubmit:function(b){a.execCommand("mceInsertContent",!1,a.dom.createHTML("a",{id:b.data.name}))}})}a.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:b,stateSelector:"a:not([href])"}),a.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:b})}); -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 |  ':" "),a.dom.setAttrib(a.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),a.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),a.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),b){var c=+b>1?+b:3;a.on("keydown",function(b){if(9==b.keyCode){if(b.shiftKey)return;b.preventDefault();for(var d=0;c>d;d++)a.execCommand("mceNonBreaking")}})}}); -------------------------------------------------------------------------------- /assets/mirador/sample_manifest.js: -------------------------------------------------------------------------------- 1 | // this is a sample JS file for calling a manifest - it must be modified for each collection and correspond to a manifest.json file existing on this server 2 | $(function() { 3 | Mirador({ 4 | "id": "mirador_viewer", 5 | "layout": "1x1", 6 | "data": [ 7 | { "manifestUri": "[wordpress_url]/manifest.json", "location":"Northeastern University Digital Repository Service (DRS)"}, 8 | ], 9 | "windowObjects": [ 10 | { 11 | "loadedManifest" : "[wordpress_url]/manifest.json", 12 | "viewType" : "BookView"} 13 | ], 14 | 'buildPath' : '/wp-content/plugins/drs-tk/assets/mirador/', 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /devMessage.php.dist: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 |
15 |

This is a dev site.

16 |

On branch:

17 |
18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /inc/breadcrumb.php: -------------------------------------------------------------------------------- 1 | '); 16 | }); 17 | 18 | editor.addButton('hr', { 19 | icon: 'hr', 20 | tooltip: 'Horizontal line', 21 | cmd: 'InsertHorizontalRule' 22 | }); 23 | 24 | editor.addMenuItem('hr', { 25 | icon: 'hr', 26 | text: 'Horizontal line', 27 | cmd: 'InsertHorizontalRule', 28 | context: 'insert' 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /assets/mirador/plugins/contextmenu/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("contextmenu",function(a){var b,c=a.settings.contextmenu_never_use_native;a.on("contextmenu",function(d){var e,f=a.getDoc();if(!d.ctrlKey||c){if(d.preventDefault(),tinymce.Env.mac&&tinymce.Env.webkit&&2==d.button&&f.caretRangeFromPoint&&a.selection.setRng(f.caretRangeFromPoint(d.x,d.y)),e=a.settings.contextmenu||"link image inserttable | cell row column deletetable",b)b.show();else{var g=[];tinymce.each(e.split(/[ ,]/),function(b){var c=a.menuItems[b];"|"==b&&(c={text:b}),c&&(c.shortcut="",g.push(c))});for(var h=0;h
10 | Ie. pk.eyJ1IjoiZGhhcmFtbWFuaWFyIiwiYSI6ImNpbTN0cjJmMTAwYmtpY2tyNjlvZDUzdXMifQ.8sUclClJc2zSBNW0ckJLOg'; 11 | } 12 | 13 | static function projectKey(): void { 14 | $leaflet_project_key = (get_option('leaflet_project_key') != '') ? get_option('leaflet_project_key') : ''; 15 | echo '
16 | Ie. dharammaniar.pfnog3b9'; 17 | } 18 | 19 | } 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /assets/mirador/plugins/emoticons/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("emoticons",function(a,b){function c(){var a;return a='',tinymce.each(d,function(c){a+="",tinymce.each(c,function(c){var d=b+"/img/smiley-"+c+".gif";a+=''}),a+=""}),a+="
"}var d=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:c,onclick:function(b){var c=a.dom.getParent(b.target,"a");c&&(a.insertContent(''+c.getAttribute('),this.hide())}},tooltip:"Emoticons"})}); -------------------------------------------------------------------------------- /assets/mirador/plugins/example_dependency/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 | /*jshint unused:false */ 12 | /*global tinymce:true */ 13 | 14 | /** 15 | * Register the plugin, specifying the list of the plugins that this plugin depends on. They are specified in a list, 16 | * with the list loaded in order. plugins in this list will be initialised when this plugin is initialized. (before the 17 | * init method is called). plugins in a depends list should typically be specified using the short name). If necessary 18 | * this can be done with an object which has the url to the plugin and the shortname. 19 | */ 20 | tinymce.PluginManager.add('example_dependency', function() { 21 | // Example logic here 22 | }, ['example']); 23 | -------------------------------------------------------------------------------- /assets/mirador/plugins/wordcount/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("wordcount",function(a){function b(){a.theme.panel.find("#wordcount").text(["Words: {0}",e.getCount()])}var c,d,e=this;c=a.getParam("wordcount_countregex",/[\w\u2019\x27\-\u00C0-\u1FFF]+/g),d=a.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),a.on("init",function(){var c=a.theme.panel&&a.theme.panel.find("#statusbar")[0];c&&window.setTimeout(function(){c.insert({type:"label",name:"wordcount",text:["Words: {0}",e.getCount()],classes:"wordcount",disabled:a.settings.readonly},0),a.on("setcontent beforeaddundo",b),a.on("keyup",function(a){32==a.keyCode&&b()})},0)}),e.getCount=function(){var b=a.getContent({format:"raw"}),e=0;if(b){b=b.replace(/\.\.\./g," "),b=b.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," "),b=b.replace(/(\w+)(&#?[a-z0-9]+;)+(\w+)/i,"$1$3").replace(/&.+?;/g," "),b=b.replace(d,"");var f=b.match(c);f&&(e=f.length)}return e}}); -------------------------------------------------------------------------------- /admin-ui/callbacks/Form.php: -------------------------------------------------------------------------------- 1 | " . 11 | "

CERES Settings

" . 12 | "
"; 13 | settings_fields("drstk_options"); 14 | do_settings_sections("drstk_options"); 15 | submit_button(); 16 | echo "
"; 17 | } 18 | 19 | static function homeUrl() { 20 | $url_base = get_option('drstk_home_url'); 21 | echo '
22 | This sets the URL permalink base for /browse/, /search/, /item/, and /collection/
23 | Currently, yours will look like: ' . drstk_home_url() . 'browse/
'; 24 | } 25 | } 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /assets/mirador/plugins/visualchars/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("visualchars",function(a){function b(b){var c,f,g,h,i,j,k=a.getBody(),l=a.selection;if(d=!d,e.state=d,a.fire("VisualChars",{state:d}),b&&(j=l.getBookmark()),d)for(f=[],tinymce.walk(k,function(a){3==a.nodeType&&a.nodeValue&&-1!=a.nodeValue.indexOf("\xa0")&&f.push(a)},"childNodes"),g=0;g$1'),i=a.dom.create("div",null,h);c=i.lastChild;)a.dom.insertAfter(c,f[g]);a.dom.remove(f[g])}else for(f=a.dom.select("span.mce-nbsp",k),g=f.length-1;g>=0;g--)a.dom.remove(f[g],1);l.moveToBookmark(j)}function c(){var b=this;a.on("VisualChars",function(a){b.active(a.state)})}var d,e=this;a.addCommand("mceVisualChars",b),a.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c}),a.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c,selectable:!0,context:"view",prependToContext:!0}),a.on("beforegetcontent",function(a){d&&"raw"!=a.format&&!a.draft&&(d=!0,b(!1))})}); -------------------------------------------------------------------------------- /templates/mirador.php: -------------------------------------------------------------------------------- 1 | 10 | 11 |
12 | 13 | 14 |
15 |
16 |
17 | 18 |
19 |
20 | 23 |
24 | 27 |

Mirador hasn't been enabled. Please contact Toolkit staff to enable this feature.

28 | 31 | 32 |
33 | 34 |
35 | 36 | 37 |
38 | 39 |
40 | 41 |
42 | 43 |
44 | 45 | -------------------------------------------------------------------------------- /admin-ui/Scripts.php: -------------------------------------------------------------------------------- 1 | jQuery(window).load(function(){jQuery('#adminmenuwrap').hide().show(0);});"; 11 | echo ""; 12 | } 13 | 14 | static function adminEnqueue(): void { 15 | if (get_current_screen()->base == 'settings_page_drstk_admin_menu') { 16 | // we are on the settings page 17 | 18 | wp_register_script('jquery-ui', "https://code.jquery.com/ui/1.14.1/jquery-ui.js"); 19 | wp_enqueue_script('jquery-ui'); 20 | $path = plugin_dir_url('drstk_item_meta_helper') . 'drs-toolkit-wp-plugin/assets/js/item_meta_helper.js'; 21 | wp_register_script('drstk_item_meta_helper_js', $path, array('jquery')); 22 | wp_enqueue_script( 'drstk_item_meta_helper_js'); 23 | } 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /assets/mirador/skins/lightgray/content.inline.min.css: -------------------------------------------------------------------------------- 1 | .mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-spellchecker-word{border-bottom:2px solid red;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid green;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333} -------------------------------------------------------------------------------- /assets/mirador/plugins/visualblocks/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("visualblocks",function(a,b){function c(){var b=this;b.active(f),a.on("VisualBlocks",function(){b.active(a.dom.hasClass(a.getBody(),"mce-visualblocks"))})}var d,e,f;window.NodeList&&(a.addCommand("mceVisualBlocks",function(){var c,g=a.dom;d||(d=g.uniqueId(),c=g.create("link",{id:d,rel:"stylesheet",href:b+"/css/visualblocks.css"}),a.getDoc().getElementsByTagName("head")[0].appendChild(c)),a.on("PreviewFormats AfterPreviewFormats",function(b){f&&g.toggleClass(a.getBody(),"mce-visualblocks","afterpreviewformats"==b.type)}),g.toggleClass(a.getBody(),"mce-visualblocks"),f=a.dom.hasClass(a.getBody(),"mce-visualblocks"),e&&e.active(g.hasClass(a.getBody(),"mce-visualblocks")),a.fire("VisualBlocks")}),a.addButton("visualblocks",{title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:c}),a.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:c,selectable:!0,context:"view",prependToContext:!0}),a.on("init",function(){a.settings.visualblocks_default_state&&a.execCommand("mceVisualBlocks",!1,null,{skip_focus:!0})}),a.on("remove",function(){a.dom.removeClass(a.getBody(),"mce-visualblocks")}))}); -------------------------------------------------------------------------------- /assets/mirador/plugins/save/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("save",function(a){function b(){var b;return b=tinymce.DOM.getParent(a.id,"form"),!a.getParam("save_enablewhendirty",!0)||a.isDirty()?(tinymce.triggerSave(),a.getParam("save_onsavecallback")?void(a.execCallback("save_onsavecallback",a)&&(a.startContent=tinymce.trim(a.getContent({format:"raw"})),a.nodeChanged())):void(b?(a.isNotDirty=!0,(!b.onsubmit||b.onsubmit())&&("function"==typeof b.submit?b.submit():a.windowManager.alert("Error: Form submit field collision.")),a.nodeChanged()):a.windowManager.alert("Error: No form element found."))):void 0}function c(){var b=tinymce.trim(a.startContent);return a.getParam("save_oncancelcallback")?void a.execCallback("save_oncancelcallback",a):(a.setContent(b),a.undoManager.clear(),void a.nodeChanged())}function d(){var b=this;a.on("nodeChange",function(){b.disabled(a.getParam("save_enablewhendirty",!0)&&!a.isDirty())})}a.addCommand("mceSave",b),a.addCommand("mceCancel",c),a.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:d}),a.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:d}),a.addShortcut("ctrl+s","","mceSave")}); -------------------------------------------------------------------------------- /assets/mirador/plugins/pagebreak/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("pagebreak",function(a){var b="mce-pagebreak",c=a.getParam("pagebreak_separator",""),d=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(a){return"\\"+a}),"gi"),e='';a.addCommand("mcePageBreak",function(){a.insertContent(a.settings.pagebreak_split_block?"

"+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 '
28 | This sets the URL path for the mirador viewer
29 | Currently, yours will look like: ' . drstk_home_url() . 'mirador/
'; 30 | 31 | } 32 | } 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /assets/mirador/plugins/colorpicker/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("colorpicker",function(a){function b(b,c){function d(a){var b=new tinymce.util.Color(a),c=b.toRgb();f.fromJSON({r:c.r,g:c.g,b:c.b,hex:b.toHex().substr(1)}),e(b.toHex())}function e(a){f.find("#preview")[0].getEl().style.background=a}var f=a.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:c,onchange:function(){var a=this.rgb();f&&(f.find("#r").value(a.r),f.find("#g").value(a.g),f.find("#b").value(a.b),f.find("#hex").value(this.value().substr(1)),e(this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var a,b,c=f.find("colorpicker")[0];return a=this.name(),b=this.value(),"hex"==a?(b="#"+b,d(b),void c.value(b)):(b={r:f.find("#r").value(),g:f.find("#g").value(),b:f.find("#b").value()},c.value(b),void d(b))}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){b("#"+this.toJSON().hex)}});d(c)}a.settings.color_picker_callback||(a.settings.color_picker_callback=b)}); -------------------------------------------------------------------------------- /assets/mirador/plugins/tabfocus/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("tabfocus",function(a){function b(a){9!==a.keyCode||a.ctrlKey||a.altKey||a.metaKey||a.preventDefault()}function c(b){function c(c){function f(a){return"BODY"===a.nodeName||"hidden"!=a.type&&"none"!=a.style.display&&"hidden"!=a.style.visibility&&f(a.parentNode)}function i(a){return/INPUT|TEXTAREA|BUTTON/.test(a.tagName)&&tinymce.get(b.id)&&-1!=a.tabIndex&&f(a)}if(h=d.select(":input:enabled,*[tabindex]:not(iframe)"),e(h,function(b,c){return b.id==a.id?(g=c,!1):void 0}),c>0){for(j=g+1;j=0;j--)if(i(h[j]))return h[j];return null}var g,h,i,j;if(!(9!==b.keyCode||b.ctrlKey||b.altKey||b.metaKey||b.isDefaultPrevented())&&(i=f(a.getParam("tab_focus",a.getParam("tabfocus_elements",":prev,:next"))),1==i.length&&(i[1]=i[0],i[0]=":prev"),h=b.shiftKey?":prev"==i[0]?c(-1):d.get(i[0]):":next"==i[1]?c(1):d.get(i[1]))){var k=tinymce.get(h.id||h.name);h.id&&k?k.focus():window.setTimeout(function(){tinymce.Env.webkit||window.focus(),h.focus()},10),b.preventDefault()}}var d=tinymce.DOM,e=tinymce.each,f=tinymce.explode;a.on("init",function(){a.inline&&tinymce.DOM.setAttrib(a.getBody(),"tabIndex",null),a.on("keyup",b),tinymce.Env.gecko?a.on("keypress keydown",c):a.on("keydown",c)})}); -------------------------------------------------------------------------------- /util/AdminConfig.php: -------------------------------------------------------------------------------- 1 | array( 13 | 'name' => __('Item Pages Custom Text'), 14 | 'singular_name' => __('Item Page Custom Text') 15 | ), 16 | 'public' => true, 17 | 'has_archive' => true, 18 | 'supports' => array('title', 'editor', 'revisions'), 19 | ) 20 | ); 21 | } 22 | } 23 | 24 | static function homeUrlValidation(string $input): string { 25 | $url_base = ''; 26 | $parts = explode("/", $input); 27 | foreach ($parts as $part) { 28 | if ($part != '') { 29 | $safe_part = sanitize_title($part); 30 | if ($safe_part) { 31 | $url_base .= sanitize_title($part); 32 | $url_base .= '/'; 33 | } 34 | } 35 | } 36 | return $url_base; 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /assets/mirador/plugins/advlist/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("advlist",function(a){function b(a,b){var c=[];return tinymce.each(b.split(/[ ,]/),function(a){c.push({text:a.replace(/\-/g," ").replace(/\b\w/g,function(a){return a.toUpperCase()}),data:"default"==a?"":a})}),c}function c(b,c){a.undoManager.transact(function(){var d,e=a.dom,f=a.selection;d=e.getParent(f.getNode(),"ol,ul"),d&&d.nodeName==b&&c!==!1||a.execCommand("UL"==b?"InsertUnorderedList":"InsertOrderedList"),c=c===!1?g[b]:c,g[b]=c,d=e.getParent(f.getNode(),"ol,ul"),d&&(e.setStyle(d,"listStyleType",c?c:null),d.removeAttribute("data-mce-style")),a.focus()})}function d(b){var c=a.dom.getStyle(a.dom.getParent(a.selection.getNode(),"ol,ul"),"listStyleType")||"";b.control.items().each(function(a){a.active(a.settings.data===c)})}var e,f,g={};e=b("OL",a.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),f=b("UL",a.getParam("advlist_bullet_styles","default,circle,disc,square")),a.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:e,onshow:d,onselect:function(a){c("OL",a.control.settings.data)},onclick:function(){c("OL",!1)}}),a.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:f,onshow:d,onselect:function(a){c("UL",a.control.settings.data)},onclick:function(){c("UL",!1)}})}); -------------------------------------------------------------------------------- /assets/mirador/plugins/preview/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("preview",function(a){var b=a.settings,c=!tinymce.Env.ie;a.addCommand("mcePreview",function(){a.windowManager.open({title:"Preview",width:parseInt(a.getParam("plugin_preview_width","650"),10),height:parseInt(a.getParam("plugin_preview_height","500"),10),html:'",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var d,e="";e+='',tinymce.each(a.contentCSS,function(b){e+=''});var f=b.body_id||"tinymce";-1!=f.indexOf("=")&&(f=a.getParam("body_id","","hash"),f=f[a.id]||f);var g=b.body_class||"";-1!=g.indexOf("=")&&(g=a.getParam("body_class","","hash"),g=g[a.id]||"");var h=a.settings.directionality?' dir="'+a.settings.directionality+'"':"";if(d=""+e+'"+a.getContent()+"",c)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(d);else{var i=this.getEl("body").firstChild.contentWindow.document;i.open(),i.write(d),i.close()}}})}),a.addButton("preview",{title:"Preview",cmd:"mcePreview"}),a.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})}); -------------------------------------------------------------------------------- /assets/mirador/locales/es/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "addItem": "Añadir artículo", 3 | "changeLayout": "Cambiar diseño", 4 | "selectGrid": "Elija una cuadrícula de abajo", 5 | "bookmark": "Añadir a la lista de marcadores", 6 | "close": "Cerrar", 7 | "bookmarkTitle": "Añadir a la lista de marcadores o compartir su espacio de trabajo", 8 | "filterObjects": "Filtrar objetos", 9 | "addNewObject": "Añadir nuevo objeto de URL", 10 | "item": "artículo", 11 | "items": "artículos", 12 | "more": "más", 13 | "details": "Detalles", 14 | "rights": "Derechos", 15 | "rightsStatus": "Estado de los Derechos", 16 | "unspecified": "Sin Especificar", 17 | "links": "Enlaces", 18 | "Label": "Etiqueta", 19 | "Description": "Descripción", 20 | "Attribution": "Atribución", 21 | "addSlotRight": "Añadir derecho ranura", 22 | "addSlotLeft": "Añadir izquierda ranura", 23 | "addSlotAbove": "Añadir sobre ranura", 24 | "addSlotBelow": "Añadir debajo ranura", 25 | "newObject": "Nuevo Objeto", 26 | "imageView": "Vista de la Imagen", 27 | "bookView": "Vista del Libro", 28 | "scrollView": "Vista del rollo de papel", 29 | "thumbnailsView": "Miniaturas", 30 | "objectMetadata": "Metadatos", 31 | "fullScreen": "Pantalla completa", 32 | "logo": "Logo", 33 | "load": "Cargar", 34 | "dropToLoad": "Soltar aquí para añadir el objeto" 35 | } -------------------------------------------------------------------------------- /assets/css/carousel.css: -------------------------------------------------------------------------------- 1 | /*for bootstrap carousel*/ 2 | .carousel-caption{ 3 | width: 100%; 4 | left: 0; 5 | right: 0; 6 | bottom: 0; 7 | padding:25px; 8 | margin-left:auto; 9 | margin-right:auto; 10 | } 11 | .carousel-inner > .item > a > img { 12 | display:block; 13 | margin-left:auto; 14 | margin-right:auto; 15 | } 16 | .carousel-control.right, .carousel-control.left{ 17 | background-image:none; 18 | opacity:1; 19 | } 20 | ol.carousel-indicators, .entry-content ol.carousel-indicators { 21 | margin-bottom:-20px; 22 | } 23 | #single_carousel .carousel-caption{ 24 | padding:10px; 25 | display:none; 26 | } 27 | #single_carousel:hover .carousel-caption{ 28 | display:block; 29 | } 30 | .carousel-fade .carousel-inner .item { 31 | transition-property: opacity; 32 | } 33 | .carousel-fade .carousel-inner .item, 34 | .carousel-fade .carousel-inner .active.left, 35 | .carousel-fade .carousel-inner .active.right { 36 | opacity: 0; 37 | } 38 | .carousel-fade .carousel-inner .active, 39 | .carousel-fade .carousel-inner .next.left, 40 | .carousel-fade .carousel-inner .prev.right { 41 | opacity: 1; 42 | } 43 | .carousel-fade .carousel-inner .next, 44 | .carousel-fade .carousel-inner .prev, 45 | .carousel-fade .carousel-inner .active.left, 46 | .carousel-fade .carousel-inner .active.right { 47 | left: 0; 48 | transform: translate3d(0, 0, 0); 49 | } 50 | 51 | .carousel-fade .carousel-control { 52 | z-index: 2; 53 | } 54 | -------------------------------------------------------------------------------- /assets/mirador/locales/ga/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "addItem": "Cuir Mír Leis", 3 | "changeLayout": "Athraigh an Leagan Amach", 4 | "selectGrid": "Roghnaigh Eangach Thíos", 5 | "bookmark": "Leabharmharc", 6 | "close": "Dún", 7 | "bookmarkTitle": "Leabharmharcáil nó Roinn do Spás Oibre", 8 | "filterObjects": "Scag ábhair", 9 | "addNewObject": "Cuir ábhar ó URL", 10 | "more": "níos mó", 11 | "item": "mír", 12 | "items": "míreanna", 13 | "details": "Sonraí", 14 | "rights": "Cearta", 15 | "rightsStatus": "Stádas Ceart", 16 | "unspecified": "Neamhshonraithe", 17 | "links": "Naisc", 18 | "addSlotRight": "Cuir Sliotán Ar Dheis", 19 | "addSlotLeft": "Cuir Sliotán Ar Clé", 20 | "addSlotAbove": "Cuir Sliotán Thuas", 21 | "addSlotBelow": "Cuir Sliotán Thíos", 22 | "imageView": "Amharc Íomhánna", 23 | "bookView": "Amharc Leabhair", 24 | "scrollView": "Amharc Scrollaithe", 25 | "thumbnailsView": "Amharc Gailearaí", 26 | "comments": "Tráchtanna", 27 | "addTagsHere": "Cuir clibeanna anseo", 28 | "save": "Sábháil", 29 | "cancel": "Cealaigh", 30 | "edit": "Cuir in eagar", 31 | "delete": "Scrios", 32 | "url": "URL", 33 | "newObject": "Ábhar Nua", 34 | "objectMetadata": "Meiteashonraí Ábhair", 35 | "fullScreen": "Lánscáileán", 36 | "logo": "Lógó", 37 | "load": "Uaslódáil", 38 | "dropToLoad": "Titim anseo a luchtú léiriú" 39 | } 40 | -------------------------------------------------------------------------------- /assets/mirador/plugins/nonbreaking/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('nonbreaking', function(editor) { 14 | var setting = editor.getParam('nonbreaking_force_tab'); 15 | 16 | editor.addCommand('mceNonBreaking', function() { 17 | editor.insertContent( 18 | (editor.plugins.visualchars && editor.plugins.visualchars.state) ? 19 | ' ' : ' ' 20 | ); 21 | 22 | editor.dom.setAttrib(editor.dom.select('span.mce-nbsp'), 'data-mce-bogus', '1'); 23 | }); 24 | 25 | editor.addButton('nonbreaking', { 26 | title: 'Nonbreaking space', 27 | cmd: 'mceNonBreaking' 28 | }); 29 | 30 | editor.addMenuItem('nonbreaking', { 31 | text: 'Nonbreaking space', 32 | cmd: 'mceNonBreaking', 33 | context: 'insert' 34 | }); 35 | 36 | if (setting) { 37 | var spaces = +setting > 1 ? +setting : 3; // defaults to 3 spaces if setting is true (or 1) 38 | 39 | editor.on('keydown', function(e) { 40 | if (e.keyCode == 9) { 41 | 42 | if (e.shiftKey) { 43 | return; 44 | } 45 | 46 | e.preventDefault(); 47 | for (var i = 0; i < spaces; i++) { 48 | editor.execCommand('mceNonBreaking'); 49 | } 50 | } 51 | }); 52 | } 53 | }); 54 | -------------------------------------------------------------------------------- /assets/mirador/locales/ar/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "addItem": "أضف عنصراً", 3 | "changeLayout": "غيّر الإطار", 4 | "selectGrid": "اختر تقسيم الشاشة في الأسفل", 5 | "bookmark": "أضف للمفضلة", 6 | "close": "أغلق", 7 | "bookmarkTitle": "أضف للمفضلة أو شارك مساحة العمل", 8 | "filterObjects": "فلتر المواضيع", 9 | "addNewObject": "أضف موضوعاً جديداً من الرابط", 10 | "more": "أكثر", 11 | "item": "عنصر", 12 | "items": "عناصر", 13 | "details": "تفاصيل", 14 | "rights": "الحقوق", 15 | "rightsStatus": "حالة الحقوق", 16 | "unspecified": "غير محدد", 17 | "links": "روابط", 18 | "addSlotRight": "أضف شريحة إلى اليمين", 19 | "addSlotLeft": "أضف شريحة إلى اليسار", 20 | "addSlotAbove": "أضف شريحة في الأعلى", 21 | "addSlotBelow": "أصف شريحة في الأسفل", 22 | "imageView": "مشاهدة الصورة", 23 | "bookView": "مشاهدة الكتاب", 24 | "scrollView": "مشاهدة الانتقال", 25 | "thumbnailsView": "مشاهدة ظفر الإبهام", 26 | "comments": "التعليقات", 27 | "addTagsHere": "أضف الإشارة هنا", 28 | "save": "حفظ", 29 | "cancel": "إلغاء", 30 | "edit": "تحرير", 31 | "delete": "مسح", 32 | "url": "الرابط", 33 | "newObject": "موضوع جديد", 34 | "objectMetadata": "البيانات الوصفية للموضوع", 35 | "fullScreen": "ملء الشاشة", 36 | "logo": "الشعار", 37 | "load": "عبأ", 38 | "dropToLoad": "إسقاط لتحميل واضح" 39 | } 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /assets/mirador/locales/nl/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "addItem": "Voeg item toe", 3 | "changeLayout": "Pas layout aan", 4 | "selectGrid": "Kies een grid hieronder", 5 | "bookmark": "Favoriet", 6 | "close": "Sluiten", 7 | "bookmarkTitle": "Favoriet of deel uw werkset", 8 | "filterObjects": "Filter objecten", 9 | "addNewObject": "Voeg nieuw object toe via URL", 10 | "more": "meer", 11 | "item": "item", 12 | "items": "items", 13 | "details": "Details", 14 | "rights": "Copyright", 15 | "rightsStatus": "Copyright Status", 16 | "unspecified": "Niet gespecifieerd", 17 | "links": "Links", 18 | "addSlotRight": "Voeg Slot toe rechts", 19 | "addSlotLeft": "Voeg Slot toe links", 20 | "addSlotAbove": "Voeg Slot toe bovenaan", 21 | "addSlotBelow": "Voeg Slot toe onderaan", 22 | "imageView": "Beeld presentatie", 23 | "bookView": "Boek presentatie", 24 | "scrollView": "Navigeer door presentatie", 25 | "thumbnailsView": "Galerie presentatie", 26 | "comments": "Commentaar", 27 | "addTagsHere": "Voeg hier tags toe", 28 | "save": "Bewaren", 29 | "cancel": "Annuleren", 30 | "edit": "Bewerken", 31 | "delete": "Verwijderen", 32 | "url": "URL", 33 | "newObject": "Nieuw Object", 34 | "objectMetadata": "Object Metadata", 35 | "fullScreen": "Volledig scherm", 36 | "logo": "Logo", 37 | "load": "Opladen", 38 | "dropToLoad": "Vallen hier om object te laden" 39 | } 40 | -------------------------------------------------------------------------------- /assets/mirador/locales/de/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "addItem": "Objekt hinzufügen", 3 | "changeLayout": "Layout ändern", 4 | "selectGrid": "Anordnung auswählen", 5 | "bookmark": "Lesezeichen", 6 | "close": "Schließen", 7 | "bookmarkTitle": "Ansicht speichern oder teilen", 8 | "filterObjects": "Objekte filtern", 9 | "addNewObject": "Objekt über URL hinzufügen", 10 | "more": "mehr", 11 | "item": "Objekt", 12 | "items": "Objekte", 13 | "details": "Details", 14 | "rights": "Rechte", 15 | "rightsStatus": "Rechtsstatus", 16 | "unspecified": "nicht spezifiziert", 17 | "links": "Links", 18 | "addSlotRight": "Bereich rechts hinzufügen", 19 | "addSlotLeft": "Bereich links hinzufügen", 20 | "addSlotAbove": "Bereich oben hinzufügen", 21 | "addSlotBelow": "Bereich unten hinzufügen", 22 | "imageView": "Ansicht Einzelbild", 23 | "bookView": "Ansicht Doppelseite", 24 | "scrollView": "Ansicht horizontal scrollen", 25 | "thumbnailsView": "Ansicht galerie", 26 | "comments": "Kommentare", 27 | "addTagsHere": "Tags hier hinzufügen", 28 | "save": "Speichern", 29 | "cancel": "Abbrechen", 30 | "edit": "Bearbeiten", 31 | "delete": "Löschen", 32 | "url": "URL", 33 | "newObject": "Neues Objekt", 34 | "objectMetadata": "Objekt Metadaten", 35 | "fullScreen": "Vollbild", 36 | "logo": "Logo", 37 | "load": "Laden", 38 | "dropToLoad": "Fallen hier zu laden manifestieren" 39 | } 40 | -------------------------------------------------------------------------------- /assets/mirador/skins/lightgray/content.min.css: -------------------------------------------------------------------------------- 1 | body{background-color:#FFF;color:#000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-spellchecker-word{border-bottom:2px solid red;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid green;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333} -------------------------------------------------------------------------------- /assets/mirador/plugins/fullscreen/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function c(){function c(){j.setStyle(m,"height",b().h-(l.clientHeight-m.clientHeight))}var k,l,m,n,o=document.body,p=document.documentElement;i=!i,l=a.getContainer(),k=l.style,m=a.getContentAreaContainer().firstChild,n=m.style,i?(d=n.width,e=n.height,n.width=n.height="100%",g=k.width,h=k.height,k.width=k.height="",j.addClass(o,"mce-fullscreen"),j.addClass(p,"mce-fullscreen"),j.addClass(l,"mce-fullscreen"),j.bind(window,"resize",c),c(),f=c):(n.width=d,n.height=e,g&&(k.width=g),h&&(k.height=h),j.removeClass(o,"mce-fullscreen"),j.removeClass(p,"mce-fullscreen"),j.removeClass(l,"mce-fullscreen"),j.unbind(window,"resize",f)),a.fire("FullscreenStateChanged",{state:i})}var d,e,f,g,h,i=!1,j=tinymce.DOM;return a.settings.inline?void 0:(a.on("init",function(){a.addShortcut("Ctrl+Alt+F","",c)}),a.on("remove",function(){f&&j.unbind(window,"resize",f)}),a.addCommand("mceFullScreen",c),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Alt+F",selectable:!0,onClick:c,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Alt+F",onClick:c,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return i}})}); -------------------------------------------------------------------------------- /assets/mirador/plugins/directionality/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('directionality', function(editor) { 14 | function setDir(dir) { 15 | var dom = editor.dom, curDir, blocks = editor.selection.getSelectedBlocks(); 16 | 17 | if (blocks.length) { 18 | curDir = dom.getAttrib(blocks[0], "dir"); 19 | 20 | tinymce.each(blocks, function(block) { 21 | // Add dir to block if the parent block doesn't already have that dir 22 | if (!dom.getParent(block.parentNode, "*[dir='" + dir + "']", dom.getRoot())) { 23 | if (curDir != dir) { 24 | dom.setAttrib(block, "dir", dir); 25 | } else { 26 | dom.setAttrib(block, "dir", null); 27 | } 28 | } 29 | }); 30 | 31 | editor.nodeChanged(); 32 | } 33 | } 34 | 35 | function generateSelector(dir) { 36 | var selector = []; 37 | 38 | tinymce.each('h1 h2 h3 h4 h5 h6 div p'.split(' '), function(name) { 39 | selector.push(name + '[dir=' + dir + ']'); 40 | }); 41 | 42 | return selector.join(','); 43 | } 44 | 45 | editor.addCommand('mceDirectionLTR', function() { 46 | setDir("ltr"); 47 | }); 48 | 49 | editor.addCommand('mceDirectionRTL', function() { 50 | setDir("rtl"); 51 | }); 52 | 53 | editor.addButton('ltr', { 54 | title: 'Left to right', 55 | cmd: 'mceDirectionLTR', 56 | stateSelector: generateSelector('ltr') 57 | }); 58 | 59 | editor.addButton('rtl', { 60 | title: 'Right to left', 61 | cmd: 'mceDirectionRTL', 62 | stateSelector: generateSelector('rtl') 63 | }); 64 | }); -------------------------------------------------------------------------------- /assets/mirador/plugins/autoresize/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("autoresize",function(a){function b(){return a.plugins.fullscreen&&a.plugins.fullscreen.isFullscreen()}function c(d){var g,h,i,j,k,l,m,n,o,p,q,r,s=tinymce.DOM;if(h=a.getDoc()){if(i=h.body,j=h.documentElement,k=e.autoresize_min_height,!i||d&&"setcontent"===d.type&&d.initial||b())return void(i&&j&&(i.style.overflowY="auto",j.style.overflowY="auto"));m=a.dom.getStyle(i,"margin-top",!0),n=a.dom.getStyle(i,"margin-bottom",!0),o=a.dom.getStyle(i,"padding-top",!0),p=a.dom.getStyle(i,"padding-bottom",!0),q=a.dom.getStyle(i,"border-top-width",!0),r=a.dom.getStyle(i,"border-bottom-width",!0),l=i.offsetHeight+parseInt(m,10)+parseInt(n,10)+parseInt(o,10)+parseInt(p,10)+parseInt(q,10)+parseInt(r,10),(isNaN(l)||0>=l)&&(l=tinymce.Env.ie?i.scrollHeight:tinymce.Env.webkit&&0===i.clientHeight?0:i.offsetHeight),l>e.autoresize_min_height&&(k=l),e.autoresize_max_height&&l>e.autoresize_max_height?(k=e.autoresize_max_height,i.style.overflowY="auto",j.style.overflowY="auto"):(i.style.overflowY="hidden",j.style.overflowY="hidden",i.scrollTop=0),k!==f&&(g=k-f,s.setStyle(a.iframeElement,"height",k+"px"),f=k,tinymce.isWebKit&&0>g&&c(d))}}function d(a,b,e){setTimeout(function(){c({}),a--?d(a,b,e):e&&e()},b)}var e=a.settings,f=0;a.settings.inline||(e.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight),10),e.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0),10),a.on("init",function(){var b=a.getParam("autoresize_overflow_padding",1);a.dom.setStyles(a.getBody(),{paddingBottom:a.getParam("autoresize_bottom_margin",50),paddingLeft:b,paddingRight:b})}),a.on("nodechange setcontent keyup FullscreenStateChanged",c),a.getParam("autoresize_on_init",!0)&&a.on("init",function(){d(20,100,function(){d(5,1e3)})}),a.addCommand("mceAutoResize",c))}); -------------------------------------------------------------------------------- /assets/mirador/plugins/code/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('code', function(editor) { 14 | function showDialog() { 15 | var win = editor.windowManager.open({ 16 | title: "Source code", 17 | body: { 18 | type: 'textbox', 19 | name: 'code', 20 | multiline: true, 21 | minWidth: editor.getParam("code_dialog_width", 600), 22 | minHeight: editor.getParam("code_dialog_height", Math.min(tinymce.DOM.getViewPort().h - 200, 500)), 23 | spellcheck: false, 24 | style: 'direction: ltr; text-align: left' 25 | }, 26 | onSubmit: function(e) { 27 | // We get a lovely "Wrong document" error in IE 11 if we 28 | // don't move the focus to the editor before creating an undo 29 | // transation since it tries to make a bookmark for the current selection 30 | editor.focus(); 31 | 32 | editor.undoManager.transact(function() { 33 | editor.setContent(e.data.code); 34 | }); 35 | 36 | editor.selection.setCursorLocation(); 37 | editor.nodeChanged(); 38 | } 39 | }); 40 | 41 | // Gecko has a major performance issue with textarea 42 | // contents so we need to set it when all reflows are done 43 | win.find('#code').value(editor.getContent({source_view: true})); 44 | } 45 | 46 | editor.addCommand("mceCodeEditor", showDialog); 47 | 48 | editor.addButton('code', { 49 | icon: 'code', 50 | tooltip: 'Source code', 51 | onclick: showDialog 52 | }); 53 | 54 | editor.addMenuItem('code', { 55 | icon: 'code', 56 | text: 'Source code', 57 | context: 'tools', 58 | onclick: showDialog 59 | }); 60 | }); -------------------------------------------------------------------------------- /assets/mirador/plugins/autolink/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("autolink",function(a){function b(a){e(a,-1,"(",!0)}function c(a){e(a,0,"",!0)}function d(a){e(a,-1,"",!1)}function e(a,b,c){function d(a,b){if(0>b&&(b=0),3==a.nodeType){var c=a.data.length;b>c&&(b=c)}return b}function e(a,b){1!=a.nodeType||a.hasChildNodes()?g.setStart(a,d(a,b)):g.setStartBefore(a)}function f(a,b){1!=a.nodeType||a.hasChildNodes()?g.setEnd(a,d(a,b)):g.setEndAfter(a)}var g,h,i,j,k,l,m,n,o,p;if(g=a.selection.getRng(!0).cloneRange(),g.startOffset<5){if(n=g.endContainer.previousSibling,!n){if(!g.endContainer.firstChild||!g.endContainer.firstChild.nextSibling)return;n=g.endContainer.firstChild.nextSibling}if(o=n.length,e(n,o),f(n,o),g.endOffset<5)return;h=g.endOffset,j=n}else{if(j=g.endContainer,3!=j.nodeType&&j.firstChild){for(;3!=j.nodeType&&j.firstChild;)j=j.firstChild;3==j.nodeType&&(e(j,0),f(j,j.nodeValue.length))}h=1==g.endOffset?2:g.endOffset-1-b}i=h;do e(j,h>=2?h-2:0),f(j,h>=1?h-1:0),h-=1,p=g.toString();while(" "!=p&&""!==p&&160!=p.charCodeAt(0)&&h-2>=0&&p!=c);g.toString()==c||160==g.toString().charCodeAt(0)?(e(j,h),f(j,i),h+=1):0===g.startOffset?(e(j,0),f(j,i)):(e(j,h),f(j,i)),l=g.toString(),"."==l.charAt(l.length-1)&&f(j,i-1),l=g.toString(),m=l.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),m&&("www."==m[1]?m[1]="http://www.":/@$/.test(m[1])&&!/^mailto:/.test(m[1])&&(m[1]="mailto:"+m[1]),k=a.selection.getBookmark(),a.selection.setRng(g),a.execCommand("createlink",!1,m[1]+m[2]),a.selection.moveToBookmark(k),a.nodeChanged())}var f;return a.on("keydown",function(b){return 13==b.keyCode?d(a):void 0}),tinymce.Env.ie?void a.on("focus",function(){if(!f){f=!0;try{a.execCommand("AutoUrlDetect",!1,!0)}catch(b){}}}):(a.on("keypress",function(c){return 41==c.keyCode?b(a):void 0}),void a.on("keyup",function(b){return 32==b.keyCode?c(a):void 0}))}); -------------------------------------------------------------------------------- /util/WPOptionsUtilities.php: -------------------------------------------------------------------------------- 1 | '; 25 | 26 | tinymce.each(emoticons, function(row) { 27 | emoticonsHtml += ''; 28 | 29 | tinymce.each(row, function(icon) { 30 | var emoticonUrl = url + '/img/smiley-' + icon + '.gif'; 31 | 32 | emoticonsHtml += ''; 35 | }); 36 | 37 | emoticonsHtml += ''; 38 | }); 39 | 40 | emoticonsHtml += ''; 41 | 42 | return emoticonsHtml; 43 | } 44 | 45 | editor.addButton('emoticons', { 46 | type: 'panelbutton', 47 | panel: { 48 | role: 'application', 49 | autohide: true, 50 | html: getHtml, 51 | onclick: function(e) { 52 | var linkElm = editor.dom.getParent(e.target, 'a'); 53 | 54 | if (linkElm) { 55 | editor.insertContent( 56 | '' + linkElm.getAttribute('data-mce-alt') + '' 57 | ); 58 | 59 | this.hide(); 60 | } 61 | } 62 | }, 63 | tooltip: 'Emoticons' 64 | }); 65 | }); 66 | -------------------------------------------------------------------------------- /templates/browse.php: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | 12 | 13 |
14 |
15 |
16 | 22 |
23 |
24 |
25 | 26 |
    27 |
    28 |
    29 | 30 |
    31 |
    32 | 33 |
    34 |
    35 | 36 |
    37 |
    38 |
    39 |
    40 | 41 |
    42 | 43 |
    44 | 45 | 46 | 49 | 50 |
    51 | 52 |
    53 | 54 |
    55 | 56 |
    57 | 58 | -------------------------------------------------------------------------------- /assets/mirador/plugins/insertdatetime/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("insertdatetime",function(a){function b(b,c){function d(a,b){if(a=""+a,a.length'+d+"";var f=a.dom.getParent(a.selection.getStart(),"time");if(f)return void a.dom.setOuterHTML(f,d)}a.insertContent(d)}var d,e,f="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),g="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),h="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),i="January February March April May June July August September October November December".split(" "),j=[];a.addCommand("mceInsertDate",function(){c(a.getParam("insertdatetime_dateformat",a.translate("%Y-%m-%d")))}),a.addCommand("mceInsertTime",function(){c(a.getParam("insertdatetime_timeformat",a.translate("%H:%M:%S")))}),a.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){c(d||e)},menu:j}),tinymce.each(a.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(a){e||(e=a),j.push({text:b(a),onclick:function(){d=a,c(a)}})}),a.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:j,context:"insert"})}); -------------------------------------------------------------------------------- /assets/js/breadcrumb.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function($) { 2 | var item_pid = breadcrumb_obj.item_pid; 3 | var sub_collection_pid = breadcrumb_obj.sub_collection_pid; 4 | var collection_pid = breadcrumb_obj.collection_pid; 5 | var params = {}; 6 | var template = breadcrumb_obj.template; 7 | var home_url = ''; 8 | if (template == 'collection'){ 9 | params = {pid:sub_collection_pid}; 10 | } 11 | $(".breadcrumbs").children("li").remove(); 12 | get_data(params); 13 | 14 | function get_data(params){ 15 | $.post(breadcrumb_obj.ajax_url, { 16 | _ajax_nonce: breadcrumb_obj.nonce, 17 | action: "get_breadcrumb", 18 | pid: params.pid, 19 | 20 | }, function(data) { 21 | var data = $.parseJSON(data); 22 | home_url = data.home_url; 23 | if (data.error){ 24 | $(".breadcrumbs").hide(); 25 | } 26 | else if (jQuery.type(data) == 'object') { 27 | parse_breadcrumb(data.response.response); 28 | } 29 | }).fail(function() { 30 | $(".breadcrumbs").hide(); 31 | }); 32 | } 33 | function parse_breadcrumb(data){ 34 | var doc_vals = data.docs[0] 35 | var title = doc_vals.full_title_ssi; 36 | var parent = ''; 37 | var object_type = doc_vals.active_fedora_model_ssi; 38 | if (object_type == 'Collection'){ 39 | var object_url = 'collection/'+doc_vals.id; 40 | $(".breadcrumbs").prepend(" / " + "" + title + ""); 41 | } 42 | 43 | if (doc_vals.fields_parent_id_tesim) { 44 | parent = doc_vals.fields_parent_id_tesim[0]; 45 | if (parent != collection_pid) { 46 | params.pid = parent; 47 | get_data(params); 48 | } else { 49 | $(".breadcrumbs").prepend("Browse"); 50 | } 51 | } 52 | if ((template == 'collection') && (doc_vals.id == sub_collection_pid)){ 53 | $(".page-title").html(title + " Collection"); 54 | } 55 | } 56 | }); 57 | -------------------------------------------------------------------------------- /admin-ui/callbacks/Collections.php: -------------------------------------------------------------------------------- 1 |
    11 | Ie. https://repository.library.northeastern.edu/collections/neu:6012'; 12 | 13 | if (WP_DEBUG) { 14 | $commonPidsHtml = " 15 |

    Reference PIDs for dev and testing:

    16 |
      17 |
    • ETD: https://repository.library.northeastern.edu/sets/neu:cj82r3884
    • 18 |
    • What's New: https://repository.library.northeastern.edu/collections/neu:cj82q862v
    • 19 |
    • Class podcasts: https://repository.library.northeastern.edu/collections/neu:f1881z41n
    • 20 |
    • LGBTAQ+ : https://repository.library.northeastern.edu/sets/neu:f1882114b
    • 21 |
    22 | "; 23 | echo $commonPidsHtml; 24 | } 25 | } 26 | 27 | static function collectionsPage() { 28 | echo ''; 35 | } 36 | 37 | static function collectionPageTitle(): void { 38 | echo ''; 45 | } 46 | 47 | 48 | } 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /admin-ui/callbacks/Niec.php: -------------------------------------------------------------------------------- 1 | Yes'; 13 | } 14 | 15 | static function niecMetadata(): void { 16 | $niec_facet_options = drstk_facets_get_option('niec', true);; 17 | $niec_facets_to_display = get_option('drstk_niec_metadata'); 18 | echo ""; 19 | if (is_array($niec_facets_to_display)) { 20 | foreach ($niec_facets_to_display as $option) { 21 | echo ''; 22 | echo ''; 23 | } 24 | } 25 | foreach ($niec_facet_options as $option) { 26 | if (!is_array($niec_facets_to_display) || (is_array($niec_facets_to_display) && !in_array($option, $niec_facets_to_display))) { 27 | echo ''; 28 | echo ''; 29 | } 30 | } 31 | echo "
    "; 32 | } 33 | 34 | // @todo another WTF is this doing to figure out 35 | static function niecMetadataTitle(): void { 36 | echo ''; 37 | } 38 | 39 | } 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /assets/mirador/plugins/wordcount/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('wordcount', function(editor) { 14 | var self = this, countre, cleanre; 15 | 16 | // Included most unicode blocks see: http://en.wikipedia.org/wiki/Unicode_block 17 | // Latin-1_Supplement letters, a-z, u2019 == ’ 18 | countre = editor.getParam('wordcount_countregex', /[\w\u2019\x27\-\u00C0-\u1FFF]+/g); 19 | cleanre = editor.getParam('wordcount_cleanregex', /[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g); 20 | 21 | function update() { 22 | editor.theme.panel.find('#wordcount').text(['Words: {0}', self.getCount()]); 23 | } 24 | 25 | editor.on('init', function() { 26 | var statusbar = editor.theme.panel && editor.theme.panel.find('#statusbar')[0]; 27 | 28 | if (statusbar) { 29 | window.setTimeout(function() { 30 | statusbar.insert({ 31 | type: 'label', 32 | name: 'wordcount', 33 | text: ['Words: {0}', self.getCount()], 34 | classes: 'wordcount', 35 | disabled: editor.settings.readonly 36 | }, 0); 37 | 38 | editor.on('setcontent beforeaddundo', update); 39 | 40 | editor.on('keyup', function(e) { 41 | if (e.keyCode == 32) { 42 | update(); 43 | } 44 | }); 45 | }, 0); 46 | } 47 | }); 48 | 49 | self.getCount = function() { 50 | var tx = editor.getContent({format: 'raw'}); 51 | var tc = 0; 52 | 53 | if (tx) { 54 | tx = tx.replace(/\.\.\./g, ' '); // convert ellipses to spaces 55 | tx = tx.replace(/<.[^<>]*?>/g, ' ').replace(/ | /gi, ' '); // remove html tags and space chars 56 | 57 | // deal with html entities 58 | tx = tx.replace(/(\w+)(&#?[a-z0-9]+;)+(\w+)/i, "$1$3").replace(/&.+?;/g, ' '); 59 | tx = tx.replace(cleanre, ''); // remove numbers and punctuation 60 | 61 | var wordArray = tx.match(countre); 62 | if (wordArray) { 63 | tc = wordArray.length; 64 | } 65 | } 66 | 67 | return tc; 68 | }; 69 | }); -------------------------------------------------------------------------------- /assets/mirador/plugins/autosave/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce._beforeUnloadHandler=function(){var a;return tinymce.each(tinymce.editors,function(b){b.plugins.autosave&&b.plugins.autosave.storeDraft(),!a&&b.isDirty()&&b.getParam("autosave_ask_before_unload",!0)&&(a=b.translate("You have unsaved changes are you sure you want to navigate away?"))}),a},tinymce.PluginManager.add("autosave",function(a){function b(a,b){var c={s:1e3,m:6e4};return a=/^(\d+)([ms]?)$/.exec(""+(a||b)),(a[2]?c[a[2]]:1)*parseInt(a,10)}function c(){var a=parseInt(n.getItem(k+"time"),10)||0;return(new Date).getTime()-a>m.autosave_retention?(d(!1),!1):!0}function d(b){n.removeItem(k+"draft"),n.removeItem(k+"time"),b!==!1&&a.fire("RemoveDraft")}function e(){!j()&&a.isDirty()&&(n.setItem(k+"draft",a.getContent({format:"raw",no_events:!0})),n.setItem(k+"time",(new Date).getTime()),a.fire("StoreDraft"))}function f(){c()&&(a.setContent(n.getItem(k+"draft"),{format:"raw"}),a.fire("RestoreDraft"))}function g(){l||(setInterval(function(){a.removed||e()},m.autosave_interval),l=!0)}function h(){var b=this;b.disabled(!c()),a.on("StoreDraft RestoreDraft RemoveDraft",function(){b.disabled(!c())}),g()}function i(){a.undoManager.beforeChange(),f(),d(),a.undoManager.add()}function j(b){var c=a.settings.forced_root_block;return b=tinymce.trim("undefined"==typeof b?a.getBody().innerHTML:b),""===b||new RegExp("^<"+c+"[^>]*>((\xa0| |[ ]|]*>)+?|)|
    $","i").test(b)}var k,l,m=a.settings,n=tinymce.util.LocalStorage;k=m.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",k=k.replace(/\{path\}/g,document.location.pathname),k=k.replace(/\{query\}/g,document.location.search),k=k.replace(/\{id\}/g,a.id),m.autosave_interval=b(m.autosave_interval,"30s"),m.autosave_retention=b(m.autosave_retention,"20m"),a.addButton("restoredraft",{title:"Restore last draft",onclick:i,onPostRender:h}),a.addMenuItem("restoredraft",{text:"Restore last draft",onclick:i,onPostRender:h,context:"file"}),a.settings.autosave_restore_when_empty!==!1&&(a.on("init",function(){c()&&j()&&f()}),a.on("saveContent",function(){d()})),window.onbeforeunload=tinymce._beforeUnloadHandler,this.hasDraft=c,this.storeDraft=e,this.restoreDraft=f,this.removeDraft=d,this.isEmpty=j}); -------------------------------------------------------------------------------- /assets/mirador/plugins/compat3x/utils/editable_selects.js: -------------------------------------------------------------------------------- 1 | /** 2 | * editable_selects.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 | var TinyMCE_EditableSelects = { 12 | editSelectElm : null, 13 | 14 | init : function() { 15 | var nl = document.getElementsByTagName("select"), i, d = document, o; 16 | 17 | for (i=0; i$1'); 38 | 39 | div = editor.dom.create('div', null, nodeValue); 40 | while ((node = div.lastChild)) { 41 | editor.dom.insertAfter(node, nodeList[i]); 42 | } 43 | 44 | editor.dom.remove(nodeList[i]); 45 | } 46 | } else { 47 | nodeList = editor.dom.select('span.mce-nbsp', body); 48 | 49 | for (i = nodeList.length - 1; i >= 0; i--) { 50 | editor.dom.remove(nodeList[i], 1); 51 | } 52 | } 53 | 54 | selection.moveToBookmark(bookmark); 55 | } 56 | 57 | function toggleActiveState() { 58 | var self = this; 59 | 60 | editor.on('VisualChars', function(e) { 61 | self.active(e.state); 62 | }); 63 | } 64 | 65 | editor.addCommand('mceVisualChars', toggleVisualChars); 66 | 67 | editor.addButton('visualchars', { 68 | title: 'Show invisible characters', 69 | cmd: 'mceVisualChars', 70 | onPostRender: toggleActiveState 71 | }); 72 | 73 | editor.addMenuItem('visualchars', { 74 | text: 'Show invisible characters', 75 | cmd: 'mceVisualChars', 76 | onPostRender: toggleActiveState, 77 | selectable: true, 78 | context: 'view', 79 | prependToContext: true 80 | }); 81 | 82 | editor.on('beforegetcontent', function(e) { 83 | if (state && e.format != 'raw' && !e.draft) { 84 | state = true; 85 | toggleVisualChars(false); 86 | } 87 | }); 88 | }); 89 | -------------------------------------------------------------------------------- /assets/mirador/plugins/visualblocks/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * plugin.js 3 | * 4 | * Copyright 2012, 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('visualblocks', function(editor, url) { 14 | var cssId, visualBlocksMenuItem, enabled; 15 | 16 | // We don't support older browsers like IE6/7 and they don't provide prototypes for DOM objects 17 | if (!window.NodeList) { 18 | return; 19 | } 20 | 21 | function toggleActiveState() { 22 | var self = this; 23 | 24 | self.active(enabled); 25 | 26 | editor.on('VisualBlocks', function() { 27 | self.active(editor.dom.hasClass(editor.getBody(), 'mce-visualblocks')); 28 | }); 29 | } 30 | 31 | editor.addCommand('mceVisualBlocks', function() { 32 | var dom = editor.dom, linkElm; 33 | 34 | if (!cssId) { 35 | cssId = dom.uniqueId(); 36 | linkElm = dom.create('link', { 37 | id: cssId, 38 | rel: 'stylesheet', 39 | href: url + '/css/visualblocks.css' 40 | }); 41 | 42 | editor.getDoc().getElementsByTagName('head')[0].appendChild(linkElm); 43 | } 44 | 45 | // Toggle on/off visual blocks while computing previews 46 | editor.on("PreviewFormats AfterPreviewFormats", function(e) { 47 | if (enabled) { 48 | dom.toggleClass(editor.getBody(), 'mce-visualblocks', e.type == "afterpreviewformats"); 49 | } 50 | }); 51 | 52 | dom.toggleClass(editor.getBody(), 'mce-visualblocks'); 53 | enabled = editor.dom.hasClass(editor.getBody(), 'mce-visualblocks'); 54 | 55 | if (visualBlocksMenuItem) { 56 | visualBlocksMenuItem.active(dom.hasClass(editor.getBody(), 'mce-visualblocks')); 57 | } 58 | 59 | editor.fire('VisualBlocks'); 60 | }); 61 | 62 | editor.addButton('visualblocks', { 63 | title: 'Show blocks', 64 | cmd: 'mceVisualBlocks', 65 | onPostRender: toggleActiveState 66 | }); 67 | 68 | editor.addMenuItem('visualblocks', { 69 | text: 'Show blocks', 70 | cmd: 'mceVisualBlocks', 71 | onPostRender: toggleActiveState, 72 | selectable: true, 73 | context: 'view', 74 | prependToContext: true 75 | }); 76 | 77 | editor.on('init', function() { 78 | if (editor.settings.visualblocks_default_state) { 79 | editor.execCommand('mceVisualBlocks', false, null, {skip_focus: true}); 80 | } 81 | }); 82 | 83 | editor.on('remove', function() { 84 | editor.dom.removeClass(editor.getBody(), 'mce-visualblocks'); 85 | }); 86 | }); 87 | -------------------------------------------------------------------------------- /query/Query.php: -------------------------------------------------------------------------------- 1 | $response_status, 60 | 'status_message' => $status_message, 61 | 'output' => $output, 62 | ); 63 | curl_close($ch); 64 | return $response; 65 | } 66 | } 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /assets/mirador/locales/ko/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "addItem": "아이템 더하기", 3 | "addNewObject": "URL로 오브젝트 추가", 4 | "addSlotAbove": "슬롯 추가 - 위", 5 | "addSlotBelow": "슬롯 추가 - 아래", 6 | "addSlotLeft": "슬롯 추가 - 왼쪽", 7 | "addSlotRight": "슬롯 추가 - 오른쪽", 8 | "addTagsHere": "태그 더하기", 9 | "bookmark": "북마크", 10 | "bookmarkTitle": "작업공간 공유/북마크", 11 | "bookmarkTooltip": "북마크 하기", 12 | "bookView": "책으로 보기", 13 | "borderColorTooltip": "경계 색 선택", 14 | "borderTypeTooltip": "경계 스타일", 15 | "brightnessTooltip": "명도 변환", 16 | "cancel": "취소", 17 | "cancelAnnotation": "이 주석을 취소하시겠습니까?", 18 | "changeLayout": "레이아웃 변경", 19 | "changeLayoutTooltip": "슬롯 개수 변경", 20 | "close": "닫기", 21 | "closeTooltip": "창 닫기", 22 | "comments": "코멘트", 23 | "contrastTooltip": "대비 조절", 24 | "dashed":"점선", 25 | "delete": "지우기", 26 | "deleteAnnotation": "이 주석과 그에 관련된 도형들을 삭제하시겠습니까?", 27 | "deleteShape":"이 도형을 삭제하시겠습니까?", 28 | "details": "세부 정보", 29 | "dotDashed":"Dots & Dashes", 30 | "dropToLoad": "매니페스트를 여기 놓으세요.", 31 | "edit": "편집", 32 | "editModalBtnDeleteAnnotation":"주석 삭제", 33 | "editModalBtnSaveWithoutShapes":"도형 없이 주석 저장하기", 34 | "editModalSaveAnnotationWithNoShapesMsg":"이 주석과 관련된 도형이 없습니다.", 35 | "ellipseTooltip": "타원형", 36 | "fillColorTooltip": "면색", 37 | "filterObjects": "오브젝트 필터", 38 | "freehandTooltip": "Freeform annotation", 39 | "fullScreen": "전체화면", 40 | "fullScreenTooltip": "전체화면 전환", 41 | "fullScreenWindowTooltip": "이 창을 전체화면으로", 42 | "grayscaleTooltip": "그레이스케일 전환", 43 | "imageView": "이미지로 보기", 44 | "invertTooltip": "색상 반전", 45 | "item": "아이템", 46 | "items": "아이템", 47 | "links": "고리", 48 | "load": "불러오기", 49 | "logo": "로고", 50 | "metadataTooltip": "View information/metadata about this object", 51 | "more": "더 보기", 52 | "newObject": "새 오브젝트", 53 | "no": "아니요", 54 | "objectMetadata": "오브젝트 메타데이터", 55 | "pinTooltip": "핀", 56 | "polygonTooltip": "다각형", 57 | "rectangleTooltip": "직사각형", 58 | "resetTooltip": "이미지 리셋", 59 | "rights": "저작권 정보", 60 | "rightsStatus": "저작권 상황", 61 | "rotateLeftTooltip": "90도 좌회전", 62 | "rotateRightTooltip": "90도 우회전", 63 | "saturationTooltip": "채도 변환", 64 | "save": "저장", 65 | "scrollView": "스크롤로 보기", 66 | "selectGrid": "격자 선택하기", 67 | "sidePanelTooltip": "사이드 패널 전환", 68 | "solid":"Solid", 69 | "thumbnailsView": "썸네일로 보기", 70 | "unspecified": "불특정", 71 | "url": "URL", 72 | "viewTypeTooltip": "뷰 타입 전환", 73 | "yes": "네" 74 | } 75 | -------------------------------------------------------------------------------- /assets/mirador/locales/ja/translation.json: -------------------------------------------------------------------------------- 1 | { 2 | "addItem": "アイテム追加", 3 | "addNewObject": "URLで新規オブジェクト追加", 4 | "addSlotAbove": "上にスロット追加", 5 | "addSlotBelow": "下にスロット追加", 6 | "addSlotLeft": "左にスロット追加", 7 | "addSlotRight": "右にスロット追加", 8 | "addTagsHere": "ここでタグを追加", 9 | "bookmark": "ブックマーク", 10 | "bookmarkTitle": "現在の表示内容をブックマーク", 11 | "bookmarkTooltip": "このインスタンスをブックマーク", 12 | "bookView": "Book表示モード", 13 | "borderColorTooltip": "線の色を選択", 14 | "borderTypeTooltip": "線のスタイルを選択", 15 | "brightnessTooltip": "明度調整", 16 | "cancel": "キャンセル", 17 | "cancelAnnotation": "この注釈を取消したいですか?", 18 | "changeLayout": "レイアウト変更", 19 | "changeLayoutTooltip": "スロット数の変更", 20 | "close": "閉じる", 21 | "closeTooltip": "このウインドウを閉じる", 22 | "comments": "コメント", 23 | "contrastTooltip": "コントラスト調整", 24 | "dashed":"破線", 25 | "delete": "削除", 26 | "deleteAnnotation": "この注釈と関連するすべての図形を削除したいですか?", 27 | "deleteShape":"この図形を削除したいですか?", 28 | "details": "詳細", 29 | "dotDashed":"一点鎖線", 30 | "dropToLoad": "ドロップしてマニフェストを読み込み", 31 | "edit": "編集", 32 | "editModalBtnDeleteAnnotation":"この注釈を削除", 33 | "editModalBtnSaveWithoutShapes":"図形なしで注釈を保存", 34 | "editModalSaveAnnotationWithNoShapesMsg":"この注釈に関連する図形はありません。", 35 | "ellipseTooltip": "楕円形で注釈", 36 | "fillColorTooltip": "塗り潰し色を選択", 37 | "filterObjects": "フィルタをかける対象", 38 | "freehandTooltip": "フリーハンドで注釈", 39 | "fullScreen": "全画面表示", 40 | "fullScreenTooltip": "フルスクリーン表示", 41 | "fullScreenWindowTooltip": "このウインドウをフルスクリーン表示", 42 | "grayscaleTooltip": "グレースケールに切替え", 43 | "imageView": "画像表示モード", 44 | "invertTooltip": "色反転", 45 | "item": "アイテム", 46 | "items": "アイテム", 47 | "links": "リンク", 48 | "load": "読み込み", 49 | "logo": "ロゴ", 50 | "metadataTooltip": "この資料の情報を表示", 51 | "more": "もっと", 52 | "newObject": "新しいオブジェクト", 53 | "no": "いいえ", 54 | "objectMetadata": "オブジェクトのメタデータ", 55 | "pinTooltip": "ピンポイントで注釈", 56 | "polygonTooltip": "多角形で注釈", 57 | "rectangleTooltip": "矩形で注釈", 58 | "resetTooltip": "設定をリセット", 59 | "rights": "権利関係", 60 | "rightsStatus": "権利状態", 61 | "rotateLeftTooltip": "90度左回転", 62 | "rotateRightTooltip": "90度右回転", 63 | "saturationTooltip": "再度調整", 64 | "save": "保存", 65 | "scrollView": "スクロール表示モード", 66 | "selectGrid": "以下のグリッドから選択", 67 | "sidePanelTooltip": "サイドパネルを表示", 68 | "solid":"実線", 69 | "thumbnailsView": "ギャラリー表示モード", 70 | "unspecified": "未特定の", 71 | "url": "URL", 72 | "viewTypeTooltip": "表示モードを切替え", 73 | "yes": "はい" 74 | } 75 | -------------------------------------------------------------------------------- /util/wrappers.php: -------------------------------------------------------------------------------- 1 | b.start.length?-1:a.start.length'); 15 | 16 | var pageBreakSeparatorRegExp = new RegExp(separatorHtml.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) { 17 | return '\\' + a; 18 | }), 'gi'); 19 | 20 | var pageBreakPlaceHolderHtml = ''; 22 | 23 | // Register commands 24 | editor.addCommand('mcePageBreak', function() { 25 | if (editor.settings.pagebreak_split_block) { 26 | editor.insertContent('

    ' + 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;dh&&e[d]==g&&(h=d);if(0>c){for(d=0;d-1?(e[h].style.zIndex=f[i],e[i].style.zIndex=f[h]):f[h]>0&&(e[h].style.zIndex=f[h]-1)}else{for(d=0;df[h]){i=d;break}i>-1?(e[h].style.zIndex=f[i],e[i].style.zIndex=f[h]):e[h].style.zIndex=f[h]+1}a.execCommand("mceRepaint")}function e(){var b=a.dom,c=b.getPos(b.getParent(a.selection.getNode(),"*")),d=a.getBody();a.dom.add(d,"div",{style:{position:"absolute",left:c.x,top:c.y>20?c.y:20,width:100,height:100},"class":"mceItemVisualAid mceItemLayer"},a.selection.getContent()||a.getLang("layer.content")),tinymce.Env.ie&&b.setHTML(d,d.innerHTML)}function f(){var c=b(a.selection.getNode());c||(c=a.dom.getParent(a.selection.getNode(),"DIV,P,IMG")),c&&("absolute"==c.style.position.toLowerCase()?(a.dom.setStyles(c,{position:"",left:"",top:"",width:"",height:""}),a.dom.removeClass(c,"mceItemVisualAid"),a.dom.removeClass(c,"mceItemLayer")):(c.style.left||(c.style.left="20px"),c.style.top||(c.style.top="20px"),c.style.width||(c.style.width=c.width?c.width+"px":"100px"),c.style.height||(c.style.height=c.height?c.height+"px":"100px"),c.style.position="absolute",a.dom.setAttrib(c,"data-mce-style",""),a.addVisual(a.getBody())),a.execCommand("mceRepaint"),a.nodeChanged())}a.addCommand("mceInsertLayer",e),a.addCommand("mceMoveForward",function(){d(1)}),a.addCommand("mceMoveBackward",function(){d(-1)}),a.addCommand("mceMakeAbsolute",function(){f()}),a.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"}),a.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"}),a.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"}),a.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"}),a.on("init",function(){tinymce.Env.ie&&a.getDoc().execCommand("2D-Position",!1,!0)}),a.on("mouseup",function(c){var d=b(c.target);d&&a.dom.setAttrib(d,"data-mce-style","")}),a.on("mousedown",function(c){var d,e=c.target,f=a.getDoc();tinymce.Env.gecko&&(b(e)?"on"!==f.designMode&&(f.designMode="on",e=f.body,d=e.parentNode,d.removeChild(e),d.appendChild(e)):"on"==f.designMode&&(f.designMode="off"))}),a.on("NodeChange",c)}); -------------------------------------------------------------------------------- /admin-ui/callbacks/Browse.php: -------------------------------------------------------------------------------- 1 | '; 15 | } 16 | 17 | static function browseMetadata() { 18 | $browse_meta_options = array('Title', 'Creator', 'Abstract/Description', 'Date Created'); 19 | $options = get_option('drstk_browse_metadata'); 20 | foreach ($browse_meta_options as $option) { 21 | echo '
    '; 26 | } 27 | } 28 | 29 | static function defaultBrowsePerPage() { 30 | $per_page_options = array("10" => "10", "20" => "20", "50" => "50"); 31 | $default_per_page = get_option('drstk_default_browse_per_page'); 32 | echo '
    '; 41 | } 42 | 43 | static function browseShowFacets() { 44 | echo 'Yes'; 49 | } 50 | 51 | static function defaultSortCallback() { 52 | 53 | } 54 | } 55 | 56 | function drstk_browse_show_facets_callback() { 57 | $sort_options = array("title_ssi%20asc" => "Title A-Z", "title_ssi%20desc" => "Title Z-A", "score+desc%2C+system_create_dtsi+desc" => "Relevance", "creator_ssi%20asc" => "Creator A-Z", "creator_ssi%20desc" => "Creator Z-A", "system_modified_dtsi%20asc" => "Date (earliest to latest)", "system_modified_dtsi%20desc" => "Date (latest to earliest)"); 58 | $default_sort = get_option('drstk_default_sort'); 59 | echo '
    '; 68 | } 69 | 70 | -------------------------------------------------------------------------------- /admin-ui/callbacks/Search.php: -------------------------------------------------------------------------------- 1 | '; 15 | } 16 | 17 | // @todo this should probably be handled just with HTML, unless WP gripes 18 | static function searchPlaceholder(): void { 19 | echo ''; 26 | } 27 | 28 | static function searchMetadata() { 29 | $search_meta_options = array('Title', 'Creator', 'Abstract/Description', 'Date Created'); 30 | $options = get_option('drstk_search_metadata'); 31 | foreach ($search_meta_options as $option) { 32 | echo '
    '; 37 | } 38 | } 39 | 40 | static function searchRelatedTitle(): void { 41 | echo ''; 48 | 49 | } 50 | 51 | static function defaultSearchPerPage(): void { 52 | $per_page_options = array("10" => "10", "20" => "20", "50" => "50"); 53 | $default_per_page = get_option('drstk_default_search_per_page'); 54 | echo '
    '; 63 | } 64 | 65 | static function searchShowFacets(): void { 66 | echo 'Yes'; 71 | } 72 | 73 | } 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /templates/item.php: -------------------------------------------------------------------------------- 1 | 8 |
    9 |
    10 |
    11 |
    12 |
    13 |

    14 |
    15 |
    16 | 19 |
    20 |
    21 |
    22 |
    23 | 24 |
    25 |
    26 |
    27 | 30 | 31 |
    32 |
    33 |
    34 |
    35 |
    36 | 37 |
    38 | 39 |
    40 | 41 | 42 | 43 | 44 | 45 |
    46 | 47 |
    48 | 49 | 50 | 51 | 52 |
    53 |
    54 |
    55 | 56 |
    57 | 58 |
    59 | 60 |
    61 | 62 | 63 |
    64 | 65 |
    66 | 67 |
    68 | 69 |
    70 | 71 |
    72 | 73 |
    74 | 75 |
    76 | 77 | 78 | -------------------------------------------------------------------------------- /assets/mirador/plugins/advlist/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('advlist', function(editor) { 14 | var olMenuItems, ulMenuItems, lastStyles = {}; 15 | 16 | function buildMenuItems(listName, styleValues) { 17 | var items = []; 18 | 19 | tinymce.each(styleValues.split(/[ ,]/), function(styleValue) { 20 | items.push({ 21 | text: styleValue.replace(/\-/g, ' ').replace(/\b\w/g, function(chr) { 22 | return chr.toUpperCase(); 23 | }), 24 | data: styleValue == 'default' ? '' : styleValue 25 | }); 26 | }); 27 | 28 | return items; 29 | } 30 | 31 | olMenuItems = buildMenuItems('OL', editor.getParam( 32 | "advlist_number_styles", 33 | "default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman" 34 | )); 35 | 36 | ulMenuItems = buildMenuItems('UL', editor.getParam("advlist_bullet_styles", "default,circle,disc,square")); 37 | 38 | function applyListFormat(listName, styleValue) { 39 | editor.undoManager.transact(function() { 40 | var list, dom = editor.dom, sel = editor.selection; 41 | 42 | // Check for existing list element 43 | list = dom.getParent(sel.getNode(), 'ol,ul'); 44 | 45 | // Switch/add list type if needed 46 | if (!list || list.nodeName != listName || styleValue === false) { 47 | editor.execCommand(listName == 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList'); 48 | } 49 | 50 | // Set style 51 | styleValue = styleValue === false ? lastStyles[listName] : styleValue; 52 | lastStyles[listName] = styleValue; 53 | 54 | list = dom.getParent(sel.getNode(), 'ol,ul'); 55 | if (list) { 56 | dom.setStyle(list, 'listStyleType', styleValue ? styleValue : null); 57 | list.removeAttribute('data-mce-style'); 58 | } 59 | 60 | editor.focus(); 61 | }); 62 | } 63 | 64 | function updateSelection(e) { 65 | var listStyleType = editor.dom.getStyle(editor.dom.getParent(editor.selection.getNode(), 'ol,ul'), 'listStyleType') || ''; 66 | 67 | e.control.items().each(function(ctrl) { 68 | ctrl.active(ctrl.settings.data === listStyleType); 69 | }); 70 | } 71 | 72 | editor.addButton('numlist', { 73 | type: 'splitbutton', 74 | tooltip: 'Numbered list', 75 | menu: olMenuItems, 76 | onshow: updateSelection, 77 | onselect: function(e) { 78 | applyListFormat('OL', e.control.settings.data); 79 | }, 80 | onclick: function() { 81 | applyListFormat('OL', false); 82 | } 83 | }); 84 | 85 | editor.addButton('bullist', { 86 | type: 'splitbutton', 87 | tooltip: 'Bullet list', 88 | menu: ulMenuItems, 89 | onshow: updateSelection, 90 | onselect: function(e) { 91 | applyListFormat('UL', e.control.settings.data); 92 | }, 93 | onclick: function() { 94 | applyListFormat('UL', false); 95 | } 96 | }); 97 | }); -------------------------------------------------------------------------------- /assets/js/tiles.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function($) { 2 | $(".freewall").each(function(){ 3 | var type = $(this).data("type"); 4 | var cell_height = $(this).data("cell-height"); 5 | var cell_width = $(this).data("cell-width"); 6 | var text_align = $(this).data("text-align"); 7 | if (type == 'pinterest-below' || type == 'pinterest' || type == 'pinterest-hover'){ 8 | var wall = new freewall(this); 9 | if (cell_width == "100%"){ 10 | $(this).find(".brick").css("width", cell_width); 11 | } 12 | wall.reset({ 13 | selector: ".brick", 14 | animate: true, 15 | cellW: cell_width, 16 | cellH: "auto", 17 | onResize: function() { 18 | wall.fitWidth(); 19 | } 20 | }); 21 | $(window).on("load", function() {//this wont fire until all the images are loaded 22 | wall.fitWidth(); 23 | }); 24 | $(this).find(".brick").css("text-align", text_align); 25 | } 26 | if (type == 'even-row'){ 27 | var w = 1, html = '', i = 0; 28 | $(this).find(".cell").each( function(){ 29 | var temp = "
    "+$(this).children(".info").html()+"
    "; 30 | w = cell_width + cell_height * Math.random() << 0; 31 | html += temp.replace(/\{height\}/g, cell_height).replace(/\{width\}/g, w); 32 | i++; 33 | }); 34 | $(this).html(html); 35 | 36 | var wall = new freewall(this); 37 | wall.reset({ 38 | selector: '.cell', 39 | animate: true, 40 | cellW: 20, 41 | cellH: cell_height, 42 | onResize: function() { 43 | wall.fitWidth(); 44 | } 45 | }); 46 | wall.fitWidth(); 47 | // for scroll bar appear; 48 | $(window).trigger("resize"); 49 | $(this).find(".cell").css("text-align", text_align); 50 | } 51 | if (type == 'square'){ 52 | var w = cell_width, h = cell_height, html = '', i = 0; 53 | $(this).find(".cell").each( function(){ 54 | var temp = "
    "+$(this).children(".info").html()+"
    "; 55 | html += temp.replace(/\{height\}/g, h).replace(/\{width\}/g, w); 56 | i++; 57 | }); 58 | $(this).html(html); 59 | 60 | var wall = new freewall(this); 61 | wall.reset({ 62 | selector: '.cell', 63 | animate: true, 64 | cellW: cell_width, 65 | cellH: cell_height, 66 | onResize: function() { 67 | wall.refresh(); 68 | } 69 | }); 70 | wall.fitWidth(); 71 | // for scroll bar appear; 72 | $(window).trigger("resize"); 73 | $(this).find(".cell").css("text-align", text_align); 74 | } 75 | }); 76 | $(".hidden").each(function(){ 77 | $(this).appendTo("body"); 78 | }); 79 | });//end doc ready 80 | -------------------------------------------------------------------------------- /assets/mirador/plugins/preview/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('preview', function(editor) { 14 | var settings = editor.settings, sandbox = !tinymce.Env.ie; 15 | 16 | editor.addCommand('mcePreview', function() { 17 | editor.windowManager.open({ 18 | title: 'Preview', 19 | width : parseInt(editor.getParam("plugin_preview_width", "650"), 10), 20 | height : parseInt(editor.getParam("plugin_preview_height", "500"), 10), 21 | html: '', 22 | buttons: { 23 | text: 'Close', 24 | onclick: function() { 25 | this.parent().parent().close(); 26 | } 27 | }, 28 | onPostRender: function() { 29 | var previewHtml, headHtml = ''; 30 | 31 | headHtml += ''; 32 | 33 | tinymce.each(editor.contentCSS, function(url) { 34 | headHtml += ''; 35 | }); 36 | 37 | var bodyId = settings.body_id || 'tinymce'; 38 | if (bodyId.indexOf('=') != -1) { 39 | bodyId = editor.getParam('body_id', '', 'hash'); 40 | bodyId = bodyId[editor.id] || bodyId; 41 | } 42 | 43 | var bodyClass = settings.body_class || ''; 44 | if (bodyClass.indexOf('=') != -1) { 45 | bodyClass = editor.getParam('body_class', '', 'hash'); 46 | bodyClass = bodyClass[editor.id] || ''; 47 | } 48 | 49 | var dirAttr = editor.settings.directionality ? ' dir="' + editor.settings.directionality + '"' : ''; 50 | 51 | previewHtml = ( 52 | '' + 53 | '' + 54 | '' + 55 | headHtml + 56 | '' + 57 | '' + 58 | editor.getContent() + 59 | '' + 60 | '' 61 | ); 62 | 63 | if (!sandbox) { 64 | // IE 6-11 doesn't support data uris on iframes 65 | // so I guess they will have to be less secure since we can't sandbox on those 66 | // TODO: Use sandbox if future versions of IE supports iframes with data: uris. 67 | var doc = this.getEl('body').firstChild.contentWindow.document; 68 | doc.open(); 69 | doc.write(previewHtml); 70 | doc.close(); 71 | } else { 72 | this.getEl('body').firstChild.src = 'data:text/html;charset=utf-8,' + encodeURIComponent(previewHtml); 73 | } 74 | } 75 | }); 76 | }); 77 | 78 | editor.addButton('preview', { 79 | title : 'Preview', 80 | cmd : 'mcePreview' 81 | }); 82 | 83 | editor.addMenuItem('preview', { 84 | text : 'Preview', 85 | cmd : 'mcePreview', 86 | context: 'view' 87 | }); 88 | }); 89 | -------------------------------------------------------------------------------- /assets/mirador/plugins/colorpicker/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('colorpicker', function(editor) { 14 | function colorPickerCallback(callback, value) { 15 | function setColor(value) { 16 | var color = new tinymce.util.Color(value), rgb = color.toRgb(); 17 | 18 | win.fromJSON({ 19 | r: rgb.r, 20 | g: rgb.g, 21 | b: rgb.b, 22 | hex: color.toHex().substr(1) 23 | }); 24 | 25 | showPreview(color.toHex()); 26 | } 27 | 28 | function showPreview(hexColor) { 29 | win.find('#preview')[0].getEl().style.background = hexColor; 30 | } 31 | 32 | var win = editor.windowManager.open({ 33 | title: 'Color', 34 | items: { 35 | type: 'container', 36 | layout: 'flex', 37 | direction: 'row', 38 | align: 'stretch', 39 | padding: 5, 40 | spacing: 10, 41 | items: [ 42 | { 43 | type: 'colorpicker', 44 | value: value, 45 | onchange: function() { 46 | var rgb = this.rgb(); 47 | 48 | if (win) { 49 | win.find('#r').value(rgb.r); 50 | win.find('#g').value(rgb.g); 51 | win.find('#b').value(rgb.b); 52 | win.find('#hex').value(this.value().substr(1)); 53 | showPreview(this.value()); 54 | } 55 | } 56 | }, 57 | { 58 | type: 'form', 59 | padding: 0, 60 | labelGap: 5, 61 | defaults: { 62 | type: 'textbox', 63 | size: 7, 64 | value: '0', 65 | flex: 1, 66 | spellcheck: false, 67 | onchange: function() { 68 | var colorPickerCtrl = win.find('colorpicker')[0]; 69 | var name, value; 70 | 71 | name = this.name(); 72 | value = this.value(); 73 | 74 | if (name == "hex") { 75 | value = '#' + value; 76 | setColor(value); 77 | colorPickerCtrl.value(value); 78 | return; 79 | } 80 | 81 | value = { 82 | r: win.find('#r').value(), 83 | g: win.find('#g').value(), 84 | b: win.find('#b').value() 85 | }; 86 | 87 | colorPickerCtrl.value(value); 88 | setColor(value); 89 | } 90 | }, 91 | items: [ 92 | {name: 'r', label: 'R', autofocus: 1}, 93 | {name: 'g', label: 'G'}, 94 | {name: 'b', label: 'B'}, 95 | {name: 'hex', label: '#', value: '000000'}, 96 | {name: 'preview', type: 'container', border: 1} 97 | ] 98 | } 99 | ] 100 | }, 101 | onSubmit: function() { 102 | callback('#' + this.toJSON().hex); 103 | } 104 | }); 105 | 106 | setColor(value); 107 | } 108 | 109 | if (!editor.settings.color_picker_callback) { 110 | editor.settings.color_picker_callback = colorPickerCallback; 111 | } 112 | }); -------------------------------------------------------------------------------- /assets/mirador/plugins/bbcode/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a){var b=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.on("beforeSetContent",function(a){a.content=b["_"+c+"_bbcode2html"](a.content)}),a.on("postProcess",function(a){a.set&&(a.content=b["_"+c+"_bbcode2html"](a.content)),a.get&&(a.content=b["_"+c+"_html2bbcode"](a.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"),b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"),b(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"),b(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"),b(/(.*?)<\/font>/gi,"$1"),b(//gi,"[img]$1[/img]"),b(/(.*?)<\/span>/gi,"[code]$1[/code]"),b(/(.*?)<\/span>/gi,"[quote]$1[/quote]"),b(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),b(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),b(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),b(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),b(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),b(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),b(/<\/(strong|b)>/gi,"[/b]"),b(/<(strong|b)>/gi,"[b]"),b(/<\/(em|i)>/gi,"[/i]"),b(/<(em|i)>/gi,"[i]"),b(/<\/u>/gi,"[/u]"),b(/(.*?)<\/span>/gi,"[u]$1[/u]"),b(//gi,"[u]"),b(/]*>/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+="",h=0;i>h;h++)l=k*i+h,l>g?f+="":(e=d[l],f+=b(e.color,e.text));f+=""}if(a.settings.color_picker_callback){for(f+='",f+="",h=0;i>h;h++)f+=b("","Custom color");f+=""}return 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;ee;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 |
    38 |

    ie. neu:123 or dpla:890342

    39 | 40 |

    41 |
    42 | 49 |
    50 |

    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 |
    53 | ID, "drstk-custom-content-placement", true); 59 | 60 | wp_nonce_field(basename(__FILE__), "meta-box-nonce"); 61 | $html = "
    "; 62 | $html .= "

    Select the placement for this custom content

    "; 63 | $html .= ""; 83 | $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 | --------------------------------------------------------------------------------