Skip to content

Commit

Permalink
database versioning, responsive themes
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoyigi committed Jul 5, 2014
1 parent 60a9e8e commit 2fe692b
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 35 deletions.
1 change: 0 additions & 1 deletion .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ AddType image/svg+xml svgz
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin

ErrorDocument 404 /index.php
</IfModule>
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function index() {
$data['guest_num'] = $reservation['guest_num'] .' person(s)';
$data['reserve_date'] = mdate('%l, %F %j, %Y', strtotime($reservation['reserve_date']));
$data['reserve_time'] = mdate('%h:%i %a', strtotime($reservation['reserve_time']));
$data['occasion'] = $occasions[$reservation['occasion']];
$data['occasion'] = (isset($reservation['occasion']) AND $reservation['occasion'] > 0) ? $occasions[$reservation['occasion']] : '';
}

$data['time'] = mdate('%H:%i', strtotime(urldecode($this->input->get('reserve_time'))));
Expand Down
52 changes: 47 additions & 5 deletions application/views/themes/admin/default/css/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ font-weight:bold;
.page-header {
background-color: #EDEDED;
border-radius: 0;
padding: 10px 25px;
min-height:45px;
padding: 0 25px;
min-height:40px;
margin-top: 0;
margin-bottom: 0;
position: fixed;
Expand All @@ -104,9 +104,14 @@ font-size: 20px;
margin-top: 0;
margin-bottom: 0;
font-weight:normal;
line-height: 1.9;
}
.page-header h1 .pull-right {
margin-top: 6px;
}



/** ALERT **/
#notification .alert {
padding:0;
Expand Down Expand Up @@ -1193,16 +1198,53 @@ padding-left: 15px;
.theme-tree-holder .active > ul {
display: block;
}
.theme-tree-toggle {
border:0 none;
bottom: 0;
color: #333;
font-size: 20px;
left: -21px;
opacity: 0.5;
position: absolute;
text-align: left;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
top: 0;
width: 10%;
z-index: 99999;
}
.theme-tree-toggle:hover,
.theme-tree-toggle:focus {
color: #333;
}
.theme-tree-toggle .fa {
background:#EEE;
border:1px solid #CCC;
border-right:0 none;
cursor:pointer;
display: inline-block;
font-size: 25px;
position: absolute;
padding: 5px 0 5px 5px;
top: 45%;
z-index: 5;
}
.theme-tree-toggle .fa:hover,
.theme-tree-toggle .fa:focus {
background:#DDD;
border:1px solid #CCC;
}
.theme-editor-wide .theme-tree-toggle {
left: -4px;
}
.theme-editor textarea {
background: #F5F5F5;
font-size: 14px;
width:100%;
}
.editor-text {
margin-top: 1px;
padding: 15px 0;
border-bottom: 1px solid #E7E7E7;
margin-bottom: 0;
margin: 0 15px;
padding: 15px 0;
}
#editor .col-sm-3 {
width: 20%;
Expand Down
5 changes: 0 additions & 5 deletions application/views/themes/admin/default/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@ function saveClose() {

$('.alert').alert();
$('.dropdown-toggle').dropdown();
/*$('ul.side-nav li.dropdown').hover(function() {
$(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500);
}, function() {
$(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500);
});*/
</script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
Expand Down
47 changes: 24 additions & 23 deletions application/views/themes/admin/default/themes_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,20 @@

<form role="form" id="edit-form" class="form-horizontal" accept-charset="utf-8" method="post" action="<?php echo $action; ?>">
<div class="tab-content">
<div id="editor" class="tab-pane row wrap-vertical theme-editor active">
<div id="editor" class="tab-pane row theme-editor active">
<?php if (!empty($file['heading'])){ ?>
<h4 class="text-info editor-text"><?php echo $file['heading']; ?></h4>
<?php } ?>

<div class="row wrap">
<div class="row wrap-vertical">
<div class="col-sm-3 wrap-none">
<div class="theme-tree-holder wrap-vertical">
<?php echo $theme_files; ?>
</div>
</div>
<div class="col-sm-9 wrap-none">
<div class="editor">
<a class="theme-tree-toggle"><i class="fa fa-angle-double-left"></i></a>
<div class="theme-editor-holder">
<?php if (!empty($file['type']) AND $file['type'] === 'file') { ?>
<textarea name="editor_area" id="editor-area" class="form-control" rows="28"><?php echo $file['content']; ?></textarea>
<?php } else if (!empty($file['type']) AND $file['type'] === 'img') { ?>
Expand All @@ -58,26 +59,26 @@
return false;
}
});

});

$(document).delegate('#editor-area', 'keydown', function(e) {
var keyCode = e.keyCode || e.which;

if (keyCode == 9) {
e.preventDefault();
var start = $(this).get(0).selectionStart;
var end = $(this).get(0).selectionEnd;

// set textarea value to: text before caret + tab + text after caret
$(this).val($(this).val().substring(0, start)
+ "\t"
+ $(this).val().substring(end));

// put caret at right position again
$(this).get(0).selectionStart =
$(this).get(0).selectionEnd = start + 1;
}
$('.theme-tree-toggle').click(function() {
var theme_holder = $('.theme-tree-holder').parent();
var theme_editor = $('.theme-editor-holder').parent();
theme_holder.toggle('slide', function() {
if (theme_holder.is(':visible')) {
$('#editor').removeClass('theme-editor-wide');
theme_editor.removeClass('col-sm-12').addClass('col-sm-9');
theme_editor.removeClass('wrap-vertical').addClass('wrap-none');
$('.theme-tree-toggle .fa').removeClass('fa-angle-double-right').addClass('fa-angle-double-left');
} else {
$('#editor').addClass('theme-editor-wide');
theme_editor.removeClass('col-sm-9').addClass('col-sm-12');
theme_editor.removeClass('wrap-none').addClass('wrap-vertical');
$('.theme-tree-toggle .fa').removeClass('fa-angle-double-left').addClass('fa-angle-double-right');
}
});
});
});
//--></script>
<link type="text/css" rel="stylesheet" href="<?php echo base_url("assets/js/codemirror/codemirror.css"); ?>">
Expand Down
6 changes: 6 additions & 0 deletions application/views/themes/main/default/css/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ margin-left:100px;
.form-group > label {
display: block;
}
.input-group {
width:70%;
}
.input-group-addon {
border-radius:0;
}
a.list-group-item {
color: #333;
}
Expand Down

0 comments on commit 2fe692b

Please sign in to comment.