From 295ee76fa9fd6a733dc7f6718cbc59eb07692969 Mon Sep 17 00:00:00 2001 From: "Mark (ilosuna)" Date: Sat, 8 Feb 2014 17:24:41 +0100 Subject: [PATCH] update to Bootstrap 3.1, modifications for Bootstrap 3.1 --- cms/config/db_settings.conf.php | 35 ++++++++--------- cms/data/content.sqlite | Bin 393216 -> 393216 bytes cms/data/entries.sqlite | Bin 19456 -> 19456 bytes cms/data/userdata.sqlite | Bin 4096 -> 4096 bytes cms/includes/functions.inc.php | 2 - cms/templates/admin/main.tpl | 4 +- cms/templates/admin/subtemplates/edit.inc.tpl | 37 +++++++++++++----- .../admin/subtemplates/galleries_edit.inc.tpl | 2 +- .../subtemplates/galleries_edit_photo.inc.tpl | 12 ++++-- .../subtemplates/modal_insert_gallery.tpl | 12 +++--- .../admin/subtemplates/modal_insert_image.tpl | 15 +++---- .../subtemplates/modal_insert_raw_image.tpl | 12 +++--- .../subtemplates/modal_insert_thumbnail.tpl | 15 +++---- cms/templates/default.tpl | 9 ++--- static/css/style.css | 6 +-- static/css/style_admin.css | 31 +++++++-------- static/js/admin_backend.js | 9 ++--- static/js/main.js | 3 +- static/js/mylightbox.js | 26 +++++++++++- 19 files changed, 134 insertions(+), 96 deletions(-) diff --git a/cms/config/db_settings.conf.php b/cms/config/db_settings.conf.php index dd850dc..a90a771 100644 --- a/cms/config/db_settings.conf.php +++ b/cms/config/db_settings.conf.php @@ -19,26 +19,25 @@ $db_settings['db_userdata_file'] = 'cms/data/userdata.sqlite'; $db_settings['userdata_table'] = 'phpsqlitecms_userdata'; /* - // PostgreSQL: -$db_settings['type'] = 'postgresql'; +$db_settings['type'] = 'postgresql'; -$db_settings['host'] = 'localhost'; -$db_settings['port'] = 5432; -$db_settings['user'] = 'user'; -$db_settings['password'] = 'password'; -$db_settings['database'] = 'phpsqlitecms'; +$db_settings['host'] = 'localhost'; +$db_settings['port'] = 5432; +$db_settings['user'] = 'user'; +$db_settings['password'] = 'password'; +$db_settings['database'] = 'phpsqlitecms'; -$db_settings['settings_table'] = 'phpsqlitecms_settings'; -$db_settings['pages_table'] = 'phpsqlitecms_pages'; -$db_settings['menu_table'] = 'phpsqlitecms_menus'; -$db_settings['gcb_table'] = 'phpsqlitecms_gcb'; -$db_settings['news_table'] = 'phpsqlitecms_news'; -$db_settings['news_table'] = 'phpsqlitecms_news'; -$db_settings['notes_table'] = 'phpsqlitecms_notes'; -$db_settings['photo_table'] = 'phpsqlitecms_photos'; -$db_settings['banlists_table'] = 'phpsqlitecms_banlists'; -$db_settings['comment_table'] = 'phpsqlitecms_comments'; -$db_settings['userdata_table'] = 'phpsqlitecms_userdata'; +$db_settings['settings_table'] = 'phpsqlitecms_settings'; +$db_settings['pages_table'] = 'phpsqlitecms_pages'; +$db_settings['menu_table'] = 'phpsqlitecms_menus'; +$db_settings['gcb_table'] = 'phpsqlitecms_gcb'; +$db_settings['news_table'] = 'phpsqlitecms_news'; +$db_settings['news_table'] = 'phpsqlitecms_news'; +$db_settings['notes_table'] = 'phpsqlitecms_notes'; +$db_settings['photo_table'] = 'phpsqlitecms_photos'; +$db_settings['banlists_table'] = 'phpsqlitecms_banlists'; +$db_settings['comment_table'] = 'phpsqlitecms_comments'; +$db_settings['userdata_table'] = 'phpsqlitecms_userdata'; */ ?> diff --git a/cms/data/content.sqlite b/cms/data/content.sqlite index ea94131251d751b821c51b8068a1c29279457e0c..a4b26a405fbe19fa615ba1c9f250692365b525a6 100644 GIT binary patch delta 804 zcmX|9Ur1A76#wr1yt$3$Hg#Z>nv5`)&AT>2u>_N{B*X?~|74DKn=ALnZFcYd?w@ai zLZp{X&<}#5Kzyl(Hk13%pa|(H$Wgrn^%8SeV7`Z(J)0c zOb^-P>!3F30je$PksYX)|1mwABo$^Z`&RS+rVDfp0CXXrDN{6E$YqM!dYMKh&9+6C zDJ(335q^G`vZ!2EPGJZCPAyCK<&v6EKFAxmSJBil<*TwKep8!}RV}KE%6|2@C`%j4 zU3@_TXj7R~fcR24C>P~ZFB>T zp%K(0UJ(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git a/cms/data/entries.sqlite b/cms/data/entries.sqlite index 380a721cab236be4f81fcec61e155771b31dfbf7..bdd18ffb6d7e6a597e22607d885fa89bc792990f 100644 GIT binary patch delta 44 zcmV+{0Mq|~m;r#80gxL3^^qJy1@! - - + @@ -45,7 +45,7 @@ - + diff --git a/cms/templates/admin/subtemplates/edit.inc.tpl b/cms/templates/admin/subtemplates/edit.inc.tpl index aef508f..73956bb 100644 --- a/cms/templates/admin/subtemplates/edit.inc.tpl +++ b/cms/templates/admin/subtemplates/edit.inc.tpl @@ -81,9 +81,9 @@
- - - + + +
@@ -407,7 +407,7 @@
- +
@@ -449,8 +449,27 @@ - - - - - + + + + diff --git a/cms/templates/admin/subtemplates/galleries_edit.inc.tpl b/cms/templates/admin/subtemplates/galleries_edit.inc.tpl index 710a0c1..c54d3c8 100644 --- a/cms/templates/admin/subtemplates/galleries_edit.inc.tpl +++ b/cms/templates/admin/subtemplates/galleries_edit.inc.tpl @@ -27,7 +27,7 @@ - <?php echo $item['title']; ?> + <?php echo htmlspecialchars($item['title']); ?> diff --git a/cms/templates/admin/subtemplates/galleries_edit_photo.inc.tpl b/cms/templates/admin/subtemplates/galleries_edit_photo.inc.tpl index 340af77..697f83e 100644 --- a/cms/templates/admin/subtemplates/galleries_edit_photo.inc.tpl +++ b/cms/templates/admin/subtemplates/galleries_edit_photo.inc.tpl @@ -30,7 +30,7 @@
- +
@@ -43,7 +43,7 @@
- +
@@ -89,5 +89,9 @@ - - + diff --git a/cms/templates/admin/subtemplates/modal_insert_gallery.tpl b/cms/templates/admin/subtemplates/modal_insert_gallery.tpl index b7f71b1..b99bfed 100644 --- a/cms/templates/admin/subtemplates/modal_insert_gallery.tpl +++ b/cms/templates/admin/subtemplates/modal_insert_gallery.tpl @@ -1,5 +1,3 @@ - diff --git a/cms/templates/admin/subtemplates/modal_insert_raw_image.tpl b/cms/templates/admin/subtemplates/modal_insert_raw_image.tpl index cc34f79..9a9a2b4 100644 --- a/cms/templates/admin/subtemplates/modal_insert_raw_image.tpl +++ b/cms/templates/admin/subtemplates/modal_insert_raw_image.tpl @@ -1,5 +1,3 @@ - diff --git a/cms/templates/default.tpl b/cms/templates/default.tpl index 9a48908..0cfbd24 100644 --- a/cms/templates/default.tpl +++ b/cms/templates/default.tpl @@ -7,7 +7,7 @@ - + @@ -46,7 +46,7 @@
  • -
  • +
  • @@ -99,7 +99,7 @@ - + @@ -107,8 +107,5 @@ - - - diff --git a/static/css/style.css b/static/css/style.css index cdc8c58..e5a2eaa 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -106,8 +106,8 @@ a.pdf { padding-left:23px; background-image:url(../img/p #mylightbox-title { position:absolute; top:3px; left:10px; width:90%; margin:0; padding:0; font-weight:bold; } #mylightbox-controls { position:absolute; top:5px; right:10px; width:14px; margin:0; padding:0; } #mylightbox #photo { margin:0; padding:0; } -#mylightbox-subtitle { font-size:14px; line-height:150%; margin:0; padding:3px 0 0 0; font-style:italic; color:#808080; } -#mylightbox-description { font-size:14px; line-height:150%; margin:0; padding:5px 0 8px 0; } +#mylightbox-subtitle { font-size:13px; line-height:150%; margin:5px 0 0 0; font-style:italic; color:#808080; } +#mylightbox-description { font-size:14px; line-height:150%; margin:5px 0 10px 0; } #mylightbox-author { color:#808080; font-size:13px; margin:-8px 0 0 0; padding:0 0 8px 0; } #mylightbox-throbber { width:32px; height:32px; margin:0 auto 0 auto; padding:100px 0; background:url(../img/throbber.gif) no-repeat center; } #mylightbox-photo { position:relative; } @@ -116,4 +116,4 @@ a.pdf { padding-left:23px; background-image:url(../img/p #mylightbox-next { width:25%; position:absolute; top:0; right:0; bottom:0; background:url(../img/next.png) no-repeat 1000px 0; z-index:10000; text-indent:-999em; outline:none; } #mylightbox-next:hover { background:url(../img/next.png) no-repeat 90% center, linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.2)); } #mylightbox-close { width:16px; height:16px; display:inline-block; text-indent:-999em; background:url(../img/close_button.png) no-repeat 0 0; outline:none; opacity:0.7; } -#mylightbox-close:hover { opacity:1; } +#mylightbox-close:hover { opacity:1; } diff --git a/static/css/style_admin.css b/static/css/style_admin.css index 612b7df..0ea0fa1 100644 --- a/static/css/style_admin.css +++ b/static/css/style_admin.css @@ -23,7 +23,6 @@ body { padding-top:70px; padding-bottom:50px; } textarea.html { font-family:monospace; } .nowrap { white-space:nowrap; } -.nomargin { margin:0; } .table th a { color:#000; text-decoration:none; white-space:nowrap; } .table th a .glyphicon { font-size:11px; padding-left:3px; } @@ -39,22 +38,20 @@ td.options { text-align:right; white-space:nowrap; } .sortable-handle { cursor:move; } #mylightbox-background { display:none; position:fixed; height:100%; width:100%; top:0; left:0; background:#000; border:1px solid #cecece; z-index:2000; } -#mylightbox { width:400px; display:none; position:absolute; background:#fff; z-index:2000; padding:3px 10px 0 10px; font-size:13px; border:1px solid #cecece; border-radius:5px; max-width:90%; height:auto; box-shadow:7px 7px 10px #333; } +#mylightbox { width:400px; display:none; position:absolute; background:#fff; z-index:2000; padding:3px 10px 0 10px; font-size:13px; border:1px solid #cecece; border-radius:5px; max-width:90%; height:auto; box-shadow:5px 5px 20px #000; } #mylightbox img { max-width:100%; height:auto; } -#mylightbox-header { height:20px; font-size:13px; line-height:20px; padding:0 0 3px 0; } -#mylightbox-title { position:absolute; top:2px; left:10px; width:40%; margin:0; padding:0; font-weight:bold; } -#mylightbox-nav { position:absolute; top:2px; left:40%; width:20%; margin:0; padding:0; text-align:center; float:left; white-space:nowrap; } -#mylightbox-controls { position:absolute; top:4px; right:10px; width:14px; margin:0; padding:0; } +#mylightbox-header { height:25px; font-size:13px; line-height:20px; padding:0 0 10px 0; } +#mylightbox-title { position:absolute; top:3px; left:10px; width:90%; margin:0; padding:0; font-weight:bold; } +#mylightbox-controls { position:absolute; top:5px; right:10px; width:14px; margin:0; padding:0; } #mylightbox #photo { margin:0; padding:0; } -#mylightbox-subtitle { font-size:14px; line-height:150%; margin:0; padding:3px 0 0 0; font-style:italic; color:#808080; } -#mylightbox-description { font-size:14px; line-height:150%; margin:0; padding:3px 0 8px 0; } +#mylightbox-subtitle { font-size:13px; line-height:150%; margin:5px 0 0 0; font-style:italic; color:#808080; } +#mylightbox-description { font-size:14px; line-height:150%; margin:5px 0 10px 0; } +#mylightbox-author { color:#808080; font-size:13px; margin:-8px 0 0 0; padding:0 0 8px 0; } #mylightbox-throbber { width:32px; height:32px; margin:0 auto 0 auto; padding:100px 0; background:url(../img/throbber.gif) no-repeat center; } -#mylightbox-prev { vertical-align:text-top; display:inline-block; width:16px; height:16px; margin:0; padding:0; background:url(../img/previous.png) no-repeat 0 0; } -#mylightbox-prev:hover { opacity:0.75; } -#mylightbox-next { vertical-align:text-top; display:inline-block; width:16px; height:16px; margin:0; padding:0; background:url(../img/next.png) no-repeat 0 0; } -#mylightbox-next:hover { opacity:0.75; } -#mylightbox-prev span, -#mylightbox-next span { display:none; } -#mylightbox-close { width:14px; height:14px; display:inline-block; text-indent:-999em; background:url(../img/close_button.png) no-repeat 0 0; outline:none; } -#mylightbox-close:hover { width:14px; height:14px; display:inline-block; text-indent:-999em; background:url(../img/close_button.png) no-repeat 0 -14px; outline:none; } - +#mylightbox-photo { position:relative; } +#mylightbox-prev { width:25%; position:absolute; top:0; left:0; bottom:0; background:url(../img/prev.png) no-repeat -1000px 0; z-index:10000; text-indent:-999em; outline:none; } +#mylightbox-prev:hover { background:url(../img/prev.png) no-repeat 10% center, linear-gradient(to left, rgba(0,0,0,0), rgba(0,0,0,0.2)); } +#mylightbox-next { width:25%; position:absolute; top:0; right:0; bottom:0; background:url(../img/next.png) no-repeat 1000px 0; z-index:10000; text-indent:-999em; outline:none; } +#mylightbox-next:hover { background:url(../img/next.png) no-repeat 90% center, linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.2)); } +#mylightbox-close { width:16px; height:16px; display:inline-block; text-indent:-999em; background:url(../img/close_button.png) no-repeat 0 0; outline:none; opacity:0.7; } +#mylightbox-close:hover { opacity:1; } diff --git a/static/js/admin_backend.js b/static/js/admin_backend.js index 4ea44a0..4dd26e9 100644 --- a/static/js/admin_backend.js +++ b/static/js/admin_backend.js @@ -16,9 +16,6 @@ obj.scrollTop = scrollTop; $(function() { - - - $("a[data-delete-confirm]").click(function(e) { e.preventDefault(); message = $(this).data('delete-confirm') ? decodeURIComponent($(this).data('delete-confirm')) : 'Delete?'; $(this).parents("tr").addClass('danger'); @@ -31,7 +28,6 @@ $("a[data-delete-confirm]").click(function(e) { e.preventDefault(); $("*[data-toggle-checkboxes]").click(function(e) { e.preventDefault(); var checkboxClass = $(this).data('toggle-checkboxes'); - //alert(checkboxClass); $('.'+checkboxClass).trigger('click'); }); @@ -50,6 +46,9 @@ $("*[data-sortable]").sortable({ start : function(e, ui) { ui.item.addClass("war -$('.modal-invoker').click(function(e) { insertTarget = $(this).data('input'); }); +$('.modal').on('show.bs.modal', function (e) { + $insertField = $(e.relatedTarget).data('insert'); +}); + }); diff --git a/static/js/main.js b/static/js/main.js index 01140b5..3bce4ff 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -1,6 +1,5 @@ $(function() { -$('#carousel').carousel({ interval:8000 }); -$("#menu-toggle-handle").click(function(e) { $('#nav').slideToggle('fast', function() { /*$('#edit_page_image_box .handle').toggleClass('handle_active', $(this).is(':visible'));*/ } ); }); +$("#menu-toggle-handle").click(function(e) { $('#nav').slideToggle('fast'); }); }); diff --git a/static/js/mylightbox.js b/static/js/mylightbox.js index f790f74..444dee4 100644 --- a/static/js/mylightbox.js +++ b/static/js/mylightbox.js @@ -15,6 +15,7 @@ myLightboxSettings['html_box'] = '\
    \ +

    \

    \

    \ '; @@ -121,6 +122,7 @@ function doit(e,t) var myLightboxLinks = new Array(); var srcs = new Array(); var titles = new Array(); + var subtitles = new Array(); var descriptions = new Array(); var authors = new Array(); @@ -131,6 +133,7 @@ function doit(e,t) myLightboxLinks.push($(this)); srcs.push($(this).attr('href')); titles.push($(this).find('img').attr('title')); + subtitles.push($(this).find('img').attr('data-subtitle')); descriptions.push($(this).find('img').attr('data-description')); authors.push($(this).find('img').attr('data-author')); }); @@ -138,6 +141,7 @@ function doit(e,t) var numberOfImages = myLightboxLinks.length; var src = srcs[mylightboxCurrent]; var title = titles[mylightboxCurrent]; + var subtitle = subtitles[mylightboxCurrent]; var description = descriptions[mylightboxCurrent]; var author = authors[mylightboxCurrent]; @@ -210,8 +214,28 @@ function doit(e,t) //$("#mylightbox-next").remove(); } + if(subtitle) + { + $("#mylightbox-subtitle").html(subtitle); + $("#mylightbox-subtitle").show(); + } + else + { + $("#mylightbox-subtitle").hide(); + } + $("#mylightbox-description").html(description); - $("#mylightbox-author").html(author); + + if(author) + { + $("#mylightbox-author").html(author); + $("#mylightbox-author").show(); + } + else + { + $("#mylightbox-author").hide(); + } + $("#mylightbox-photo").fadeIn("fast"); myLightboxCurrentWidth = objImagePreloader.width;