From a3033c548bc9f1a0ec3efa8e1fbe3d98a3be2ae5 Mon Sep 17 00:00:00 2001 From: rulingcom Date: Mon, 1 Jun 2015 16:15:07 +0800 Subject: [PATCH] mods by joshua for groups and calendar and etc sdk --- .../javascripts/basic/orbit_js_1.0.1.js | 2 + app/assets/stylesheets/basic/global.css | 14 +- .../stylesheets/lib/group/_group-classes.scss | 33 +++++ .../stylesheets/lib/group/group-admin.scss | 22 ++- .../stylesheets/template/base/_variables.scss | 1 + .../template/modules/calendar.scss | 50 +++++++ .../assets/stylesheets/template/template.scss | 10 +- .../calendar/_calendar_widget1.html.erb | 130 ++++++++++++++++++ .../modules/calendar/info.json | 22 +++ .../modules/gallery/_gallery_widget1.html.erb | 2 +- .../modules/gallery/_gallery_widget2.html.erb | 2 +- .../modules/gallery/gallery_index1.html.erb | 2 +- .../modules/gallery/show.html.erb | 2 +- app/views/admin/groups/_post_form.html.erb | 12 +- 14 files changed, 281 insertions(+), 23 deletions(-) create mode 100644 app/templates/orbit_bootstrap/assets/stylesheets/template/modules/calendar.scss create mode 100644 app/templates/orbit_bootstrap/modules/calendar/_calendar_widget1.html.erb create mode 100644 app/templates/orbit_bootstrap/modules/calendar/info.json diff --git a/app/assets/javascripts/basic/orbit_js_1.0.1.js b/app/assets/javascripts/basic/orbit_js_1.0.1.js index c5925cd..69a026a 100755 --- a/app/assets/javascripts/basic/orbit_js_1.0.1.js +++ b/app/assets/javascripts/basic/orbit_js_1.0.1.js @@ -291,6 +291,7 @@ if($.support.touch) { $el.find('a').removeAttr('href'); }; $el.on(mouseenterEvent, function(e) { + $sidebar.addClass('on') $block.siblings().removeClass('show').end().eq($(this).index()).addClass('show'); $arrow.stop(true, false).animate({ top: ($(this).position().top+$(this).height()/2)-$arrowHeightFormat+$('.scroller').position().top, @@ -346,6 +347,7 @@ if($.support.touch) { $el.eq($blockIndex).hasClass('active') ? '':$el.eq($blockIndex).children('span').addClass('hover'); }, mouseleave: function() { + $sidebar.removeClass('on'); $block.removeClass('show'); if(!$sidebarState || !$el.hasClass('active')) { $blockList.css({'width': 0}); diff --git a/app/assets/stylesheets/basic/global.css b/app/assets/stylesheets/basic/global.css index c22a181..0ef6f12 100644 --- a/app/assets/stylesheets/basic/global.css +++ b/app/assets/stylesheets/basic/global.css @@ -49,7 +49,7 @@ input:focus::-webkit-input-placeholder { color: transparent; } body { - background-color: #F3F3F3; + background-color: #f3f3f3; font-family: 'Chivo'; } body.modalBlur > nav, @@ -319,6 +319,18 @@ legend { background-color: rgba(0, 136, 204, .6); } +/* sidebar on */ +#sidebar.on ~ #main-wrap .fc-border-separate { + table-layout: fixed; +} + +#sidebar.on ~ #main-wrap .fc-view-month .fc-day-header { + width: auto !important; +} + +#sidebar.on ~ #main-wrap .fc-view-agendaWeek .fc-widget-header.fc-last { + width: 15px !important; +} /* Main Wrap */ #main-wrap { diff --git a/app/assets/stylesheets/lib/group/_group-classes.scss b/app/assets/stylesheets/lib/group/_group-classes.scss index e739184..095c33d 100644 --- a/app/assets/stylesheets/lib/group/_group-classes.scss +++ b/app/assets/stylesheets/lib/group/_group-classes.scss @@ -250,6 +250,39 @@ } } +// responsive grid +.square { + float: left; + position: relative; + width: 20%; + padding-bottom: 20%; + margin: 1%; + background-color: $white; + overflow: hidden; + .content { + position: absolute; + height: 90%; + width: 90%; + padding: 5%; + .rs { + width: auto; + height: auto; + max-height: 90%; + max-width: 100%; + } + } + .table { + display: table; + width: 100%; + height: 100%; + } + .table-cell { + display: table-cell; + vertical-align: middle; + } + +} + // avatar .admin-avatar { width: 60px; diff --git a/app/assets/stylesheets/lib/group/group-admin.scss b/app/assets/stylesheets/lib/group/group-admin.scss index 65653c5..67cc02c 100644 --- a/app/assets/stylesheets/lib/group/group-admin.scss +++ b/app/assets/stylesheets/lib/group/group-admin.scss @@ -172,11 +172,26 @@ body { } .group-admin-edit-image-wrap { - margin-bottom: 16px; + margin: 0 24px 1rem 0; } - .group-admin-edit-image-item { margin-bottom: 16px; + padding: 16px 0.5rem; +} +.group-admin-edit-image-container { + float: left; + width: 15%; + min-width: 150px; + margin: 0 1rem 16px 0; +} + +.group-admin-edit-checkbox-wrap { + color: $white; + font-size: 0.8125rem; + background: $blue; + padding: 2px 0.625rem; + border-radius: $general; + float: left; } .group-admin-edit-image-checkbox { display: inline-block; @@ -189,12 +204,11 @@ body { } .group-admin-edit-image-item-inner { padding: 16px 0.625rem; - margin-right: 1rem; background: $white; border-radius: $general; } .group-admin-edit-file-wrap { - margin-bottom: 16px; + margin-bottom: 10px; } .group-admin-edit-file-item { padding: 10px 16px; diff --git a/app/templates/orbit_bootstrap/assets/stylesheets/template/base/_variables.scss b/app/templates/orbit_bootstrap/assets/stylesheets/template/base/_variables.scss index 7e86c90..f872d5a 100644 --- a/app/templates/orbit_bootstrap/assets/stylesheets/template/base/_variables.scss +++ b/app/templates/orbit_bootstrap/assets/stylesheets/template/base/_variables.scss @@ -2,6 +2,7 @@ // Base Color $theme-gray: #495054; +$theme-gray-subtle: #ddd; $theme-gray-light: #cecece; $theme-gray-lighter: #f3f3f3; $theme-gray-dark: #363636; diff --git a/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/calendar.scss b/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/calendar.scss new file mode 100644 index 0000000..8e2e8f4 --- /dev/null +++ b/app/templates/orbit_bootstrap/assets/stylesheets/template/modules/calendar.scss @@ -0,0 +1,50 @@ +@charset "utf-8"; + +.w-calendar { + width: 100%; + position: relative; + + .widget-title { + text-align: center; + border: 1px solid $theme-gray-subtle; + margin: 0; + padding: 8px 0; + } + + th { + background: $theme-color-main; + color: $theme-white; + text-align: center; + font-size: 0.8125rem; + } + + td { + border: 1px solid $theme-gray-subtle; + text-align: center; + font-size: 0.8125rem; + } +} +.w-calendar-table { + margin-bottom: 0; + .w-calendar-today { + background: $theme-color-main; + color: $theme-white; + } + .w-calendar-event { + background: $theme-color-third; + color: $theme-white; + } +} + +.w-calendar-nav { + a { + position: absolute; + top: 8px; + left: 10px; + color: $theme-color-main; + } + .w-calendar-nav-next { + left: auto; + right: 10px; + } +} \ No newline at end of file diff --git a/app/templates/orbit_bootstrap/assets/stylesheets/template/template.scss b/app/templates/orbit_bootstrap/assets/stylesheets/template/template.scss index ef7c34f..24d175f 100644 --- a/app/templates/orbit_bootstrap/assets/stylesheets/template/template.scss +++ b/app/templates/orbit_bootstrap/assets/stylesheets/template/template.scss @@ -12,15 +12,7 @@ @import "layout/footer"; // Modules -@import "modules/menu"; -@import "modules/ad_banner"; -@import "modules/announcement"; -@import "modules/faq"; -@import "modules/web_resource"; -@import "modules/gallery"; -@import "modules/archives"; -@import "modules/member"; -@import "modules/personal_plugin"; +@import "modules/*"; // Widget @import "widget/breadcrumb"; diff --git a/app/templates/orbit_bootstrap/modules/calendar/_calendar_widget1.html.erb b/app/templates/orbit_bootstrap/modules/calendar/_calendar_widget1.html.erb new file mode 100644 index 0000000..ae4f5df --- /dev/null +++ b/app/templates/orbit_bootstrap/modules/calendar/_calendar_widget1.html.erb @@ -0,0 +1,130 @@ +
+
+

+ + + + + + + + + + + + + + +
SunMonTueWedThuFriSat
+
+
+ + \ No newline at end of file diff --git a/app/templates/orbit_bootstrap/modules/calendar/info.json b/app/templates/orbit_bootstrap/modules/calendar/info.json new file mode 100644 index 0000000..02d8167 --- /dev/null +++ b/app/templates/orbit_bootstrap/modules/calendar/info.json @@ -0,0 +1,22 @@ +{ + "frontend": [ + { + "filename" : "index", + "name" : { + "zh_tw" : "1. 行事曆", + "en" : "1. Calendar" + }, + "thumbnail" : "thumb.png" + } + ], + "widgets" : [ + { + "filename" : "calendar_widget1", + "name" : { + "zh_tw" : "1. 行事曆", + "en" : "1. Calendar" + }, + "thumbnail" : "thumb.png" + } + ] +} \ No newline at end of file diff --git a/app/templates/orbit_bootstrap/modules/gallery/_gallery_widget1.html.erb b/app/templates/orbit_bootstrap/modules/gallery/_gallery_widget1.html.erb index 948a079..9c43572 100644 --- a/app/templates/orbit_bootstrap/modules/gallery/_gallery_widget1.html.erb +++ b/app/templates/orbit_bootstrap/modules/gallery/_gallery_widget1.html.erb @@ -13,7 +13,7 @@ data-cycle-log="false" data-cycle-carousel-fluid="true"> - + {{alt_title}} diff --git a/app/templates/orbit_bootstrap/modules/gallery/_gallery_widget2.html.erb b/app/templates/orbit_bootstrap/modules/gallery/_gallery_widget2.html.erb index 564938a..c697c16 100644 --- a/app/templates/orbit_bootstrap/modules/gallery/_gallery_widget2.html.erb +++ b/app/templates/orbit_bootstrap/modules/gallery/_gallery_widget2.html.erb @@ -4,7 +4,7 @@
- + {{alt_title}}
\ No newline at end of file diff --git a/app/templates/orbit_bootstrap/modules/gallery/gallery_index1.html.erb b/app/templates/orbit_bootstrap/modules/gallery/gallery_index1.html.erb index 43e8abd..8652575 100644 --- a/app/templates/orbit_bootstrap/modules/gallery/gallery_index1.html.erb +++ b/app/templates/orbit_bootstrap/modules/gallery/gallery_index1.html.erb @@ -6,7 +6,7 @@
- + {{alt_title}}

diff --git a/app/templates/orbit_bootstrap/modules/gallery/show.html.erb b/app/templates/orbit_bootstrap/modules/gallery/show.html.erb index ff95b43..e9b373b 100644 --- a/app/templates/orbit_bootstrap/modules/gallery/show.html.erb +++ b/app/templates/orbit_bootstrap/modules/gallery/show.html.erb @@ -7,7 +7,7 @@ diff --git a/app/views/admin/groups/_post_form.html.erb b/app/views/admin/groups/_post_form.html.erb index 4eb2e04..cc22fb9 100644 --- a/app/views/admin/groups/_post_form.html.erb +++ b/app/views/admin/groups/_post_form.html.erb @@ -36,13 +36,15 @@ <% if params[:action] == "editpost" %>
<% @grouppost.group_post_images.each do |gpi| %> -
+
-
- +
+ +
+
+ +
- -
<% end %>