1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-08 14:16:54 +02:00
This commit is contained in:
metal_gvc
2014-02-08 13:27:19 +02:00
26 changed files with 1814 additions and 3095 deletions

View File

@@ -1,10 +1,11 @@
Monstra 2.4.0, 2014-xx-xx
------------------------
- Mobile Ready! Monstra fully responsive for mobile devices, tablets, and normal computer screens.
- Update Twitter Bootstrap to 3.0.3
- Update Twitter Bootstrap to 3.1.0
- Admin: New Modern User Interface
- Site: New default theme
- W3 layout fixes
- Idiorm Updated to 1.4.1
- Filesmanager plugin: added ability to create & rename directories.
- Responsive Chocolat Lightbox instead of TB Lightbox
- Blog Plugin as a part of Monstra CMS

View File

@@ -82,6 +82,9 @@ if (Request::post('login_submit')) {
}
}
}
Notification::set('error', $login_error);
}
// Errors
@@ -117,13 +120,13 @@ if (Request::post('reset_password_submit')) {
$mail->AddReplyTo(Option::get('system_email'));
$mail->AddAddress($user['email'], $user['login']);
$mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name));
$mail->MsgHTML(View::factory('box/users/views/emails/layout_email')
$mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')
->assign('site_url', $site_url)
->assign('site_name', $site_name)
->assign('user_id', $user['id'])
->assign('user_login', $user['login'])
->assign('new_hash', $new_hash)
->assign('view', 'reset_password_email')
->assign('email_template', 'reset-password')
->render());
$mail->Send();

View File

