Example #1
0
    public static function create($name, $initContents)
    {
        $p = self::$plugin;
        queue_css($p->pluginPublicDir() . 'elrte/css/smoothness/jquery-ui-1.8.13.custom.css');
        queue_css($p->pluginPublicDir() . 'elrte/css/elrte.min.css');
        queue_css($p->pluginPublicDir() . 'elfinder/css/elfinder.min.css');
        queue_css($p->pluginPublicDir() . 'elfinder/css/theme.css');
        queue_js($p->pluginPublicDir() . 'elrte/js/jquery-ui-1.8.13.custom.min.js');
        queue_js($p->pluginPublicDir() . 'elrte/js/elrte.full.js');
        queue_js($p->pluginPublicDir() . 'elfinder/js/elfinder.full.js');
        queue_js($p->pluginPublicDir() . 'elrte/js/i18n/elrte.en.js');
        return sprintf(<<<EOT
<script type="text/javascript" charset="utf-8">
\t\$(function() {
\t\tvar opts = {
\t\t\tlang         : 'en',   // set your language
\t\t\tstyleWithCSS : false,
\t\t\theight       : 400,
\t\t\ttoolbar      : 'maxi',
\t\t\tcssfiles     : ['%s'],
\t\t\tfmOpen : function(callback) {
\t\t\t\t\$('<div />').dialogelfinder({
\t\t\t\t\turl : '%selfinder/php/connector.php',
\t\t\t\t\tlang : 'en',
\t\t\t\t\tcommandsOptions : {
\t\t\t\t\t\tgetfile : {
\t\t\t\t\t\t\tonlyURL  : true, // disable to return detail info
\t\t\t\t\t\t\tmultiple : false, // disable to return multiple files info
\t\t\t\t\t\t\tfolders  : false, // disable to return folders info
\t\t\t\t\t\t\toncomplete : 'destroy' // action after callback (""/"close"/"destroy")
\t\t\t\t\t\t}
\t\t\t\t\t},
\t\t\t\t\tgetFileCallback : function (obj) {
\t\t\t\t\t\tcallback(obj.baseUrl + obj.path.substr(obj.path.replace('\\\\', '/').indexOf('/')+1));
\t\t\t\t\t}
\t\t\t\t})
\t\t\t}
\t\t};
\t\t// create editor
\t\t\$('#%s').elrte(opts);

\t\t// or this way
\t\t// var editor = new elRTE(document.getElementById('our-element'), opts);
\t});
</script>
<textarea id="%s">%s</textarea>
EOT
, Themes::getCurrentTheme()->getPublicPath() . "editor.css", $p->pluginPublicDir(), $name, $name, $initContents);
    }
Example #2
0
<!doctype html>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
		<title><?php 
echo Admin::pageTitle();
?>
 &lsaquo; <?php 
_e('admin', 'TopHat Admin');
?>
</title>

		<?php 
load_library(array('bootstrap-css', 'jquery', 'bootstrap-js'));
queue_css(TH_PUB_ADMIN . 'design/styles.css');
queue_js(TH_PUB_ADMIN . 'design/admin.js');
load_css();
load_js();
?>
	</head>

	<body class="<?php 
echo Admin::bodyClasses();
?>
">
		<div id="topnavbar" class="navbar navbar-fixed-top">
			<div class="navbar-inner">
				<div class="container">
					<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
 * Browser servers.
 *
 * @package     omeka
 * @subpackage  neatline
 * @author      Scholars' Lab <>
 * @author      David McClure <*****@*****.**>
 * @copyright   2012 The Board and Visitors of the University of Virginia
 * @license     http://www.apache.org/licenses/LICENSE-2.0.html Apache 2 License
 */
?>

<?php 
queue_css('neatline-maps-admin');
$title = __('Neatline Maps | Browse Servers');
head(array('content_class' => 'neatline', 'title' => $title));
?>

<?php 
echo $this->partial('servers/_header.php', array('title' => $title, 'add_button_uri' => 'neatline-maps/add', 'add_button_text' => __('Create a Server')));
?>

<div id="primary">

<?php 
echo flash();
?>

<?php 
 /**
  * Include Openlayers in admin views.
  *
  * @param array $request The request.
  *
  * @return void.
  */
 public function adminThemeHeader($request)
 {
     // Listen for items show.
     if ($request->getModuleName() == 'default' && $request->getActionName() == 'show') {
         queue_css('openlayers/style');
         queue_js('openlayers/OpenLayers');
     }
 }