@@ -49,14 +49,20 @@ a.btn-expand {
padding-right:4px;
}
.login-footer,
.login-footer a {
color:#777;
font-size:12px;
}
footer {
margin-top: 40px;
}
footer,
footer a {
color:#333;
font-size:10px;
color:#777;
font-size:12px;
}
footer span {
@@ -92,6 +98,20 @@ footer span {
padding-left: 0;
}
/* Admin Form */
.form-signin {
width: 400px;
}
.form-signin {
margin-top: 40px;
}
.form-signin .administration-area,
.form-signin .reset-password-area {
margin-top: 40px;
}
/* Dropdown Menu */
.dropdown-menu .divider {
background-color: #555454;
@@ -108,6 +128,10 @@ footer span {
}
/* Navbar */
.navbar-inverse .navbar-nav > li > a {
color: #eee;
}
.navbar-inverse {
background: #222;
}
@@ -182,10 +206,15 @@ a.navbar-brand {
.badge,
.label,
.input-group-addon,
.alert,
.tooltip,
.tooltip-inner,
code {
border-radius: 0px;
}
.badge,
.tooltip,
.tooltip-inner,
.label {
font-weight: normal;
text-shadow: none;

View File

@@ -59,13 +59,18 @@
</head>
<body class="login-body">
<?php
// Monstra Notifications
Notification::get('success') AND Alert::success(Notification::get('success'));
Notification::get('warning') AND Alert::warning(Notification::get('warning'));
Notification::get('error') AND Alert::error(Notification::get('error'));
?>
<div class="container form-signin">
<div style="text-align:center;"><a class="brand" href="<?php echo Option::get('siteurl'); ?>/admin"><img src="<?php echo Option::get('siteurl'); ?>/public/assets/img/monstra-logo.png" height="27" width="171" alt="monstra" /></a></div>
<div class="administration-area">
<hr>
<div class="text-center"><a class="brand" href="<?php echo Option::get('siteurl'); ?>/admin"><img src="<?php echo Option::get('siteurl'); ?>/public/assets/img/monstra-logo-256px.png" alt="monstra" /></a></div>
<div class="administration-area well">
<div>
<h2 class="text-center"><?php echo __('Administration', 'system'); ?></h2><br>
<form method="post">
<div class="form-group">
<label><?php echo __('Username', 'users'); ?></label>
@@ -76,18 +81,14 @@
<input class="form-control" name="password" type="password" />
</div>
<div class="form-group">
<?php if (isset($login_error) && $login_error !== '') { ?><div class="alert alert-error"><?php echo $login_error; ?></div><?php } ?>
<input type="submit" name="login_submit" class="btn btn-primary" value="<?php echo __('Log In', 'users'); ?>" />
</div>
</form>
</div>
</div>
<div class="reset-password-area">
<hr>
<div class="reset-password-area well">
<div>
<h2 style="text-align:center;"><?php echo __('Reset Password', 'users'); ?></h2><br>
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
<form method="post">
<div class="form-group">
<label><?php echo __('Username', 'users'); ?></label>
@@ -110,24 +111,28 @@
}
?>
<div class="form-group">
<input type="submit" name="reset_password_submit" class="btn btn-primary" value="<?php echo __('Send New Password', 'users')?>" />
<input type="submit" name="reset_password_submit" class="btn btn-primary" value="<?php echo __('Get New Password', 'users')?>" />
</div>
</form>
</div>
</div>
<hr>
<div>
</div>
<div class="login-footer">
<div class="text-center">
<a class="small-grey-text" href="<?php echo Option::get('siteurl'); ?>"><?php echo __('< Back to Website', 'system');?></a> -
<a class="small-grey-text reset-password-btn" href="javascript:;"><?php echo __('Forgot your password? >', 'system');?></a>
<a class="small-grey-text administration-btn" href="javascript:;"><?php echo __('Administration >', 'system');?></a>
</div>
</div>
<a href="<?php echo Option::get('siteurl'); ?>"><?php echo __('Back to Website', 'system');?></a> -
<a class="reset-password-btn" href="javascript:;"><?php echo __('Forgot your password ?', 'system');?></a>
<a class="administration-btn" href="javascript:;"><?php echo __('Log in', 'system');?></a>
</div>
<div class="text-center">
<span class="small-grey-text">© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
<span>© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
</div>
</div>
</body>
</html>

View File

@@ -39,12 +39,17 @@
// Select Monstra language
if (Request::get('language')) {
if (Request::get('action') && Request::get('action') == 'install') {
$action = '?action=install';
} else {
$action = '';
}
if (in_array(Request::get('language'), $languages_array)) {
if (Option::update('language', Request::get('language'))) {
Request::redirect($site_url);
Request::redirect($site_url.$action);
}
} else {
Request::redirect($site_url);
Request::redirect($site_url.$action);
}
}
@@ -105,6 +110,8 @@
// Installation done :)
header("location: index.php?install=done");
} else {
Notification::setNow('errors', $errors);
}
}
?>
@@ -119,6 +126,7 @@
<link rel="shortcut icon" href="<?php echo $site_url; ?>/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="<?php echo $site_url; ?>/public/assets/css/bootstrap.css" media="all" type="text/css" />
<link rel="stylesheet" href="<?php echo $site_url; ?>/admin/themes/default/css/default.css" media="all" type="text/css" />
<style>
.install-body {
@@ -129,7 +137,7 @@
.install-languages {
margin: 20px auto 20px;
text-align: center;
width: 390px;
width: 600px;
}
.install-block,
@@ -165,14 +173,24 @@
.error {
color:#8E0505;
padding-top: 5px;
padding-bottom: 5px;
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 5px;
}
.ok {
color:#00853F;
padding-top: 5px;
padding-bottom: 5px;
margin-bottom: 5px;
}
.warn {
color: #F74C18;
padding-top: 5px;
padding-bottom: 5px;
}
.install-languages a {
@@ -204,12 +222,17 @@
opacity: 1.0;
}
.continue {
width: 100%;
}
</style>
<script type="text/javascript" src="<?php echo $site_url; ?>/public/assets/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo $site_url; ?>/public/assets/js/bootstrap.min.js"></script>
<script src="<?php echo $site_url; ?>/public/assets/js/jquery.min.js"></script>
<script src="<?php echo $site_url; ?>/public/assets/js/bootstrap.min.js"></script>
</head>
<body class="install-body">
<?php
if (version_compare(PHP_VERSION, "5.2.3", "<")) {
$errors['php'] = 'error';
@@ -264,13 +287,36 @@
<div class="text-center"><a class="brand" href="<?php echo Html::toText($site_url); ?>"><img src="<?php echo $site_url; ?>/public/assets/img/monstra-logo-256px.png" alt="Monstra"></a></div>
<div class="install-languages">
<?php
if (Request::get('action') && Request::get('action') == 'install') {
$action = '&action=install';
} else {
$action = '';
}
?>
<?php foreach ($languages_array as $lang_code) { ?>
<a data-placement="top" data-toggle="tooltip" class="language-link<?php if (Option::get('language') == $lang_code) echo ' language-link-current';?>" title="<?php echo I18n::$locales[$lang_code]; ?>" href="<?php echo $site_url.'/?language=' . $lang_code; ?>"><img src="<?php echo $site_url; ?>/public/assets/img/flags/<?php echo $lang_code?>.png" alt="<?php echo $lang_code?>"></a>
<a data-placement="top" data-toggle="tooltip" class="language-link<?php if (Option::get('language') == $lang_code) echo ' language-link-current';?>" title="<?php echo I18n::$locales[$lang_code]; ?>" href="<?php echo $site_url.'/?language=' . $lang_code.$action; ?>"><img src="<?php echo $site_url; ?>/public/assets/img/flags/<?php echo $lang_code?>.png" alt="<?php echo $lang_code?>"></a>
<?php } ?>
</div>
<div class="install-block well">
<form action="install.php" method="post">
<div class="install-block <?php if(Request::get('action') && Request::get('action') == 'install') { ?><?php } else { ?> hide <?php } ?>">
<ul class="list-unstyled">
<?php
// Monstra Notifications
if (Notification::get('errors') && count(Notification::get('errors') > 0)) {
foreach (Notification::get('errors') as $error) {
?>
<li class="error alert alert-danger"><?php echo $error; ?></li>
<?php
}
}
?>
</ul>
<div class="well">
<form action="install.php?action=install" method="post">
<input type="hidden" name="php" value="<?php echo $errors['php']; ?>">
<input type="hidden" name="simplexml" value="<?php echo $errors['simplexml']; ?>">
<input type="hidden" name="mod_rewrite" value="<?php echo $errors['mod_rewrite']; ?>">
@@ -402,66 +448,66 @@
<input type="submit" class="btn btn-primary" name="install_submit" value="<?php echo __('Install', 'system'); ?>" />
</div>
</form>
</div>
</div>
<p class="text-center monstra-says"><strong><?php echo __('...Monstra says...', 'system'); ?></strong></p>
<div class="monstra-dialog well">
<div class="monstra-dialog <?php if(Request::get('action') && Request::get('action') == 'install') { ?>hide<?php } ?>">
<ul class="list-unstyled">
<?php
if (version_compare(PHP_VERSION, "5.2.0", "<")) {
echo '<li class="error">'.__('PHP 5.2 or greater is required', 'system').'</li>';
echo '<li class="error alert alert-danger">'.__('PHP 5.2 or greater is required', 'system').'</li>';
} else {
echo '<li class="ok">'.__('PHP Version', 'system').' '.PHP_VERSION.'</li>';
echo '<li class="ok alert alert-success">'.__('PHP Version', 'system').' '.PHP_VERSION.'</li>';
}
if (in_array('SimpleXML', $php_modules)) {
echo '<li class="ok">'.__('Module SimpleXML is installed', 'system').'</li>';
echo '<li class="ok alert alert-success">'.__('Module SimpleXML is installed', 'system').'</li>';
} else {
echo '<li class="error">'.__('SimpleXML module is required', 'system').'</li>';
echo '<li class="error alert alert-danger">'.__('SimpleXML module is required', 'system').'</li>';
}
if (in_array('dom', $php_modules)) {
echo '<li class="ok">'.__('Module DOM is installed', 'system').'</li>';
echo '<li class="ok alert alert-success">'.__('Module DOM is installed', 'system').'</li>';
} else {
echo '<li class="error">'.__('Module DOM is required', 'system').'</li>';
echo '<li class="error alert alert-danger">'.__('Module DOM is required', 'system').'</li>';
}
if (function_exists('apache_get_modules')) {
if ( ! in_array('mod_rewrite',apache_get_modules())) {
echo '<li class="error">'.__('Apache Mod Rewrite is required', 'system').'</li>';
echo '<li class="error alert alert-danger">'.__('Apache Mod Rewrite is required', 'system').'</li>';
} else {
echo '<li class="ok">'.__('Module Mod Rewrite is installed', 'system').'</li>';
echo '<li class="ok alert alert-success">'.__('Module Mod Rewrite is installed', 'system').'</li>';
}
} else {
echo '<li class="ok">'.__('Module Mod Rewrite is installed', 'system').'</li>';
echo '<li class="ok alert alert-success">'.__('Module Mod Rewrite is installed', 'system').'</li>';
}
foreach ($dir_array as $dir) {
if (is_writable($dir.'/')) {
echo '<li class="ok">'.__('Directory: <b> :dir </b> writable', 'system', array(':dir' => $dir)).'</li>';
echo '<li class="ok alert alert-success">'.__('Directory: <b> :dir </b> writable', 'system', array(':dir' => $dir)).'</li>';
} else {
echo '<li class="error">'.__('Directory: <b> :dir </b> not writable', 'system', array(':dir' => $dir)).'</li>';
echo '<li class="error alert alert-danger">'.__('Directory: <b> :dir </b> not writable', 'system', array(':dir' => $dir)).'</li>';
}
}
if (is_writable(__FILE__)) {
echo '<li class="ok">'.__('Install script writable', 'system').'</li>';
echo '<li class="ok alert alert-success">'.__('Install script writable', 'system').'</li>';
} else {
echo '<li class="error">'.__('Install script not writable', 'system').'</li>';
echo '<li class="error alert alert-danger">'.__('Install script not writable', 'system').'</li>';
}
if (is_writable('sitemap.xml')) {
echo '<li class="ok">'.__('Sitemap file writable', 'system').'</li>';
echo '<li class="ok alert alert-success">'.__('Sitemap file writable', 'system').'</li>';
} else {
echo '<li class="error">'.__('Sitemap file not writable', 'system').'</li>';
echo '<li class="error alert alert-danger">'.__('Sitemap file not writable', 'system').'</li>';
}
if (is_writable('.htaccess')) {
echo '<li class="ok">'.__('Main .htaccess file writable', 'system').'</li>';
echo '<li class="ok alert alert-success">'.__('Main .htaccess file writable', 'system').'</li>';
} else {
echo '<li class="error">'.__('Main .htaccess file not writable', 'system').'</li>';
echo '<li class="error alert alert-danger">'.__('Main .htaccess file not writable', 'system').'</li>';
}
if (isset($errors['sitename'])) echo '<li class="error">'.$errors['sitename'].'</li>';
@@ -472,16 +518,24 @@
if (isset($errors['email_valid'])) echo '<li class="error">'.$errors['email_valid'].'</li>';
?>
</ul>
<a href="install.php?action=install" class="btn btn-primary continue">Continue</a>
</div>
<div class="install-block-footer">
<div class="install-block-footer login-footer">
<div class="text-center">
<span class="small-grey-text">© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
<span>© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
</div>
</div>
<script type="text/javascript">
$('.language-link').tooltip();
$(document).ready(function() {
$('.continue').click(function() {
$('.monstra-dialog').addClass('hide');
$('.install-block').removeClass('hide');
});
});
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -46,6 +46,10 @@ $().ready(function(){$('[name=create_backup]').click(function(){$(this).button('
<td><?php echo Number::byteFormat(filesize(ROOT . DS . 'backups' . DS . $backup)); ?></td>
<td>
<div class="pull-right">
<?php echo Html::anchor(__('Restore', 'backup'),
'',
array('class' => 'btn btn-primary'));
?>
<?php echo Html::anchor(__('Delete', 'backup'),
'index.php?id=backup&delete_file='.$backup.'&token='.Security::token(),
array('class' => 'btn btn-danger', 'onclick' => "return confirmDelete('".__('Delete backup: :backup', 'backup', array(':backup' => Date::format($name, 'F jS, Y - g:i A')))."')"));

View File

@@ -0,0 +1,2 @@
Options -Indexes
Allow from all

View File

@@ -48,11 +48,11 @@ class EmailsAdmin extends Backend
}
$email_template_content = File::getContent($email_templates_path.Request::get('filename').'.email.php');
$content = File::getContent($email_templates_path.Request::get('filename').'.email.php');
// Display view
View::factory('box/emails/views/backend/edit')
->assign('email_template_content', Text::toHtml($email_template_content))
->assign('content', $content)
->display();
break;

View File

@@ -1,7 +1,7 @@
<h2><?php echo __('Edit Email Template', 'emails'); ?></h2>
<br>
<?php
if ($email_template_content !== null) {
if ($content !== null) {
echo (Form::open());
echo (Form::hidden('csrf', Security::token()));
echo (Form::hidden('email_template_name', Request::get('filename')));
@@ -15,7 +15,7 @@ if ($email_template_content !== null) {
echo (
Form::label('content', __('Email template content', 'emails')).
Form::textarea('content', Html::toText($email_template_content), array('style' => 'width:100%;height:400px;', 'class' => 'source-editor form-control'))
Form::textarea('content', Html::toText($content), array('style' => 'width:100%;height:400px;', 'class' => 'source-editor form-control'))
);
echo (

View File

@@ -2,6 +2,14 @@
<div class="pull-left">
<h2><?php echo __('Emails', 'emails'); ?></h2>
</div>
<div class="pull-right">
<br>
<?php
echo (
Html::anchor(__('Edit Layout', 'emails'), 'index.php?id=emails&action=edit_email_template&filename=layout', array('title' => __('Edit Layout', 'emails'), 'class' => 'btn btn-primary'))
);
?>
</div>
<div class="clearfix"></div>
</div>
@@ -16,6 +24,7 @@
</thead>
<tbody>
<?php if (count($email_templates_list) != 0) foreach ($email_templates_list as $email_template) { ?>
<?php if ($email_template != 'layout.email.php') { ?>
<tr>
<td><?php echo basename($email_template, '.email.php'); ?></td>
<td>
@@ -27,5 +36,6 @@
</td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
</table>

View File

@@ -1,22 +1 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
<style type="text/css">
<?php include 'inc.css'; ?>
</style>
</head>
<body>
<table class="body">
<tr>
<td class="center" align="center" valign="top">
<center>
<?php include STORAGE . DS . 'emails' . DS . $email_template . '.email.php'; ?>
</center>
</td>
</tr>
</table>
</body>
</html>
<?php include STORAGE . DS . 'emails' . DS . 'layout.email.php'; ?>

View File

@@ -0,0 +1,2 @@
Options -Indexes
Allow from all

View File

@@ -10,15 +10,11 @@
}
.upload-area-dragenter {
border: 2px solid #ff85A1 !important;
border: 2px dashed #428bca !important;
}
.upload-area-drop {
border: 2px dotted #0B85A1;
}
.upload-area-dragover {
border: 2px dotted #0B85A1;
border: 2px dashed #428bca;
}
.upload-progress {
@@ -43,3 +39,14 @@
.upload-file-pholder {
padding-top: 5px;
}
.file-size-max-upload {
color: #ccc;
text-decoration: none;
}
.file-size-max-upload:hover {
color: #ccc;
cursor: default;
text-decoration: none;
}

View File

@@ -12,25 +12,26 @@
);
?>
<div class="col-md-10">
<div class="fileupload fileupload-new fileupload-controls" data-provides="fileupload">
<button class="btn btn-default btn-file"><span class="fileupload-new"><?php echo __('Select file', 'filesmanager'); ?></span><span class="fileupload-exists"><?php echo __('Change', 'filesmanager'); ?></span><input type="file" name="file" /></button>
<div class="fileinput fileinput-new pull-left" data-provides="fileinput">
<span class="btn btn-default btn-file"><span class="fileinput-new"><?php echo __('Select file', 'filesmanager'); ?></span><span class="fileinput-exists"><?php echo __('Change', 'filesmanager'); ?></span><input type="file" name="file"></span>
<?php
echo (
Form::submit('upload_file', __('Upload', 'filesmanager'), array('class' => 'btn btn-primary')).
Form::close()
)
?>
<span class="fileupload-preview"></span>
<a href="#" class="close fileupload-exists" data-dismiss="fileupload">×</a>
<span class="fileinput-filename"></span>
<a href="#" class="close fileinput-exists" data-dismiss="fileinput" style="float: none">&times;</a>
</div>
<div id="uploadArea" class="upload-area">
<div id="fuProgress" class="upload-progress"></div>
<div id="fuPlaceholder" class="upload-file-pholder"><?php echo __('Drop File Here', 'filesmanager'); ?></div>
</div>
<div id="fileInfo" class="upload-file-info"></div>
<div class="btn btn-link">
Maximum upload file size: <?php echo $upload_max_filesize; ?>
<div class="btn btn-link file-size-max-upload">
<?php echo __('Maximum upload file size: :upload_max_filesize', 'pages', array(':upload_max_filesize' => $upload_max_filesize)); ?>
</div>
</div>
<div class="col-md-2">

View File

@@ -17,7 +17,7 @@ function checkMonstraVersion()
var current_monstra_version = "'.Monstra::VERSION.'";
var stable_monstra_version = data.version;
if (current_monstra_version < stable_monstra_version) {
$("#update-monstra").addClass("alert").html("'.__("Published a new version of the :monstra", "system", array(":monstra" => "<a target='_blank' href='http://monstra.org/download'>Monstra</a>")).'");
$("#update-monstra").addClass("alert alert-info").html("'.__("Published a new version of the :monstra", "system", array(":monstra" => "<a target='_blank' href='http://monstra.org/download'>Monstra</a>")).'");
}
}
);

View File

@@ -298,7 +298,7 @@ class Users extends Frontend
$mail->AddReplyTo(Option::get('system_email'));
$mail->AddAddress($user['email'], $user['login']);
$mail->Subject = __('Your new password for :site_name', 'users', array(':site_name' => $site_name));
$mail->MsgHTML(View::factory('box/users/views/emails/email_layout')
$mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')
->assign('site_url', $site_url)
->assign('site_name', $site_name)
->assign('user_id', $user['id'])
@@ -312,7 +312,7 @@ class Users extends Frontend
Notification::set('success', __('New password has been sent', 'users'));
// Redirect to password-reset page
Request::redirect(Site::url().'/users/password-reset');
Request::redirect(Site::url().'/users/login');
}
}
@@ -347,7 +347,7 @@ class Users extends Frontend
$mail->AddReplyTo(Option::get('system_email'));
$mail->AddAddress($user['email'], $user['login']);
$mail->Subject = __('Your login details for :site_name', 'users', array(':site_name' => $site_name));
$mail->MsgHTML(View::factory('box/users/views/emails/layout_email')
$mail->MsgHTML(View::factory('box/emails/views/emails/email_layout')
->assign('site_url', $site_url)
->assign('site_name', $site_name)
->assign('user_id', $user['id'])

View File

@@ -58,13 +58,20 @@ class CodeMirror
');
if (Request::get('id') == 'themes' || Request::get('id') == 'snippets' || Request::get('id') == 'emails') {
if (Request::get('id') == 'emails') {
$mode = 'xml';
} else {
$mode = 'htmlmixed';
}
echo ('<script>
$(document).ready(function() {
var editor = CodeMirror.fromTextArea(document.getElementById("content"), {
lineNumbers: false,
matchBrackets: true,
indentUnit: 4,
mode: "htmlmixed",
mode: "'.$mode.'",
indentWithTabs: true,
theme: "'.CodeMirror::$theme.'"
});

View File

@@ -1,39 +1,3 @@
/*!
* Bootstrap v2.3.1-j6
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world by @mdo and @fat, extended by @ArnoldDaniels.
*/
.clearfix {
*zoom: 1;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
line-height: 0;
}
.clearfix:after {
clear: both;
}
.hide-text {
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
.input-block-level {
display: block;
width: 100%;
min-height: 30px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.btn-file {
overflow: hidden;
position: relative;
@@ -51,85 +15,76 @@
direction: ltr;
cursor: pointer;
}
.fileupload {
.fileinput {
margin-bottom: 9px;
display: inline-block;
}
.fileupload .uneditable-input {
.fileinput .uneditable-input {
display: inline-block;
margin-bottom: 0px;
vertical-align: middle;
cursor: text;
}
.fileupload .thumbnail {
.fileinput .thumbnail {
overflow: hidden;
display: inline-block;
margin-bottom: 5px;
vertical-align: middle;
text-align: center;
}
.fileupload .thumbnail > img {
display: inline-block;
vertical-align: middle;
.fileinput .thumbnail > img {
max-height: 100%;
}
.fileupload .btn {
.fileinput .btn {
vertical-align: middle;
}
.fileupload-exists .fileupload-new,
.fileupload-new .fileupload-exists {
.fileinput-exists .fileinput-new,
.fileinput-new .fileinput-exists {
display: none;
}
.fileupload-exists {
float:none;
}
.fileupload-inline .fileupload-controls {
.fileinput-inline .fileinput-controls {
display: inline;
}
.fileupload-new .input-append .btn-file {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
.fileinput .uneditable-input {
white-space: normal;
}
.fileinput-new .input-group .btn-file {
border-radius: 0 4px 4px 0;
}
.fileinput-new .input-group .btn-file.btn-xs,
.fileinput-new .input-group .btn-file.btn-sm {
border-radius: 0 3px 3px 0;
}
.thumbnail-borderless .thumbnail {
border: none;
padding: 0;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
.fileinput-new .input-group .btn-file.btn-lg {
border-radius: 0 6px 6px 0;
}
.fileupload-new.thumbnail-borderless .thumbnail {
border: 1px solid #ddd;
.form-group.has-warning .fileinput .uneditable-input {
color: #c09853;
border-color: #faebcc;
}
.control-group.warning .fileupload .uneditable-input {
color: #a47e3c;
border-color: #a47e3c;
.form-group.has-warning .fileinput .fileinput-preview {
color: #c09853;
}
.control-group.warning .fileupload .fileupload-preview {
color: #a47e3c;
.form-group.has-warning .fileinput .thumbnail {
border-color: #faebcc;
}
.control-group.warning .fileupload .thumbnail {
border-color: #a47e3c;
}
.control-group.error .fileupload .uneditable-input {
.form-group.has-error .fileinput .uneditable-input {
color: #b94a48;
border-color: #b94a48;
border-color: #ebccd1;
}
.control-group.error .fileupload .fileupload-preview {
.form-group.has-error .fileinput .fileinput-preview {
color: #b94a48;
}
.control-group.error .fileupload .thumbnail {
border-color: #b94a48;
.form-group.has-error .fileinput .thumbnail {
border-color: #ebccd1;
}
.control-group.success .fileupload .uneditable-input {
.form-group.has-success .fileinput .uneditable-input {
color: #468847;
border-color: #468847;
border-color: #d6e9c6;
}
.control-group.success .fileupload .fileupload-preview {
.form-group.has-success .fileinput .fileinput-preview {
color: #468847;
}
.control-group.success .fileupload .thumbnail {
border-color: #468847;
.form-group.has-success .fileinput .thumbnail {
border-color: #d6e9c6;
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

View File

@@ -1,6 +1,6 @@
/* ===========================================================
* bootstrap-fileupload.js j2
* http://jasny.github.com/bootstrap/javascript.html#fileupload
* Bootstrap: fileinput.js v3.0.0-p7
* http://jasny.github.com/bootstrap/javascript.html#fileinput
* ===========================================================
* Copyright 2012 Jasny BV, Netherlands.
*
@@ -17,16 +17,15 @@
* limitations under the License.
* ========================================================== */
!function ($) {
+function ($) { "use strict";
"use strict"; // jshint ;_
var isIE = window.navigator.appName == 'Microsoft Internet Explorer'
/* FILEUPLOAD PUBLIC CLASS DEFINITION
* ================================= */
// FILEUPLOAD PUBLIC CLASS DEFINITION
// =================================
var Fileupload = function (element, options) {
this.$element = $(element)
this.type = this.$element.data('uploadtype') || (this.$element.find('.thumbnail').length > 0 ? "image" : "file")
this.$input = this.$element.find(':file')
if (this.$input.length === 0) return
@@ -39,69 +38,77 @@
this.$element.prepend(this.$hidden)
}
this.$preview = this.$element.find('.fileupload-preview')
this.$preview = this.$element.find('.fileinput-preview')
var height = this.$preview.css('height')
if (this.$preview.css('display') != 'inline' && height != '0px' && height != 'none') this.$preview.css('line-height', height)
this.original = {
'exists': this.$element.hasClass('fileupload-exists'),
'preview': this.$preview.html(),
'hiddenVal': this.$hidden.val()
exists: this.$element.hasClass('fileinput-exists'),
preview: this.$preview.html(),
hiddenVal: this.$hidden.val()
}
this.$remove = this.$element.find('[data-dismiss="fileupload"]')
this.$element.find('[data-trigger="fileupload"]').on('click.fileupload', $.proxy(this.trigger, this))
this.listen()
}
Fileupload.prototype = {
Fileupload.prototype.listen = function() {
this.$input.on('change.bs.fileinput', $.proxy(this.change, this))
$(this.$input[0].form).on('reset.bs.fileinput', $.proxy(this.reset, this))
listen: function() {
this.$input.on('change.fileupload', $.proxy(this.change, this))
$(this.$input[0].form).on('reset.fileupload', $.proxy(this.reset, this))
if (this.$remove) this.$remove.on('click.fileupload', $.proxy(this.clear, this))
this.$element.find('[data-trigger="fileinput"]').on('click.bs.fileinput', $.proxy(this.trigger, this))
this.$element.find('[data-dismiss="fileinput"]').on('click.bs.fileinput', $.proxy(this.clear, this))
},
change: function(e, invoked) {
if (invoked === 'clear') return
var file = e.target.files !== undefined ? e.target.files[0] : (e.target.value ? { name: e.target.value.replace(/^.+\\/, '') } : null)
if (!file) {
this.clear()
return
}
Fileupload.prototype.change = function(e) {
if (e.target.files === undefined) e.target.files = e.target && e.target.value ? [ {name: e.target.value.replace(/^.+\\/, '')} ] : []
if (e.target.files.length === 0) return
this.$hidden.val('')
this.$hidden.attr('name', '')
this.$input.attr('name', this.name)
if (this.type === "image" && this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match('image.*') : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") {
var file = e.target.files[0]
if (this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match('image.*') : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") {
var reader = new FileReader()
var preview = this.$preview
var element = this.$element
reader.onload = function(e) {
preview.html('<img src="' + e.target.result + '" ' + (preview.css('max-height') != 'none' ? 'style="max-height: ' + preview.css('max-height') + ';"' : '') + ' />')
element.addClass('fileupload-exists').removeClass('fileupload-new')
reader.onload = function(re) {
var $img = $('<img>').attr('src', re.target.result)
e.target.files[0].result = re.target.result
element.find('.fileinput-filename').text(file.name)
// if parent has max-height, using `(max-)height: 100%` on child doesn't take padding and border into account
if (preview.css('max-height') != 'none') $img.css('max-height', parseInt(preview.css('max-height'), 10) - parseInt(preview.css('padding-top'), 10) - parseInt(preview.css('padding-bottom'), 10) - parseInt(preview.css('border-top'), 10) - parseInt(preview.css('border-bottom'), 10))
preview.html($img)
element.addClass('fileinput-exists').removeClass('fileinput-new')
element.trigger('change.bs.fileinput', e.target.files)
}
reader.readAsDataURL(file)
} else {
this.$element.find('.fileinput-filename').text(file.name)
this.$preview.text(file.name)
this.$element.addClass('fileupload-exists').removeClass('fileupload-new')
this.$element.addClass('fileinput-exists').removeClass('fileinput-new')
this.$element.trigger('change.bs.fileinput')
}
},
clear: function(e) {
Fileupload.prototype.clear = function(e) {
if (e) e.preventDefault()
this.$hidden.val('')
this.$hidden.attr('name', this.name)
this.$input.attr('name', '')
//ie8+ doesn't support changing the value of input with type=file so clone instead
if (navigator.userAgent.match(/msie/i)){
if (isIE) {
var inputClone = this.$input.clone(true);
this.$input.after(inputClone);
this.$input.remove();
@@ -111,58 +118,61 @@
}
this.$preview.html('')
this.$element.addClass('fileupload-new').removeClass('fileupload-exists')
this.$element.find('.fileinput-filename').text('')
this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
if (e) {
this.$input.trigger('change', [ 'clear' ])
e.preventDefault()
if (e !== false) {
this.$input.trigger('change')
this.$element.trigger('clear.bs.fileinput')
}
},
reset: function(e) {
this.clear()
Fileupload.prototype.reset = function() {
this.clear(false)
this.$hidden.val(this.original.hiddenVal)
this.$preview.html(this.original.preview)
this.$element.find('.fileinput-filename').text('')
if (this.original.exists) this.$element.addClass('fileupload-exists').removeClass('fileupload-new')
else this.$element.addClass('fileupload-new').removeClass('fileupload-exists')
if (this.original.exists) this.$element.addClass('fileinput-exists').removeClass('fileinput-new')
else this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
this.$element.trigger('reset.bs.fileinput')
},
trigger: function(e) {
Fileupload.prototype.trigger = function(e) {
this.$input.trigger('click')
e.preventDefault()
}
}
/* FILEUPLOAD PLUGIN DEFINITION
* =========================== */
// FILEUPLOAD PLUGIN DEFINITION
// ===========================
$.fn.fileupload = function (options) {
$.fn.fileinput = function (options) {
return this.each(function () {
var $this = $(this)
, data = $this.data('fileupload')
if (!data) $this.data('fileupload', (data = new Fileupload(this, options)))
, data = $this.data('fileinput')
if (!data) $this.data('fileinput', (data = new Fileupload(this, options)))
if (typeof options == 'string') data[options]()
})
}
$.fn.fileupload.Constructor = Fileupload
$.fn.fileinput.Constructor = Fileupload
/* FILEUPLOAD DATA-API
* ================== */
// FILEUPLOAD DATA-API
// ==================
$(document).on('click.fileupload.data-api', '[data-provides="fileupload"]', function (e) {
$(document).on('click.fileinput.data-api', '[data-provides="fileinput"]', function (e) {
var $this = $(this)
if ($this.data('fileupload')) return
$this.fileupload($this.data())
if ($this.data('fileinput')) return
$this.fileinput($this.data())
var $target = $(e.target).closest('[data-dismiss="fileupload"],[data-trigger="fileupload"]');
var $target = $(e.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');
if ($target.length > 0) {
$target.trigger('click.fileupload')
e.preventDefault()
$target.trigger('click.bs.fileinput')
}
})

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width"/>
<style type="text/css">
<?php include PLUGINS_BOX . '/emails/css/inc.css'; ?>
</style>
</head>
<body>
<table class="body">
<tr>
<td class="center" align="center" valign="top">
<center>
<?php include STORAGE . DS . 'emails' . DS . $email_template . '.email.php'; ?>
</center>
</td>
</tr>
</table>
</body>
</html>

2
storage/pages/4.page.txt Normal file
View File

@@ -0,0 +1,2 @@
&lt;p&gt;Welcome to Monstra Blog.&lt;br&gt;
This is your first post. Edit or delete it, then start blogging!&lt;/p&gt;