diff --git a/Gemfile b/Gemfile index aa6a2ba9..07a50937 100644 --- a/Gemfile +++ b/Gemfile @@ -21,7 +21,7 @@ gem 'kaminari', :git => 'git://github.com/amatsuda/kaminari.git' gem 'mini_magick' gem 'mongoid', '> 2.1', '< 3.0.0' gem 'mongoid-tree', :require => 'mongoid/tree' -gem "mongo_session_store-rails3" +gem "mongo_session_store-rails3", '3.0.6' gem 'nokogiri' @@ -72,10 +72,10 @@ end group :test, :development do - gem 'pry' - gem 'pry-remote' - gem 'pry-stack_explorer' - gem 'pry-debugger' + #gem 'pry' + #gem 'pry-remote' + #gem 'pry-stack_explorer' + #gem 'pry-debugger' gem 'faker' gem "sunspot-rails-tester" diff --git a/app/assets/fonts/FontAwesome.otf b/app/assets/fonts/FontAwesome.otf new file mode 100644 index 00000000..64049bf2 Binary files /dev/null and b/app/assets/fonts/FontAwesome.otf differ diff --git a/app/assets/fonts/entypo.dev.svg b/app/assets/fonts/entypo.dev.svg new file mode 100644 index 00000000..5566ca5c --- /dev/null +++ b/app/assets/fonts/entypo.dev.svg @@ -0,0 +1,980 @@ + + + + +This is a custom SVG font generated by IcoMoon. +1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/fonts/entypo.eot b/app/assets/fonts/entypo.eot index 56d104e9..8633c77d 100644 Binary files a/app/assets/fonts/entypo.eot and b/app/assets/fonts/entypo.eot differ diff --git a/app/assets/fonts/entypo.svg b/app/assets/fonts/entypo.svg index 01ff749d..cc9143e5 100644 --- a/app/assets/fonts/entypo.svg +++ b/app/assets/fonts/entypo.svg @@ -9,43 +9,65 @@ This is a custom SVG font generated by IcoMoon. - - + + + - + - + + - + + - + - + + + + - + - + - - + + + + + + + + - - + + + - - + + - - - + + + + + - + - + + - + + - + - + - - + + - + - + + - + - + - + + + + + + - + - + - - + + + + - + - - - + + + + + + + + - + + + - + - + + - + + + + + + + + + + - + - + - + - + + + + + + + + - + + + - + + - - - - + + + - + + + + + + + - - - - + + + - + - + - - - + + + - + - - - - - - - - + + + + + + - + + + + - + - + - + - + - + - + + + + - - - - - + + + + + + + + - + + - + - - - + + + + + + - - + + - + - + - + - + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + l 92.186,0.00 L 302.106,230.144 l 57.60,0.00 l-103.68,97.536L 152.32,230.144L 209.92,230.144 L 209.92,125.44 z" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/fonts/entypo.ttf b/app/assets/fonts/entypo.ttf index 0a114e0a..36560704 100644 Binary files a/app/assets/fonts/entypo.ttf and b/app/assets/fonts/entypo.ttf differ diff --git a/app/assets/fonts/entypo.woff b/app/assets/fonts/entypo.woff index 57cf5b47..97980df1 100644 Binary files a/app/assets/fonts/entypo.woff and b/app/assets/fonts/entypo.woff differ diff --git a/app/assets/fonts/fontawesome-webfont.eot b/app/assets/fonts/fontawesome-webfont.eot index 89070c1e..11d2f415 100644 Binary files a/app/assets/fonts/fontawesome-webfont.eot and b/app/assets/fonts/fontawesome-webfont.eot differ diff --git a/app/assets/fonts/fontawesome-webfont.ttf b/app/assets/fonts/fontawesome-webfont.ttf index c17e9f8d..88ef2622 100644 Binary files a/app/assets/fonts/fontawesome-webfont.ttf and b/app/assets/fonts/fontawesome-webfont.ttf differ diff --git a/app/assets/fonts/fontawesome-webfont.woff b/app/assets/fonts/fontawesome-webfont.woff index 09f2469a..7e892f87 100644 Binary files a/app/assets/fonts/fontawesome-webfont.woff and b/app/assets/fonts/fontawesome-webfont.woff differ diff --git a/app/assets/fonts/websymbols-regular-webfont.eot b/app/assets/fonts/websymbols-regular-webfont.eot deleted file mode 100644 index 4bf9c07a..00000000 Binary files a/app/assets/fonts/websymbols-regular-webfont.eot and /dev/null differ diff --git a/app/assets/fonts/websymbols-regular-webfont.svg b/app/assets/fonts/websymbols-regular-webfont.svg deleted file mode 100644 index ecf0e309..00000000 --- a/app/assets/fonts/websymbols-regular-webfont.svg +++ /dev/null @@ -1,108 +0,0 @@ - - - - -This is a custom SVG webfont generated by Font Squirrel. -Copyright : Copyright c 2011 by Just Be Nice studio All rights reserved -Designer : Igor Kiselev -Foundry : Just Be Nice studio -Foundry URL : httpwwwjustbenicestudiocom - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/assets/fonts/websymbols-regular-webfont.ttf b/app/assets/fonts/websymbols-regular-webfont.ttf deleted file mode 100644 index e7da1ba1..00000000 Binary files a/app/assets/fonts/websymbols-regular-webfont.ttf and /dev/null differ diff --git a/app/assets/fonts/websymbols-regular-webfont.woff b/app/assets/fonts/websymbols-regular-webfont.woff deleted file mode 100644 index a5f7f01c..00000000 Binary files a/app/assets/fonts/websymbols-regular-webfont.woff and /dev/null differ diff --git a/app/assets/images/module/default_widgets/style01.png b/app/assets/images/module/default_widgets/style01.png new file mode 100755 index 00000000..ff8c4cd6 Binary files /dev/null and b/app/assets/images/module/default_widgets/style01.png differ diff --git a/app/assets/images/module/default_widgets/style02.png b/app/assets/images/module/default_widgets/style02.png new file mode 100755 index 00000000..1eb8f85a Binary files /dev/null and b/app/assets/images/module/default_widgets/style02.png differ diff --git a/app/assets/images/module/default_widgets/style03.png b/app/assets/images/module/default_widgets/style03.png new file mode 100755 index 00000000..5620f2ba Binary files /dev/null and b/app/assets/images/module/default_widgets/style03.png differ diff --git a/app/assets/images/module/default_widgets/style04.png b/app/assets/images/module/default_widgets/style04.png new file mode 100755 index 00000000..1ea44651 Binary files /dev/null and b/app/assets/images/module/default_widgets/style04.png differ diff --git a/app/assets/images/module/default_widgets/style05.png b/app/assets/images/module/default_widgets/style05.png new file mode 100755 index 00000000..bcb38f25 Binary files /dev/null and b/app/assets/images/module/default_widgets/style05.png differ diff --git a/app/assets/javascripts/datetimepicker.js b/app/assets/javascripts/datetimepicker.js new file mode 100644 index 00000000..83408a24 --- /dev/null +++ b/app/assets/javascripts/datetimepicker.js @@ -0,0 +1,33 @@ +$(document).ready(function(){ + + $('.date_picker').datetimepicker({ + pickTime: false + }); + + $('.default_picker').datetimepicker(); + + $('.time_picker').datetimepicker({ + pickDate: false + }); + + $('.separated_picker div').on("changeDate",function(){ + if ($(this).hasClass('date_picker')) + { + if ($(this).find('input').val() && $(this).siblings('div').css('pointer-events')) + { + $(this).siblings('div').css('pointer-events', ''); + } + else + { + $(this).siblings('div').find('input').val(null); + $(this).siblings('div').css('pointer-events', 'none'); + } + } + $(this).siblings('input').val($(this).find('input').val() + ' ' + $(this).siblings('div').find('input').val()); + }); + + // $('.date_picker').on("changeDate",function(){ + // $(this).find('input').val(''); + // }); + +}); \ No newline at end of file diff --git a/app/assets/javascripts/desktop.js b/app/assets/javascripts/desktop.js index a0fad151..e5e4a05a 100644 --- a/app/assets/javascripts/desktop.js +++ b/app/assets/javascripts/desktop.js @@ -14,6 +14,5 @@ //= require orbitdesktopAPI //= require orbitTimeline //= require orbitdesktop -//= require desktop/journal_pages +//= require desktop/books_pages //= require desktop/seminar_pages -//= require desktop/books_pages \ No newline at end of file diff --git a/app/assets/javascripts/desktop/books_pages.js.erb b/app/assets/javascripts/desktop/books_pages.js similarity index 100% rename from app/assets/javascripts/desktop/books_pages.js.erb rename to app/assets/javascripts/desktop/books_pages.js diff --git a/app/assets/javascripts/desktop/seminar_pages.js.erb b/app/assets/javascripts/desktop/seminar_pages.js similarity index 100% rename from app/assets/javascripts/desktop/seminar_pages.js.erb rename to app/assets/javascripts/desktop/seminar_pages.js diff --git a/app/assets/javascripts/lib/bootstrap-datetimepicker.js b/app/assets/javascripts/lib/bootstrap-datetimepicker.js new file mode 100644 index 00000000..4c5e6c9d --- /dev/null +++ b/app/assets/javascripts/lib/bootstrap-datetimepicker.js @@ -0,0 +1,1164 @@ +/** + * @license + * ========================================================= + * bootstrap-datetimepicker.js + * http://www.eyecon.ro/bootstrap-datepicker + * ========================================================= + * Copyright 2012 Stefan Petre + * + * Contributions: + * - Andrew Rowls + * - Thiago de Arruda + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= + */ + +(function($) { + + // Picker object + var smartPhone = (window.orientation != undefined); + var DateTimePicker = function(element, options) { + this.id = dpgId++; + this.init(element, options); + }; + + DateTimePicker.prototype = { + constructor: DateTimePicker, + + init: function(element, options) { + var icon; + if (!(options.pickTime || options.pickDate)) + throw new Error('Must choose at least one picker'); + this.options = options; + this.$element = $(element); + this.language = options.language in dates ? options.language : 'en' + this.pickDate = options.pickDate; + this.pickTime = options.pickTime; + this.isInput = this.$element.is('input'); + // this.component = this.$element.is('.input-prepend') ? this.$element.find('.iconbtn') : false; + this.component = this.$element.is('.input-append') ? this.$element.find('.iconbtn') : false; + this.clearDate = this.$element.is('.input-append') ? this.$element.find('.clearDate') : false; + this.format = options.format; + if (!this.format) { + if (this.isInput) this.format = this.$element.data('format'); + else this.format = this.$element.find('input').data('format'); + if (!this.format) this.format = 'MM/dd/yyyy'; + } + this._compileFormat(); + if (this.component) { + icon = this.component.find('i'); + } + if (this.pickTime) { + if (icon && icon.length) this.timeIcon = icon.data('time-icon'); + if (!this.timeIcon) this.timeIcon = 'icon-time'; + icon.addClass(this.timeIcon); + } + if (this.pickDate) { + if (icon && icon.length) this.dateIcon = icon.data('date-icon'); + if (!this.dateIcon) this.dateIcon = 'icon-calendar'; + icon.removeClass(this.timeIcon); + icon.addClass(this.dateIcon); + } + this.widget = $(getTemplate(this.timeIcon, options.pickDate, options.pickTime, options.pick12HourFormat)).appendTo('body'); + this.minViewMode = options.minViewMode||this.$element.data('date-minviewmode')||0; + if (typeof this.minViewMode === 'string') { + switch (this.minViewMode) { + case 'months': + this.minViewMode = 1; + break; + case 'years': + this.minViewMode = 2; + break; + default: + this.minViewMode = 0; + break; + } + } + this.viewMode = options.viewMode||this.$element.data('date-viewmode')||0; + if (typeof this.viewMode === 'string') { + switch (this.viewMode) { + case 'months': + this.viewMode = 1; + break; + case 'years': + this.viewMode = 2; + break; + default: + this.viewMode = 0; + break; + } + } + this.startViewMode = this.viewMode; + this.weekStart = options.weekStart||this.$element.data('date-weekstart')||0; + this.weekEnd = this.weekStart === 0 ? 6 : this.weekStart - 1; + this.fillDow(); + this.fillMonths(); + this.fillHours(); + this.fillMinutes(); + this.fillSeconds(); + this.update(); + this.showMode(); + this._attachDatePickerEvents(); + }, + + show: function(e) { + this.widget.show(); + this.height = this.component ? this.component.outerHeight() : this.$element.outerHeight(); + this.width = this.component ? this.component.outerWidth() : this.$element.outerWidth(); + this.place(); + this.$element.trigger({ + type: 'show', + date: this._date + }); + this._attachDatePickerGlobalEvents(); + if (e) { + e.stopPropagation(); + e.preventDefault(); + } + }, + + hide: function() { + // Ignore event if in the middle of a picker transition + var collapse = this.widget.find('.collapse') + for (var i = 0; i < collapse.length; i++) { + var collapseData = collapse.eq(i).data('collapse'); + if (collapseData && collapseData.transitioning) + return; + } + this.widget.hide(); + this.viewMode = this.startViewMode; + this.showMode(); + // this.set(); + this.$element.trigger({ + type: 'hide', + date: this._date + }); + this.actions.showPicker.call(this); + this._detachDatePickerGlobalEvents(); + }, + + set: function() { + var formatted = ''; + if (!this._unset) formatted = this.formatDate(this._date); + if (!this.isInput) { + if (this.component){ + var input = this.$element.find('input'); + input.val(formatted); + this._resetMaskPos(input); + } + this.$element.data('date', formatted); + } else { + this.$element.val(formatted); + this._resetMaskPos(this.$element); + } + }, + + setValue: function(newDate) { + if (!newDate) { + this._unset = true; + } else { + this._unset = false; + } + if (typeof newDate === 'string') { + this._date = this.parseDate(newDate); + } else { + this._date = new Date(newDate); + } + this.set(); + this.viewDate = UTCDate(this._date.getUTCFullYear(), this._date.getUTCMonth(), 1, 0, 0, 0, 0); + this.fillDate(); + this.fillTime(); + }, + + getDate: function() { + if (this._unset) return null; + return new Date(this._date.valueOf()); + }, + + setDate: function(date) { + if (!date) this.setValue(null); + else this.setValue(date.valueOf()); + }, + + getLocalDate: function() { + if (this._unset) return null; + var d = this._date; + return new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), + d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), d.getUTCMilliseconds()); + }, + + setLocalDate: function(localDate) { + if (!localDate) this.setValue(null); + else + this.setValue(Date.UTC( + localDate.getFullYear(), + localDate.getMonth(), + localDate.getDate(), + localDate.getHours(), + localDate.getMinutes(), + localDate.getSeconds(), + localDate.getMilliseconds())); + }, + + place: function(){ + var offset = this.component ? this.component.offset() : this.$element.offset(), + input = this.$element.find('input'); + this.widget.css({ + top: offset.top + this.height, + left: offset.left - input.outerWidth() - this.width, + }); + }, + + notifyChange: function(){ + this.$element.trigger({ + type: 'changeDate', + date: this.getDate(), + localDate: this.getLocalDate() + }); + }, + + update: function(newDate){ + var dateStr = newDate; + if (!dateStr) { + if (this.isInput) { + dateStr = this.$element.val(); + } else { + dateStr = this.$element.find('input').val(); + } + if (!dateStr) { + var tmp = new Date() + this._date = UTCDate(tmp.getFullYear(), + tmp.getMonth(), + tmp.getDate(), + tmp.getHours(), + tmp.getMinutes(), + tmp.getSeconds(), + tmp.getMilliseconds()) + } else { + this._date = this.parseDate(dateStr); + } + } + this.viewDate = UTCDate(this._date.getUTCFullYear(), this._date.getUTCMonth(), 1, 0, 0, 0, 0); + this.fillDate(); + this.fillTime(); + }, + + fillDow: function() { + var dowCnt = this.weekStart; + var html = ''; + while (dowCnt < this.weekStart + 7) { + html += '' + dates[this.language].daysMin[(dowCnt++) % 7] + ''; + } + html += ''; + this.widget.find('.datepicker-days thead').append(html); + }, + + fillMonths: function() { + var html = ''; + var i = 0 + while (i < 12) { + html += '' + dates[this.language].monthsShort[i++] + ''; + } + this.widget.find('.datepicker-months td').append(html); + }, + + fillDate: function() { + var year = this.viewDate.getUTCFullYear(); + var month = this.viewDate.getUTCMonth(); + var currentDate = UTCDate( + this._date.getUTCFullYear(), + this._date.getUTCMonth(), + this._date.getUTCDate(), + 0, 0, 0, 0 + ); + this.widget.find('.datepicker-days th:eq(1)').text( + dates[this.language].months[month] + ' ' + year); + var prevMonth = UTCDate(year, month-1, 28, 0, 0, 0, 0); + var day = DPGlobal.getDaysInMonth( + prevMonth.getUTCFullYear(), prevMonth.getUTCMonth()); + prevMonth.setUTCDate(day); + prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.weekStart + 7) % 7); + var nextMonth = new Date(prevMonth.valueOf()); + nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); + nextMonth = nextMonth.valueOf(); + var html = []; + var clsName; + while (prevMonth.valueOf() < nextMonth) { + if (prevMonth.getUTCDay() === this.weekStart) { + html.push(''); + } + clsName = ''; + if (prevMonth.getUTCFullYear() < year || + (prevMonth.getUTCFullYear() == year && + prevMonth.getUTCMonth() < month)) { + clsName += ' old'; + } else if (prevMonth.getUTCFullYear() > year || + (prevMonth.getUTCFullYear() == year && + prevMonth.getUTCMonth() > month)) { + clsName += ' new'; + } + if (prevMonth.valueOf() === currentDate.valueOf()) { + clsName += ' active'; + } + html.push('' + prevMonth.getUTCDate() + ''); + if (prevMonth.getUTCDay() === this.weekEnd) { + html.push(''); + } + prevMonth.setUTCDate(prevMonth.getUTCDate() + 1); + } + this.widget.find('.datepicker-days tbody').empty().append(html.join('')); + var currentYear = this._date.getUTCFullYear(); + + var months = this.widget.find('.datepicker-months').find( + 'th:eq(1)').text(year).end().find('span').removeClass('active'); + if (currentYear === year) { + months.eq(this._date.getUTCMonth()).addClass('active'); + } + + html = ''; + year = parseInt(year/10, 10) * 10; + var yearCont = this.widget.find('.datepicker-years').find( + 'th:eq(1)').text(year + '-' + (year + 9)).end().find('td'); + year -= 1; + for (var i = -1; i < 11; i++) { + html += '' + year + ''; + year += 1; + } + yearCont.html(html); + }, + + fillHours: function() { + var table = this.widget.find( + '.timepicker .timepicker-hours table'); + table.parent().hide(); + var html = ''; + if (this.options.pick12HourFormat) { + var current = 1; + for (var i = 0; i < 3; i += 1) { + html += ''; + for (var j = 0; j < 4; j += 1) { + var c = current.toString(); + html += '' + padLeft(c, 2, '0') + ''; + current++; + } + html += '' + } + } else { + var current = 0; + for (var i = 0; i < 6; i += 1) { + html += ''; + for (var j = 0; j < 4; j += 1) { + var c = current.toString(); + html += '' + padLeft(c, 2, '0') + ''; + current++; + } + html += '' + } + } + table.html(html); + }, + + fillMinutes: function() { + var table = this.widget.find( + '.timepicker .timepicker-minutes table'); + table.parent().hide(); + var html = ''; + var current = 0; + for (var i = 0; i < 3; i++) { + html += ''; + for (var j = 0; j < 4; j += 1) { + var c = current.toString(); + html += '' + padLeft(c, 2, '0') + ''; + current += 5; + } + html += ''; + } + table.html(html); + }, + + fillSeconds: function() { + var table = this.widget.find( + '.timepicker .timepicker-seconds table'); + table.parent().hide(); + var html = ''; + var current = 0; + for (var i = 0; i < 5; i++) { + html += ''; + for (var j = 0; j < 4; j += 1) { + var c = current.toString(); + html += '' + padLeft(c, 2, '0') + ''; + current += 3; + } + html += ''; + } + table.html(html); + }, + + fillTime: function() { + if (!this._date) + return; + var timeComponents = this.widget.find('.timepicker span[data-time-component]'); + var table = timeComponents.closest('table'); + var is12HourFormat = this.options.pick12HourFormat; + var hour = this._date.getUTCHours(); + var period = 'AM'; + if (is12HourFormat) { + if (hour >= 12) period = 'PM'; + if (hour === 0) hour = 12; + else if (hour != 12) hour = hour % 12; + this.widget.find( + '.timepicker [data-action=togglePeriod]').text(period); + } + hour = padLeft(hour.toString(), 2, '0'); + var minute = padLeft(this._date.getUTCMinutes().toString(), 2, '0'); + var second = padLeft(this._date.getUTCSeconds().toString(), 2, '0'); + timeComponents.filter('[data-time-component=hours]').text(hour); + timeComponents.filter('[data-time-component=minutes]').text(minute); + timeComponents.filter('[data-time-component=seconds]').text(second); + }, + + click: function(e) { + e.stopPropagation(); + e.preventDefault(); + var target = $(e.target).closest('span, td, th'); + if (target.length === 1) { + switch(target[0].nodeName.toLowerCase()) { + case 'th': + switch(target[0].className) { + case 'switch': + this.showMode(1); + break; + case 'prev': + case 'next': + var vd = this.viewDate; + var navFnc = DPGlobal.modes[this.viewMode].navFnc; + var step = DPGlobal.modes[this.viewMode].navStep; + if (target[0].className === 'prev') step = step * -1; + vd['set' + navFnc](vd['get' + navFnc]() + step); + this.fillDate(); + this.set(); + break; + } + break; + case 'span': + if (target.is('.month')) { + var month = target.parent().find('span').index(target); + this.viewDate.setUTCMonth(month); + } else { + var year = parseInt(target.text(), 10) || 0; + this.viewDate.setUTCFullYear(year); + } + if (this.viewMode !== 0) { + this._date = UTCDate( + this.viewDate.getUTCFullYear(), + this.viewDate.getUTCMonth(), + this.viewDate.getUTCDate(), + this._date.getUTCHours(), + this._date.getUTCMinutes(), + this._date.getUTCSeconds(), + this._date.getUTCMilliseconds() + ); + this.notifyChange(); + } + this.showMode(-1); + this.fillDate(); + this.set(); + break; + case 'td': + if (target.is('.day')) { + var day = parseInt(target.text(), 10) || 1; + var month = this.viewDate.getUTCMonth(); + var year = this.viewDate.getUTCFullYear(); + if (target.is('.old')) { + if (month === 0) { + month = 11; + year -= 1; + } else { + month -= 1; + } + } else if (target.is('.new')) { + if (month == 11) { + month = 0; + year += 1; + } else { + month += 1; + } + } + this._date = UTCDate( + year, month, day, + this._date.getUTCHours(), + this._date.getUTCMinutes(), + this._date.getUTCSeconds(), + this._date.getUTCMilliseconds() + ); + this.viewDate = UTCDate( + year, month, Math.min(28, day) , 0, 0, 0, 0); + this.fillDate(); + this.set(); + this.notifyChange(); + this.widget.hide(); + } + break; + } + } + }, + + actions: { + incrementHours: function(e) { + this._date.setUTCHours(this._date.getUTCHours() + 1); + }, + + incrementMinutes: function(e) { + this._date.setUTCMinutes(this._date.getUTCMinutes() + 1); + }, + + // incrementSeconds: function(e) { + // this._date.setUTCSeconds(this._date.getUTCSeconds() + 1); + // }, + + decrementHours: function(e) { + this._date.setUTCHours(this._date.getUTCHours() - 1); + }, + + decrementMinutes: function(e) { + this._date.setUTCMinutes(this._date.getUTCMinutes() - 1); + }, + + // decrementSeconds: function(e) { + // this._date.setUTCSeconds(this._date.getUTCSeconds() - 1); + // }, + + togglePeriod: function(e) { + var hour = this._date.getUTCHours(); + if (hour >= 12) hour -= 12; + else hour += 12; + this._date.setUTCHours(hour); + }, + + showPicker: function() { + this.widget.find('.timepicker > div:not(.timepicker-picker)').hide(); + this.widget.find('.timepicker .timepicker-picker').show(); + }, + + showHours: function() { + this.widget.find('.timepicker .timepicker-picker').hide(); + this.widget.find('.timepicker .timepicker-hours').show(); + }, + + showMinutes: function() { + this.widget.find('.timepicker .timepicker-picker').hide(); + this.widget.find('.timepicker .timepicker-minutes').show(); + }, + + // showSeconds: function() { + // this.widget.find('.timepicker .timepicker-picker').hide(); + // this.widget.find('.timepicker .timepicker-seconds').show(); + // }, + + selectHour: function(e) { + var tgt = $(e.target); + var value = parseInt(tgt.text(), 10); + if (this.options.pick12HourFormat) { + var current = this._date.getUTCHours(); + if (current >= 12) { + if (value != 12) value = (value + 12) % 24; + } else { + if (value === 12) value = 0; + else value = value % 12; + } + } + this._date.setUTCHours(value); + this.actions.showPicker.call(this); + }, + + selectMinute: function(e) { + var tgt = $(e.target); + var value = parseInt(tgt.text(), 10); + this._date.setUTCMinutes(value); + this.actions.showPicker.call(this); + }, + + // selectSecond: function(e) { + // var tgt = $(e.target); + // var value = parseInt(tgt.text(), 10); + // this._date.setUTCSeconds(value); + // this.actions.showPicker.call(this); + // } + }, + + doAction: function(e) { + e.stopPropagation(); + e.preventDefault(); + if (!this._date) this._date = UTCDate(1970, 0, 0, 0, 0, 0, 0); + var action = $(e.currentTarget).data('action'); + var rv = this.actions[action].apply(this, arguments); + this.set(); + this.fillTime(); + this.notifyChange(); + return rv; + }, + + stopEvent: function(e) { + e.stopPropagation(); + e.preventDefault(); + }, + + // part of the following code was taken from + // http://cloud.github.com/downloads/digitalBush/jquery.maskedinput/jquery.maskedinput-1.3.js + keydown: function(e) { + var self = this, k = e.which, input = $(e.target); + if (k == 8 || k == 46) { + // backspace and delete cause the maskPosition + // to be recalculated + setTimeout(function() { + self._resetMaskPos(input); + }); + } + }, + + keypress: function(e) { + var k = e.which; + if (k == 8 || k == 46) { + // For those browsers which will trigger + // keypress on backspace/delete + return; + } + var input = $(e.target); + var c = String.fromCharCode(k); + var val = input.val() || ''; + val += c; + var mask = this._mask[this._maskPos]; + if (!mask) { + return false; + } + if (mask.end != val.length) { + return; + } + if (!mask.pattern.test(val.slice(mask.start))) { + val = val.slice(0, val.length - 1); + while ((mask = this._mask[this._maskPos]) && mask.character) { + val += mask.character; + // advance mask position past static + // part + this._maskPos++; + } + val += c; + if (mask.end != val.length) { + input.val(val); + return false; + } else { + if (!mask.pattern.test(val.slice(mask.start))) { + input.val(val.slice(0, mask.start)); + return false; + } else { + input.val(val); + this._maskPos++; + return false; + } + } + } else { + this._maskPos++; + } + }, + + change: function(e) { + var input = $(e.target); + var val = input.val(); + if (this._formatPattern.test(val)) { + this.update(); + this.setValue(this._date.getTime()); + this.notifyChange(); + this.set(); + } else if (val && val.trim()) { + this.setValue(this._date.getTime()); + if (this._date) this.set(); + else input.val(''); + } else { + if (this._date) { + this.setValue(null); + // unset the date when the input is + // erased + this.notifyChange(); + } + } + this._resetMaskPos(input); + }, + + clear: function(e) { + if (this.isInput) this.$element.val(null); + else this.$element.find('input').val(null); + this.notifyChange(); + }, + + showMode: function(dir) { + if (dir) { + this.viewMode = Math.max(this.minViewMode, Math.min( + 2, this.viewMode + dir)); + } + this.widget.find('.datepicker > div').hide().filter( + '.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show(); + }, + + destroy: function() { + this._detachDatePickerEvents(); + this._detachDatePickerGlobalEvents(); + this.widget.remove(); + this.$element.removeData('datetimepicker'); + this.component.removeData('datetimepicker'); + }, + + formatDate: function(d) { + return this.format.replace(formatReplacer, function(match) { + var methodName, property, rv, len = match.length; + if (match === 'ms') + len = 1; + property = dateFormatComponents[match].property + if (property === 'Hours12') { + rv = d.getUTCHours(); + if (rv === 0) rv = 12; + else if (rv !== 12) rv = rv % 12; + } else if (property === 'Period12') { + if (d.getUTCHours() >= 12) return 'PM'; + else return 'AM'; + } else { + methodName = 'get' + property; + rv = d[methodName](); + } + if (methodName === 'getUTCMonth') rv = rv + 1; + if (methodName === 'getUTCYear') rv = rv + 1900 - 2000; + return padLeft(rv.toString(), len, '0'); + }); + }, + + parseDate: function(str) { + var match, i, property, methodName, value, parsed = {}; + if (!(match = this._formatPattern.exec(str))) + return null; + for (i = 1; i < match.length; i++) { + property = this._propertiesByIndex[i]; + if (!property) + continue; + value = match[i]; + if (/^\d+$/.test(value)) + value = parseInt(value, 10); + parsed[property] = value; + } + return this._finishParsingDate(parsed); + }, + + _resetMaskPos: function(input) { + var val = input.val(); + for (var i = 0; i < this._mask.length; i++) { + if (this._mask[i].end > val.length) { + // If the mask has ended then jump to + // the next + this._maskPos = i; + break; + } else if (this._mask[i].end === val.length) { + this._maskPos = i + 1; + break; + } + } + }, + + _finishParsingDate: function(parsed) { + var year, month, date, hours, minutes, seconds, milliseconds; + year = parsed.UTCFullYear; + if (parsed.UTCYear) year = 2000 + parsed.UTCYear; + if (!year) year = 1970; + if (parsed.UTCMonth) month = parsed.UTCMonth - 1; + else month = 0; + date = parsed.UTCDate || 1; + hours = parsed.UTCHours || 0; + minutes = parsed.UTCMinutes || 0; + seconds = parsed.UTCSeconds || 0; + milliseconds = parsed.UTCMilliseconds || 0; + if (parsed.Hours12) { + hours = parsed.Hours12; + } + if (parsed.Period12) { + if (/pm/i.test(parsed.Period12)) { + if (hours != 12) hours = (hours + 12) % 24; + } else { + hours = hours % 12; + } + } + return UTCDate(year, month, date, hours, minutes, seconds, milliseconds); + }, + + _compileFormat: function () { + var match, component, components = [], mask = [], + str = this.format, propertiesByIndex = {}, i = 0, pos = 0; + while (match = formatComponent.exec(str)) { + component = match[0]; + if (component in dateFormatComponents) { + i++; + propertiesByIndex[i] = dateFormatComponents[component].property; + components.push('\\s*' + dateFormatComponents[component].getPattern( + this) + '\\s*'); + mask.push({ + pattern: new RegExp(dateFormatComponents[component].getPattern( + this)), + property: dateFormatComponents[component].property, + start: pos, + end: pos += component.length + }); + } + else { + components.push(escapeRegExp(component)); + mask.push({ + pattern: new RegExp(escapeRegExp(component)), + character: component, + start: pos, + end: ++pos + }); + } + str = str.slice(component.length); + } + this._mask = mask; + this._maskPos = 0; + this._formatPattern = new RegExp( + '^\\s*' + components.join('') + '\\s*$'); + this._propertiesByIndex = propertiesByIndex; + }, + + _attachDatePickerEvents: function() { + var self = this; + // this handles date picker clicks + this.widget.on('click', '.datepicker *', $.proxy(this.click, this)); + // this handles time picker clicks + this.widget.on('click', '[data-action]', $.proxy(this.doAction, this)); + this.widget.on('mousedown', $.proxy(this.stopEvent, this)); + this.clearDate.on('click', $.proxy(this.clear, this)); + if (this.pickDate && this.pickTime) { + this.widget.on('click.togglePicker', '.accordion-toggle', function(e) { + e.stopPropagation(); + var $this = $(this); + var $parent = $this.closest('ul'); + var expanded = $parent.find('.collapse.in'); + var closed = $parent.find('.collapse:not(.in)'); + + if (expanded && expanded.length) { + var collapseData = expanded.data('collapse'); + if (collapseData && collapseData.transitioning) return; + expanded.collapse('hide'); + closed.collapse('show') + $this.find('i').toggleClass(self.timeIcon + ' ' + self.dateIcon); + self.$element.find('.iconbtn i').toggleClass(self.timeIcon + ' ' + self.dateIcon); + } + }); + } + if (this.isInput) { + this.$element.on({ + 'focus': $.proxy(this.show, this), + 'blur': $.proxy(this.hide, this), + 'change': $.proxy(this.change, this), + }); + if (this.options.maskInput) { + this.$element.on({ + 'keydown': $.proxy(this.keydown, this), + 'keypress': $.proxy(this.keypress, this) + }); + } + } else { + this.$element.on({ + 'focus': $.proxy(this.show, this), + 'blur': $.proxy(this.hide, this), + 'change': $.proxy(this.change, this), + }, 'input'); + if (this.options.maskInput) { + this.$element.on({ + 'keydown': $.proxy(this.keydown, this), + 'keypress': $.proxy(this.keypress, this) + }, 'input'); + } + if (this.component){ + this.component.on('click', $.proxy(this.show, this)); + } else { + this.$element.on('click', $.proxy(this.show, this)); + } + } + }, + + _attachDatePickerGlobalEvents: function() { + $(window).on( + 'resize.datetimepicker' + this.id, $.proxy(this.place, this)); + if (!this.isInput) { + $(document).on( + 'mousedown.datetimepicker' + this.id, $.proxy(this.hide, this)); + } + }, + + _detachDatePickerEvents: function() { + this.widget.off('click', '.datepicker *', this.click); + this.widget.off('click', '[data-action]'); + this.widget.off('mousedown', this.stopEvent); + if (this.pickDate && this.pickTime) { + this.widget.off('click.togglePicker'); + } + if (this.isInput) { + this.$element.off({ + 'focus': this.show, + 'change': this.change, + }); + if (this.options.maskInput) { + this.$element.off({ + 'keydown': this.keydown, + 'keypress': this.keypress + }); + } + } else { + this.$element.off({ + 'change': this.change, + }, 'input'); + if (this.options.maskInput) { + this.$element.off({ + 'keydown': this.keydown, + 'keypress': this.keypress + }, 'input'); + } + if (this.component){ + this.component.off('click', this.show); + } else { + this.$element.off('click', this.show); + } + } + }, + + _detachDatePickerGlobalEvents: function () { + $(window).off('resize.datetimepicker' + this.id); + if (!this.isInput) { + $(document).off('mousedown.datetimepicker' + this.id); + } + } + }; + + $.fn.datetimepicker = function ( option, val ) { + return this.each(function () { + var $this = $(this), + data = $this.data('datetimepicker'), + options = typeof option === 'object' && option; + if (!data) { + $this.data('datetimepicker', (data = new DateTimePicker( + this, $.extend({}, $.fn.datetimepicker.defaults,options)))); + } + if (typeof option === 'string') data[option](val); + }); + }; + + $.fn.datetimepicker.defaults = { + maskInput: true, + pickDate: true, + pickTime: true, + pick12HourFormat: false + }; + $.fn.datetimepicker.Constructor = DateTimePicker; + var dpgId = 0; + var dates = $.fn.datetimepicker.dates = { + en: { + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", + "Friday", "Saturday", "Sunday"], + daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], + daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], + months: ["January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December"], + monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", + "Aug", "Sep", "Oct", "Nov", "Dec"] + } + }; + + var dateFormatComponents = { + dd: {property: 'UTCDate', getPattern: function() { return '(0?[1-9]|[1-2][0-9]|3[0-1])\\b';}}, + MM: {property: 'UTCMonth', getPattern: function() {return '(0?[1-9]|1[0-2])\\b';}}, + yy: {property: 'UTCYear', getPattern: function() {return '(\\d{2})\\b'}}, + yyyy: {property: 'UTCFullYear', getPattern: function() {return '(\\d{4})\\b';}}, + hh: {property: 'UTCHours', getPattern: function() {return '(0?[0-9]|1[0-9]|2[0-3])\\b';}}, + mm: {property: 'UTCMinutes', getPattern: function() {return '(0?[0-9]|[1-5][0-9])\\b';}}, + ss: {property: 'UTCSeconds', getPattern: function() {return '(0?[0-9]|[1-5][0-9])\\b';}}, + ms: {property: 'UTCMilliseconds', getPattern: function() {return '([0-9]{1,3})\\b';}}, + HH: {property: 'Hours12', getPattern: function() {return '(0?[1-9]|1[0-2])\\b';}}, + PP: {property: 'Period12', getPattern: function() {return '(AM|PM|am|pm|Am|aM|Pm|pM)\\b';}} + }; + + var keys = []; + for (var k in dateFormatComponents) keys.push(k); + keys[keys.length - 1] += '\\b'; + keys.push('.'); + + var formatComponent = new RegExp(keys.join('\\b|')); + keys.pop(); + var formatReplacer = new RegExp(keys.join('\\b|'), 'g'); + + function escapeRegExp(str) { + // http://stackoverflow.com/questions/3446170/escape-string-for-use-in-javascript-regex + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + } + + function padLeft(s, l, c) { + if (l < s.length) return s; + else return Array(l - s.length + 1).join(c || ' ') + s; + } + + function getTemplate(timeIcon, pickDate, pickTime, is12Hours) { + if (pickDate && pickTime) { + return ( + '' + ); + } else if (pickTime) { + return ( + '' + ); + } else { + return ( + '' + ); + } + } + + function UTCDate() { + return new Date(Date.UTC.apply(Date, arguments)); + } + + var DPGlobal = { + modes: [ + { + clsName: 'days', + navFnc: 'UTCMonth', + navStep: 1 + }, + { + clsName: 'months', + navFnc: 'UTCFullYear', + navStep: 1 + }, + { + clsName: 'years', + navFnc: 'UTCFullYear', + navStep: 10 + }], + isLeapYear: function (year) { + return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)) + }, + getDaysInMonth: function (year, month) { + return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month] + }, + headTemplate: + '' + + '' + + '‹' + + '' + + '›' + + '' + + '', + contTemplate: '' + }; + DPGlobal.template = + '
' + + '' + + DPGlobal.headTemplate + + '' + + '
' + + '
' + + '
' + + '' + + DPGlobal.headTemplate + + DPGlobal.contTemplate+ + '
'+ + '
'+ + '
'+ + ''+ + DPGlobal.headTemplate+ + DPGlobal.contTemplate+ + '
'+ + '
'; + var TPGlobal = { + hourTemplate: '', + minuteTemplate: '', + // secondTemplate: '', + }; + TPGlobal.getTemplate = function(is12Hours) { + return ( + '
' + + '' + + '' + + '' + + '' + + '' + + // '' + + // '' + + // (is12Hours ? '' : '') + + '' + + '' + + ' ' + + '' + + ' ' + + // '' + + // '' + + (is12Hours ? + '' + + '' : '') + + '' + + '' + + '' + + '' + + '' + + // '' + + // '' + + // (is12Hours ? '' : '') + + '' + + '
' + TPGlobal.hourTemplate + ':' + TPGlobal.minuteTemplate + ':' + TPGlobal.secondTemplate + '' + + '' + + '
' + + '
' + + '
' + + '' + + '
'+ + '
'+ + '
' + + '' + + '
'+ + // '
'+ + // '
' + + // '' + + // '
'+ + '
' + ); + } + + +})(window.jQuery) diff --git a/app/assets/javascripts/mobile/orbit.mobile.js.erb b/app/assets/javascripts/mobile/orbit.mobile.js.erb index d8c647e2..2a567730 100644 --- a/app/assets/javascripts/mobile/orbit.mobile.js.erb +++ b/app/assets/javascripts/mobile/orbit.mobile.js.erb @@ -37,7 +37,7 @@ $('#index').live('pageinit',function(){ // $('.newlist').swipePlanes(); // }, 1000); }); -$('#news_content').live('pageinit',function(){ +$('#announcement_content').live('pageinit',function(){ $(this).find(".newpic img").muImageResize({width: 320, height: 220}); }); var mobileDemo = { 'center': '24.987449, 121.576117', 'zoom': 17 }; @@ -113,8 +113,8 @@ $(window).bind("orientationchange", function(){ $(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)}); $('.slideshow').cycle({ - fx:'scrollLeft', - timeout: 6000, + fx: $effect, + timeout: $timeout }); $(".newlist").css({ diff --git a/app/assets/javascripts/new_admin.js b/app/assets/javascripts/new_admin.js index 732eef1b..c5ec022e 100644 --- a/app/assets/javascripts/new_admin.js +++ b/app/assets/javascripts/new_admin.js @@ -19,4 +19,6 @@ //= require side_bar_history //= require rss //= require ajax_form -//= require inc/ajax_setting \ No newline at end of file +//= require inc/ajax_setting +//= require lib/bootstrap-datetimepicker +//= require datetimepicker \ No newline at end of file diff --git a/app/assets/javascripts/page_edit.js.erb b/app/assets/javascripts/page_edit.js.erb index 29047c7b..aec24de6 100644 --- a/app/assets/javascripts/page_edit.js.erb +++ b/app/assets/javascripts/page_edit.js.erb @@ -1,5 +1,11 @@ function get_part_id(){ - return $(".edit_page_part").attr("action").split('/').pop(); + return $(".edit_page_part,.edit_page").attr("action").split('/').pop(); +} + +function get_object_path(){ + a = window.location.href.split('/'); + a.pop(); + return a.join('/'); } $("div.editable").live("mouseenter mouseleave", function (event) { @@ -10,26 +16,26 @@ $("#page_design").live('change', function() { $.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_themes'); }); -$("#page_module_app_id").live('change', function() { - var app_id = $(this).val(); - if(app_id!=''){ - $.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_frontend_pages',function(data, textStatus){ - if(textStatus == 'success'){ - $(this).after(data); - } - }); - } - else{ - $("#app_page_url").children().remove(); - } -}); +// $("#page_module_app_id").live('change', function() { +// var app_id = $(this).val(); +// if(app_id!=''){ +// $.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_after_module_changed',function(data, textStatus){ +// if(textStatus == 'success'){ +// $(this).after(data); +// } +// }); +// } +// else{ +// $("#app_page_url").children().remove(); +// } +// }); $("#module_app_list select").live('change', function() { - $.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_widgets?part_id=' + get_part_id()); + $.getScript(get_object_path() + '/reload_after_module_changed?module_app_id='+$(this).val()); //?part_id=' + get_part_id()); }); -$("#widget_list select").live('change', function() { - $.getScript($(this).attr('rel') + '/' + $(this).val() + '/reload_widget_styles?module_app_id=' + $("#module_app_list select").val() + '&part_id=' + get_part_id()); +$("#widget_list select,#frontend_list select").live('change', function() { + $.getScript(get_object_path() +'/reload_after_list_changed?frontend=' + $(this).val() + '&module_app_id=' + $("#module_app_list select").val() );//+ '&part_id=' + get_part_id()); }); $("#tag_list select").live('change', function() { diff --git a/app/assets/stylesheets/admin/default_widget_setting.css b/app/assets/stylesheets/admin/default_widget_setting.css new file mode 100644 index 00000000..8bbe4a50 --- /dev/null +++ b/app/assets/stylesheets/admin/default_widget_setting.css @@ -0,0 +1,31 @@ +label{ + white-space: nowrap !important; +} +.style_switch{} + +.style_switch ul{ + margin: 0; +} + +.style_switch li{ + float: left; + list-style: none outside none; + margin: 0 30px 0 0; + width: 103px; +} +.style_radio{ + cursor: pointer; + margin: 0 0 0 10px; +} +.style_img{ + display: block; + margin: 5px 0 5px -28px; +} + +.style_description{ + color: #6B6B6B; + display: block; + font-size: 12px; + margin: 0 0 0 -25px; + white-space: normal; +} diff --git a/app/assets/stylesheets/default_widget.css b/app/assets/stylesheets/default_widget.css index 5c15ac02..86681feb 100644 --- a/app/assets/stylesheets/default_widget.css +++ b/app/assets/stylesheets/default_widget.css @@ -1,49 +1,49 @@ /* 1 */ -.defulat_widget_typeA{ +.default_widget_typeA{ font: 12px/100% 'open sans',sans-serif; margin:0 0 20px; } -.defulat_widget_tb{ +.default_widget_tb{ border-collapse:collapse; width:100%; } -.defulat_widget_tb th{ +.default_widget_tb th{ background: none repeat scroll 0 0 #333333; color: #FFFFFF; padding: 10px; text-align: left; } -.defulat_widget_tb td{ +.default_widget_tb td{ border-bottom: 1px solid #AAAAAA; padding: 10px; vertical-align: top; white-space: normal; word-wrap: break-word; } -.defulat_widget_tb .date{ +.default_widget_tb .date{ display: block; max-width: 80px; } -.defulat_widget_tb .category{ +.default_widget_tb .category{ display: block; max-width: 100px; } /* 2 */ -.defulat_widget_typeB_style2{ +.default_widget_typeB_style2{ font: 12px/100% 'open sans',sans-serif; margin:0 0 20px; } -.defulat_widget_typeB_style2 ul{ +.default_widget_typeB_style2 ul{ margin: 0; padding: 0; } -.defulat_widget_typeB_style2 li{ +.default_widget_typeB_style2 li{ border-bottom: 1px solid #AAAAAA; clear: both; margin: 0 0 10px; @@ -52,7 +52,7 @@ } -.defulat_widget_typeB_style2 .app-pic{ +.default_widget_typeB_style2 .app-pic{ background: none repeat scroll 0 0 #AAAAAA; border-radius: 3px; float:left; @@ -61,28 +61,28 @@ overflow: hidden; width: 50px; } -.defulat_widget_typeB_style2 img{ +.default_widget_typeB_style2 img{ height:50px; width:50px; } -.defulat_widget_typeB_style2 span{ +.default_widget_typeB_style2 span{ display: inline; margin: 0 10px 0 0; } /* 3 */ -.defulat_widget_typeB_style3{ +.default_widget_typeB_style3{ font: 12px/100% 'open sans',sans-serif; margin:0 0 20px; } -.defulat_widget_typeB_style3 ul{ +.default_widget_typeB_style3 ul{ margin: 0; padding: 0; } -.defulat_widget_typeB_style3 li{ +.default_widget_typeB_style3 li{ border-bottom: 1px solid #AAAAAA; clear: both; margin: 0 0 10px; @@ -90,7 +90,7 @@ padding: 0 0 10px; } -.defulat_widget_typeB_style3 .app-pic{ +.default_widget_typeB_style3 .app-pic{ background: none repeat scroll 0 0 #AAAAAA; border-radius: 3px; float: left; @@ -100,16 +100,16 @@ width: 50px; } -.defulat_widget_typeB_style3 span{ +.default_widget_typeB_style3 span{ display:block; margin:0 0 5px; text-align: left; } -.defulat_widget_typeB_style3 .wrap{ +.default_widget_typeB_style3 .wrap{ overflow: hidden; } -.defulat_widget_typeB_style3 img{ +.default_widget_typeB_style3 img{ height:50px; width:50px; } @@ -118,16 +118,16 @@ /* 4 */ -.defulat_widget_typeB_style4{ +.default_widget_typeB_style4{ font: 12px/100% 'open sans',sans-serif; margin:0 0 20px; } -.defulat_widget_typeB_style4 ul{ +.default_widget_typeB_style4 ul{ margin: 0; padding: 0; } -.defulat_widget_typeB_style4 li{ +.default_widget_typeB_style4 li{ border-bottom: 1px solid #AAAAAA; clear: both; margin: 0 0 10px; @@ -135,7 +135,7 @@ padding: 0 0 10px; } -.defulat_widget_typeB_style4 .app-pic{ +.default_widget_typeB_style4 .app-pic{ background: none repeat scroll 0 0 #AAAAAA; border-radius: 3px; float: right; @@ -145,16 +145,16 @@ width: 50px; } -.defulat_widget_typeB_style4 span{ +.default_widget_typeB_style4 span{ display:block; margin:0 0 5px; text-align: left; } -.defulat_widget_typeB_style4 .wrap{ +.default_widget_typeB_style4 .wrap{ overflow: hidden; } -.defulat_widget_typeB_style4 img{ +.default_widget_typeB_style4 img{ height:50px; width:50px; } @@ -162,16 +162,16 @@ /* 5 */ -.defulat_widget_typeC{ +.default_widget_typeC{ font: 12px/100% 'open sans',sans-serif; margin: 0 0 20px; position: relative; } -.defulat_widget_typeC ul{ +.default_widget_typeC ul{ margin: 0 0 0 70px; padding: 0; } -.defulat_widget_typeC li{ +.default_widget_typeC li{ border-bottom: 1px solid #AAAAAA; clear: both; margin: 0 0 10px; @@ -179,7 +179,7 @@ padding: 0 0 10px; } -.defulat_widget_typeC .app-pic{ +.default_widget_typeC .app-pic{ background: none repeat scroll 0 0 #AAAAAA; border-radius: 3px 3px 3px 3px; height: 50px; @@ -191,16 +191,16 @@ width: 50px; } -.defulat_widget_typeC span{ +.default_widget_typeC span{ display:block; margin:0 0 5px; text-align: left; } -.defulat_widget_typeC .wrap{ +.default_widget_typeC .wrap{ overflow: hidden; } -.defulat_widget_typeC img{ +.default_widget_typeC img{ height:50px; width:50px; -} \ No newline at end of file +} diff --git a/app/assets/stylesheets/font-awesome.css.erb b/app/assets/stylesheets/font-awesome.css.erb old mode 100644 new mode 100755 index 00b36d14..8e86a27e --- a/app/assets/stylesheets/font-awesome.css.erb +++ b/app/assets/stylesheets/font-awesome.css.erb @@ -1,4 +1,4 @@ -/* Font Awesome +/* Font Awesome 3.0 the iconic font designed for use with Twitter Bootstrap ------------------------------------------------------- The full suite of pictographic icons, examples, and documentation @@ -6,298 +6,26 @@ License ------------------------------------------------------- - The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0: - http://creativecommons.org/licenses/by/3.0/ A mention of - 'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable - source code is considered acceptable attribution (most common on the web). - If human readable source code is not available to the end user, a mention in - an 'About' or 'Credits' screen is considered acceptable (most common in desktop - or mobile software). + • The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL + • Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - + http://opensource.org/licenses/mit-license.html + • The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/ + • Attribution is no longer required in Font Awesome 3.0, but much appreciated: + "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome" Contact ------------------------------------------------------- Email: dave@davegandy.com Twitter: http://twitter.com/fortaweso_me - Work: http://lemonwi.se co-founder + Work: Lead Product Designer @ http://kyruus.com */ @font-face { - font-family: "FontAwesome"; - src: url(<%= asset_path 'fontawesome-webfont.eot' %>); - src: url(<%= asset_path 'fontawesome-webfont.eot?#iefix' %>) format('eot'), url(<%= asset_path 'fontawesome-webfont.woff' %>) format('woff'), url(<%= asset_path 'fontawesome-webfont.ttf' %>) format('truetype'), url(<%= asset_path 'fontawesome-webfont.svg#FontAwesome' %>) format('svg'); + font-family: 'FontAwesome'; + src:url(<%= asset_path 'fontawesome-webfont.eot' %>); + src:url(<%= asset_path 'fontawesome-webfont.eot?#iefix' %>) format('embedded-opentype'), + url(<%= asset_path 'fontawesome-webfont.woff' %>) format('woff'), + url(<%= asset_path 'fontawesome-webfont.ttf' %>) format('truetype'); font-weight: normal; font-style: normal; -} - -/* Font Awesome styles - ------------------------------------------------------- */ -[class^="icon-"]:before, [class*=" icon-"]:before { - font-family: FontAwesome; - font-weight: normal; - font-style: normal; - display: inline-block; - text-decoration: inherit; -} -a [class^="icon-"], a [class*=" icon-"] { - display: inline-block; - text-decoration: inherit; -} -/* makes the font 33% larger relative to the icon container */ -.icon-large:before { - vertical-align: top; - font-size: 1.3333333333333333em; -} -.btn [class^="icon-"], .btn [class*=" icon-"] { - /* keeps button heights with and without icons the same */ - - line-height: .9em; -} -li [class^="icon-"], li [class*=" icon-"] { - display: inline-block; - width: 1.25em; - text-align: center; -} -li .icon-large[class^="icon-"], li .icon-large[class*=" icon-"] { - /* 1.5 increased font size for icon-large * 1.25 width */ - - width: 1.875em; -} -li[class^="icon-"], li[class*=" icon-"] { - margin-left: 0; - list-style-type: none; -} -li[class^="icon-"]:before, li[class*=" icon-"]:before { - text-indent: -2em; - text-align: center; -} -li[class^="icon-"].icon-large:before, li[class*=" icon-"].icon-large:before { - text-indent: -1.3333333333333333em; -} -/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen - readers do not read off random characters that represent icons */ -.icon-glass:before { content: "\f000"; } -.icon-music:before { content: "\f001"; } -.icon-search:before { content: "\f002"; } -.icon-envelope:before { content: "\f003"; } -.icon-heart:before { content: "\f004"; } -.icon-star:before { content: "\f005"; } -.icon-star-empty:before { content: "\f006"; } -.icon-user:before { content: "\f007"; } -.icon-film:before { content: "\f008"; } -.icon-th-large:before { content: "\f009"; } -.icon-th:before { content: "\f00a"; } -.icon-th-list:before { content: "\f00b"; } -.icon-ok:before { content: "\f00c"; } -.icon-remove:before { content: "\f00d"; } -.icon-zoom-in:before { content: "\f00e"; } - -.icon-zoom-out:before { content: "\f010"; } -.icon-off:before { content: "\f011"; } -.icon-signal:before { content: "\f012"; } -.icon-cog:before { content: "\f013"; } -.icon-trash:before { content: "\f014"; } -.icon-home:before { content: "\f015"; } -.icon-file:before { content: "\f016"; } -.icon-time:before { content: "\f017"; } -.icon-road:before { content: "\f018"; } -.icon-download-alt:before { content: "\f019"; } -.icon-download:before { content: "\f01a"; } -.icon-upload:before { content: "\f01b"; } -.icon-inbox:before { content: "\f01c"; } -.icon-play-circle:before { content: "\f01d"; } -.icon-repeat:before { content: "\f01e"; } - -/* \f020 doesn't work in Safari. all shifted one down */ -.icon-refresh:before { content: "\f021"; } -.icon-list-alt:before { content: "\f022"; } -.icon-lock:before { content: "\f023"; } -.icon-flag:before { content: "\f024"; } -.icon-headphones:before { content: "\f025"; } -.icon-volume-off:before { content: "\f026"; } -.icon-volume-down:before { content: "\f027"; } -.icon-volume-up:before { content: "\f028"; } -.icon-qrcode:before { content: "\f029"; } -.icon-barcode:before { content: "\f02a"; } -.icon-tag:before { content: "\f02b"; } -.icon-tags:before { content: "\f02c"; } -.icon-book:before { content: "\f02d"; } -.icon-bookmark:before { content: "\f02e"; } -.icon-print:before { content: "\f02f"; } - -.icon-camera:before { content: "\f030"; } -.icon-font:before { content: "\f031"; } -.icon-bold:before { content: "\f032"; } -.icon-italic:before { content: "\f033"; } -.icon-text-height:before { content: "\f034"; } -.icon-text-width:before { content: "\f035"; } -.icon-align-left:before { content: "\f036"; } -.icon-align-center:before { content: "\f037"; } -.icon-align-right:before { content: "\f038"; } -.icon-align-justify:before { content: "\f039"; } -.icon-list:before { content: "\f03a"; } -.icon-indent-left:before { content: "\f03b"; } -.icon-indent-right:before { content: "\f03c"; } -.icon-facetime-video:before { content: "\f03d"; } -.icon-picture:before { content: "\f03e"; } - -.icon-pencil:before { content: "\f040"; } -.icon-map-marker:before { content: "\f041"; } -.icon-adjust:before { content: "\f042"; } -.icon-tint:before { content: "\f043"; } -.icon-edit:before { content: "\f044"; } -.icon-share:before { content: "\f045"; } -.icon-check:before { content: "\f046"; } -.icon-move:before { content: "\f047"; } -.icon-step-backward:before { content: "\f048"; } -.icon-fast-backward:before { content: "\f049"; } -.icon-backward:before { content: "\f04a"; } -.icon-play:before { content: "\f04b"; } -.icon-pause:before { content: "\f04c"; } -.icon-stop:before { content: "\f04d"; } -.icon-forward:before { content: "\f04e"; } - -.icon-fast-forward:before { content: "\f050"; } -.icon-step-forward:before { content: "\f051"; } -.icon-eject:before { content: "\f052"; } -.icon-chevron-left:before { content: "\f053"; } -.icon-chevron-right:before { content: "\f054"; } -.icon-plus-sign:before { content: "\f055"; } -.icon-minus-sign:before { content: "\f056"; } -.icon-remove-sign:before { content: "\f057"; } -.icon-ok-sign:before { content: "\f058"; } -.icon-question-sign:before { content: "\f059"; } -.icon-info-sign:before { content: "\f05a"; } -.icon-screenshot:before { content: "\f05b"; } -.icon-remove-circle:before { content: "\f05c"; } -.icon-ok-circle:before { content: "\f05d"; } -.icon-ban-circle:before { content: "\f05e"; } - -.icon-arrow-left:before { content: "\f060"; } -.icon-arrow-right:before { content: "\f061"; } -.icon-arrow-up:before { content: "\f062"; } -.icon-arrow-down:before { content: "\f063"; } -.icon-share-alt:before { content: "\f064"; } -.icon-resize-full:before { content: "\f065"; } -.icon-resize-small:before { content: "\f066"; } -.icon-plus:before { content: "\f067"; } -.icon-minus:before { content: "\f068"; } -.icon-asterisk:before { content: "\f069"; } -.icon-exclamation-sign:before { content: "\f06a"; } -.icon-gift:before { content: "\f06b"; } -.icon-leaf:before { content: "\f06c"; } -.icon-fire:before { content: "\f06d"; } -.icon-eye-open:before { content: "\f06e"; } - -.icon-eye-close:before { content: "\f070"; } -.icon-warning-sign:before { content: "\f071"; } -.icon-plane:before { content: "\f072"; } -.icon-calendar:before { content: "\f073"; } -.icon-random:before { content: "\f074"; } -.icon-comment:before { content: "\f075"; } -.icon-magnet:before { content: "\f076"; } -.icon-chevron-up:before { content: "\f077"; } -.icon-chevron-down:before { content: "\f078"; } -.icon-retweet:before { content: "\f079"; } -.icon-shopping-cart:before { content: "\f07a"; } -.icon-folder-close:before { content: "\f07b"; } -.icon-folder-open:before { content: "\f07c"; } -.icon-resize-vertical:before { content: "\f07d"; } -.icon-resize-horizontal:before { content: "\f07e"; } - -.icon-bar-chart:before { content: "\f080"; } -.icon-twitter-sign:before { content: "\f081"; } -.icon-facebook-sign:before { content: "\f082"; } -.icon-camera-retro:before { content: "\f083"; } -.icon-key:before { content: "\f084"; } -.icon-cogs:before { content: "\f085"; } -.icon-comments:before { content: "\f086"; } -.icon-thumbs-up:before { content: "\f087"; } -.icon-thumbs-down:before { content: "\f088"; } -.icon-star-half:before { content: "\f089"; } -.icon-heart-empty:before { content: "\f08a"; } -.icon-signout:before { content: "\f08b"; } -.icon-linkedin-sign:before { content: "\f08c"; } -.icon-pushpin:before { content: "\f08d"; } -.icon-external-link:before { content: "\f08e"; } - -.icon-signin:before { content: "\f090"; } -.icon-trophy:before { content: "\f091"; } -.icon-github-sign:before { content: "\f092"; } -.icon-upload-alt:before { content: "\f093"; } -.icon-lemon:before { content: "\f094"; } -.icon-phone:before { content: "\f095"; } -.icon-check-empty:before { content: "\f096"; } -.icon-bookmark-empty:before { content: "\f097"; } -.icon-phone-sign:before { content: "\f098"; } -.icon-twitter:before { content: "\f099"; } -.icon-facebook:before { content: "\f09a"; } -.icon-github:before { content: "\f09b"; } -.icon-unlock:before { content: "\f09c"; } -.icon-credit-card:before { content: "\f09d"; } -.icon-rss:before { content: "\f09e"; } - -.icon-hdd:before { content: "\f0a0"; } -.icon-bullhorn:before { content: "\f0a1"; } -.icon-bell:before { content: "\f0a2"; } -.icon-certificate:before { content: "\f0a3"; } -.icon-hand-right:before { content: "\f0a4"; } -.icon-hand-left:before { content: "\f0a5"; } -.icon-hand-up:before { content: "\f0a6"; } -.icon-hand-down:before { content: "\f0a7"; } -.icon-circle-arrow-left:before { content: "\f0a8"; } -.icon-circle-arrow-right:before { content: "\f0a9"; } -.icon-circle-arrow-up:before { content: "\f0aa"; } -.icon-circle-arrow-down:before { content: "\f0ab"; } -.icon-globe:before { content: "\f0ac"; } -.icon-wrench:before { content: "\f0ad"; } -.icon-tasks:before { content: "\f0ae"; } - -.icon-filter:before { content: "\f0b0"; } -.icon-briefcase:before { content: "\f0b1"; } -.icon-fullscreen:before { content: "\f0b2"; } - -.icon-group:before { content: "\f0c0"; } -.icon-link:before { content: "\f0c1"; } -.icon-cloud:before { content: "\f0c2"; } -.icon-beaker:before { content: "\f0c3"; } -.icon-cut:before { content: "\f0c4"; } -.icon-copy:before { content: "\f0c5"; } -.icon-paper-clip:before { content: "\f0c6"; } -.icon-save:before { content: "\f0c7"; } -.icon-sign-blank:before { content: "\f0c8"; } -.icon-reorder:before { content: "\f0c9"; } -.icon-list-ul:before { content: "\f0ca"; } -.icon-list-ol:before { content: "\f0cb"; } -.icon-strikethrough:before { content: "\f0cc"; } -.icon-underline:before { content: "\f0cd"; } -.icon-table:before { content: "\f0ce"; } - -.icon-magic:before { content: "\f0d0"; } -.icon-truck:before { content: "\f0d1"; } -.icon-pinterest:before { content: "\f0d2"; } -.icon-pinterest-sign:before { content: "\f0d3"; } -.icon-google-plus-sign:before { content: "\f0d4"; } -.icon-google-plus:before { content: "\f0d5"; } -.icon-money:before { content: "\f0d6"; } -.icon-caret-down:before { content: "\f0d7"; } -.icon-caret-up:before { content: "\f0d8"; } -.icon-caret-left:before { content: "\f0d9"; } -.icon-caret-right:before { content: "\f0da"; } -.icon-columns:before { content: "\f0db"; } -.icon-sort:before { content: "\f0dc"; } -.icon-sort-down:before { content: "\f0dd"; } -.icon-sort-up:before { content: "\f0de"; } - -.icon-envelope-alt:before { content: "\f0e0"; } -.icon-linkedin:before { content: "\f0e1"; } -.icon-undo:before { content: "\f0e2"; } -.icon-legal:before { content: "\f0e3"; } -.icon-dashboard:before { content: "\f0e4"; } -.icon-comment-alt:before { content: "\f0e5"; } -.icon-comments-alt:before { content: "\f0e6"; } -.icon-bolt:before { content: "\f0e7"; } -.icon-sitemap:before { content: "\f0e8"; } -.icon-umbrella:before { content: "\f0e9"; } -.icon-paste:before { content: "\f0ea"; } - -.icon-user-md:before { content: "\f200"; } +} \ No newline at end of file diff --git a/app/assets/stylesheets/icons.css.erb b/app/assets/stylesheets/icons.css.erb index d71b7cf9..167bb37a 100644 --- a/app/assets/stylesheets/icons.css.erb +++ b/app/assets/stylesheets/icons.css.erb @@ -1,519 +1,710 @@ -/* WARNING: Your are using ligatures for your icon font. - Ligatures are not supported in IE 9 (and older). - Use the Private Use Area encoding for best browser support. -==================================================================== */ +[data-icons]:before { + font-family: 'entypo'; + content: attr(data-icons); + speak: none; + font-weight: normal; + -webkit-font-smoothing: antialiased; + font-size: 1.5em; + line-height: .6em; + color: white; +} @font-face { font-family: 'entypo'; - src:url(<%= asset_path 'entypo.eot' %>); - src:url(<%= asset_path 'entypo.eot?#iefix' %>) format('embedded-opentype'), - url(<%= asset_path 'entypo.svg#entypo' %>) format('svg'), - url(<%= asset_path 'entypo.woff' %>) format('woff'), - url(<%= asset_path 'entypo.ttf' %>) format('truetype'); - font-weight: normal; - font-style: normal; -} - -/* Use the following CSS code if you want to use data attributes for inserting your icons */ -[data-icon]:before { - font-family: 'entypo'; - content: attr(data-icon); - speak: none; - /* Enable Ligatures */ - -webkit-font-feature-settings:"liga","dlig"; - -moz-font-feature-settings:"liga=1, dlig=1"; - -moz-font-feature-settings:"liga","dlig"; - -ms-font-feature-settings:"liga","dlig"; - -o-font-feature-settings:"liga","dlig"; - font-feature-settings:"liga","dlig"; - text-rendering:optimizeLegibility; + src:url(<%= asset_path 'entypo.eot' %>); + src:url(<%= asset_path 'entypo.eot?#iefix' %>) format('embedded-opentype'), + url(<%= asset_path 'entypo.svg#entypo' %>) format('svg'), + url(<%= asset_path 'entypo.woff' %>) format('woff'), + url(<%= asset_path 'entypo.ttf' %>) format('truetype'); font-weight: normal; - -webkit-font-smoothing: antialiased; -} - -/* Use the following CSS code if you want to have a class per icon */ -[class^="icons-"]:before, [class*=" icons-"]:before { - font-size: 1.5em; - font-family: 'entypo'; font-style: normal; - speak: none; - /* Enable Ligatures */ - -webkit-font-feature-settings:"liga","dlig"; - -moz-font-feature-settings:"liga=1, dlig=1"; - -moz-font-feature-settings:"liga","dlig"; - -ms-font-feature-settings:"liga","dlig"; - -o-font-feature-settings:"liga","dlig"; - font-feature-settings:"liga","dlig"; - text-rendering:optimizeLegibility; - font-weight: normal; - -webkit-font-smoothing: antialiased; - display: inline-block; - text-decoration: inherit; } -a [class^="icons-"], a [class*=" icons-"] { - display: inline-block; - text-decoration: inherit; +/* Font Awesome styles + ------------------------------------------------------- */ +/* includes sprites.less reset */ +[class^="icon-"], +[class*=" icon-"] { + font-family: FontAwesome; +} +[class^="icons-"], +[class*=" icons-"] { + font-family: 'entypo'; +} +[class^="icon"], +[class*=" icon"] { + font-weight: normal; + font-style: normal; + text-decoration: inherit; + display: inline; + width: auto; + height: auto; + line-height: normal; + vertical-align: baseline; + background-image: none !important; + background-position: 0% 0%; + background-repeat: repeat; +} +[class^="icon"]:before, +[class*=" icon"]:before { + text-decoration: inherit; + display: inline-block; + speak: none; +} +/* makes sure icons active on rollover in links */ +a [class^="icon"], +a [class*=" icon"] { + display: inline-block; } /* makes the font 33% larger relative to the icon container */ -.icons-large:before { - vertical-align: top; - font-size: 1.3333333333333333em; +.icon-large:before { + vertical-align: -10%; + font-size: 1.3333333333333333em; } -.btn [class^="icons-"], .btn [class*=" icons-"] { - /* keeps button heights with and without icons the same */ - line-height: .9em; -} -li [class^="icons-"], li [class*=" icons-"] { - display: inline-block; - width: 1.25em; - text-align: center; - margin-right: 10px; -} -li .icons-large[class^="icons-"], li .icons-large[class*=" icons-"] { - /* 1.5 increased font size for icons-large * 1.25 width */ +.nav [class^="icon"], +.nav [class*=" icon"] { + display: inline; + /* keeps button heights with and without icons the same */ - width: 1.875em; -} -li[class^="icons-"], li[class*=" icons-"] { - margin-left: 0; - list-style-type: none; -} -li[class^="icons-"]:before, li[class*=" icons-"]:before { - text-indent: -2em; - text-align: center; -} -li[class^="icons-"].icons-large:before, li[class*=" icons-"].icons-large:before { - text-indent: -1.3333333333333333em; -} -.icons-phone:before { - content: "\70\68\6f\6e\65"; -} -.icons-directions:before { - content: "\64\69\72\65\63\74\69\6f\6e\73"; -} -.icons-mail:before { - content: "\6d\61\69\6c"; -} -.icons-pencil:before { - content: "\70\65\6e\63\69\6c"; -} -.icons-paperclip:before { - content: "\70\61\70\65\72\63\6c\69\70"; -} -.icons-drawer:before { - content: "\64\72\61\77\65\72"; -} -.icons-member:before { - content: "\6d\65\6d\62\65\72"; -} -.icons-group:before { - content: "\67\72\6f\75\70"; -} -.icons-addmember:before { - content: "\61\64\64\6d\65\6d\62\65\72"; -} -.icons-location:before { - content: "\6c\6f\63\61\74\69\6f\6e"; -} -.icons-share:before { - content: "\73\68\61\72\65"; -} -.icons-heart-full:before { - content: "\68\65\61\72\74\2d\66\75\6c\6c"; -} -.icons-heart-bare:before { - content: "\68\65\61\72\74\2d\62\61\72\65"; -} -.icons-star-full:before { - content: "\73\74\61\72\2d\66\75\6c\6c"; -} -.icons-star-bare:before { - content: "\73\74\61\72\2d\62\61\72\65"; -} -.icons-discuss:before { - content: "\64\69\73\63\75\73\73"; -} -.icons-comment:before { - content: "\63\6f\6d\6d\65\6e\74"; -} -.icons-quote:before { - content: "\71\75\6f\74\65"; -} -.icons-house:before { - content: "\68\6f\75\73\65"; -} -.icons-search:before { - content: "\73\65\61\72\63\68"; -} -.icons-printer:before { - content: "\70\72\69\6e\74\65\72"; -} -.icons-bell:before { - content: "\62\65\6c\6c"; -} -.icons-link:before { - content: "\6c\69\6e\6b"; -} -.icons-flag:before { - content: "\66\61\6c\67"; -} -.icons-cog:before { - content: "\63\6f\67"; -} -.icons-tools:before { - content: "\74\6f\6f\6c\73"; -} -.icons-tag:before { - content: "\74\61\67"; -} -.icons-camera:before { - content: "\63\61\6d\65\72\61"; -} -.icons-megaphone:before { - content: "\6d\65\67\61\70\68\6f\6e\65"; -} -.icons-new:before { - content: "\6e\65\77"; -} -.icons-graduation:before { - content: "\67\72\61\64\75\61\74\69\6f\6e"; -} -.icons-books:before { - content: "\62\6f\6f\6b\73"; -} -.icons-page:before { - content: "\70\61\67\65"; -} -.icons-lifebuoy:before { - content: "\6c\69\66\65\62\75\6f\79"; -} -.icons-eye:before { - content: "\65\79\65"; -} -.icons-clock:before { - content: "\63\6c\6f\63\6b"; -} -.icons-calendar:before { - content: "\63\61\6c\65\6e\64\61\72"; -} -.icons-briefcase:before { - content: "\62\72\69\65\66\63\61\73\65"; -} -.icons-gauge:before { - content: "\67\61\75\67\65"; -} -.icons-language:before { - content: "\6c\61\6e\67\75\61\67\65"; -} -.icons-keys:before { - content: "\6b\65\79\73"; -} -.icons-earth:before { - content: "\65\61\72\74\68"; -} -.icons-keyboard:before { - content: "\6b\65\79\62\6f\61\72\64"; -} -.icons-browser:before { - content: "\62\72\6f\77\73\65\72"; -} -.icons-publish:before { - content: "\70\75\62\6c\69\73\68"; -} -.icons-code:before { - content: "\63\6f\64\65"; -} -.icons-light-bulb:before { - content: "\6c\69\67\68\74\2d\62\75\6c\62"; -} -.icons-database:before { - content: "\64\61\74\61\62\61\73\65"; -} -.icons-box:before { - content: "\62\6f\78"; -} -.icons-rss:before { - content: "\72\73\73"; -} -.icons-clipboard:before { - content: "\63\6c\69\70\62\6f\61\72\64"; -} -.icons-cart:before { - content: "\63\61\72\74"; -} -.icons-template:before { - content: "\75\6e\74\69\74\6c\65\64"; -} -.icons-statistics:before { - content: "\73\74\61\74\69\73\74\69\63\73"; -} -.icons-pie:before { - content: "\70\69\65"; -} -.icons-bars:before { - content: "\62\61\72\73"; -} -.icons-graph:before { - content: "\67\72\61\70\68"; -} -.icons-lock:before { - content: "\6c\6f\63\6b"; -} -.icons-unlock:before { - content: "\75\6e\6c\6f\63\6b"; -} -.icons-outlog:before { - content: "\6f\75\74\6c\6f\67"; -} -.icons-inlog:before { - content: "\69\6e\6c\6f\67"; -} -.icons-checkmark:before { - content: "\63\68\65\63\6b\6d\61\72\6b"; -} -.icons-aminus:before { - content: "\61\6d\69\6e\75\73"; -} -.icons-aplus:before { - content: "\61\70\6c\75\73"; -} -.icons-aclose:before { - content: "\61\63\6c\6f\73\65"; -} -.icons-bminus:before { - content: "\62\6d\69\6e\75\73"; -} -.icons-bplus:before { - content: "\62\70\6c\75\73"; -} -.icons-bclose:before { - content: "\62\63\6c\6f\73\65"; -} -.icons-cminus:before { - content: "\63\6d\69\6e\75\73"; -} -.icons-cplus:before { - content: "\63\70\6c\75\73"; -} -.icons-cross:before { - content: "\63\72\6f\73\73"; -} -.icons-blocked:before { - content: "\62\6c\6f\63\6b\65\64"; -} -.icons-information:before { - content: "\69\6e\66\6f\72\6d\61\74\69\6f\6e"; -} -.icons-binfo:before { - content: "\62\69\6e\66\6f"; -} -.icons-question:before { - content: "\71\75\65\73\74\69\6f\6e"; -} -.icons-help:before { - content: "\68\65\6c\70"; -} -.icons-warning:before { - content: "\77\61\72\6e\69\6e\67"; -} -.icons-shuffle:before { - content: "\73\68\75\66\66\6c\65"; -} -.icons-return:before { - content: "\72\65\74\75\72\6e"; -} -.icons-enter:before { - content: "\65\6e\74\65\72"; -} -.icons-exchange:before { - content: "\65\78\63\68\61\6e\67\65"; -} -.icons-loop:before { - content: "\6c\6f\6f\70"; -} -.icons-th-list:before { - content: "\74\68\2d\6c\69\73\74"; -} -.icons-th-large:before { - content: "\74\68\2d\6c\61\72\67\65"; -} -.icons-align-justify:before { - content: "\61\6c\69\67\6e\2d\6a\75\73\74\69\66\79"; -} -.icons-wtext:before { - content: "\77\74\65\78\74"; -} -.icons-btext:before { - content: "\62\74\65\78\74"; -} -.icons-pictures:before { - content: "\70\69\63\74\75\72\65"; -} -.icons-video:before { - content: "\76\69\64\65\6f"; -} -.icons-music:before { - content: "\6d\6f\75\73\65"; -} -.icons-folder:before { - content: "\66\6f\6c\64\65\72"; -} -.icons-archive:before { - content: "\61\72\63\68\69\76\65"; -} -.icons-trash:before { - content: "\74\72\61\73\68"; -} -.icons-upload:before { - content: "\75\70\6c\6f\61\64"; -} -.icons-download:before { - content: "\64\6f\77\6e\6c\6f\61\64"; -} -.icons-disk:before { - content: "\64\69\73\6b"; -} -.icons-bookmark:before { - content: "\62\6f\6f\6b\6d\61\72\6b"; -} -.icons-booma:before { - content: "\62\6f\6f\6d\61"; -} -.icons-resize-enlarge:before { - content: "\72\65\73\69\7a\65\2d\65\6e\6c\61\72\67\65"; -} -.icons-resize-shrink:before { - content: "\72\65\73\69\7a\65\2d\73\68\72\69\6e\6b"; -} -.icons-flow-tree:before { - content: "\66\6c\6f\77\2d\74\72\65\65"; -} -.icons-arrow-left-a:before { - content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\61"; -} -.icons-arrow-bottom-a:before { - content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\61"; -} -.icons-arrow-top-a:before { - content: "\61\72\72\6f\77\2d\74\6f\70\2d\61"; -} -.icons-arrow-right-a:before { - content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\61"; -} -.icons-arrow-left-b:before { - content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\62"; -} -.icons-arrow-bottom-b:before { - content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\62"; -} -.icons-arrow-top-b:before { - content: "\61\72\72\6f\77\2d\74\6f\70\2d\62"; -} -.icons-arrow-right-b:before { - content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\62"; -} -.icons-arrow-left-c:before { - content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\63"; -} -.icons-arrow-bottom-c:before { - content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\63"; -} -.icons-arrow-top-c:before { - content: "\61\72\72\6f\77\2d\74\6f\70\2d\63"; -} -.icons-arrow-right-c:before { - content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\63"; -} -.icons-arrow-left-d:before { - content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\64"; -} -.icons-arrow-bottom-d:before { - content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\64"; -} -.icons-arrow-top-d:before { - content: "\61\72\72\6f\77\2d\74\6f\70\2d\64"; -} -.icons-arrow-right-d:before { - content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\64"; -} -.icons-arrow-left-e:before { - content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\65"; -} -.icons-arrow-bottom-e:before { - content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\65"; -} -.icons-arrow-top-e:before { - content: "\61\72\72\6f\77\2d\74\6f\70\2d\65"; -} -.icons-arrow-right-e:before { - content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\65"; -} -.icons-arrow-left-f:before { - content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\66"; -} -.icons-arrow-bottom-f:before { - content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\66"; -} -.icons-arrow-top-f:before { - content: "\61\72\72\6f\77\2d\74\6f\70\2d\66"; -} -.icons-left-f:before { - content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\66"; -} -.icons-menu:before { - content: "\6d\65\6e\75"; -} -.icons-ellipsis:before { - content: "\65\6c\6c\69\70\73\69\73"; -} -.icons-dots:before { - content: "\64\6f\74\73"; -} -.icons-dot:before { - content: "\64\6f\74"; -} -.icons-like:before { - content: "\6c\69\6b\65"; -} -.icons-suck:before { - content: "\73\75\63\6b"; -} -.icons-export:before { - content: "\65\78\70\6f\72\74"; -} -.icons-vcard:before { - content: "\76\63\61\72\64"; -} -.icons-flow-cascade:before { - content: "\21"; -} -.icons-landscape:before { - content: "\22"; -} -.icons-brush:before { - content: "\62\72\75\73\68"; -} -.icons-palette:before { - content: "\70\61\6c\65\74\74\65"; -} -.icons-desktop:before { - content: "\64\65\73\6b\74\6f\70"; -} -.icons-plane:before { - content: "\70\6c\61\6e\65"; -} -.icons-booklet:before { - content: "\62\6f\6f\6b\6c\65\74"; -} -.icons-update:before { - content: "\75\70\64\61\74\65"; -} -.icons-reload:before { - content: "\72\65\6c\6f\61\64"; -} -.icons-unload:before { - content: "\75\6e\6c\6f\61\64"; -} -.icons-trophy:before { - content: "\74\72\6f\70\68\79"; -} + line-height: 1.5em; +} +.btn [class^="icon"], +.btn [class*=" icon"] { + display: inline; + /* keeps button heights with and without icons the same */ + + line-height: .9em; +} +.btn [class^="icon"].icon-spin, +.nav [class^="icon"].icon-spin, +.btn [class*=" icon"].icon-spin, +.nav [class*=" icon"].icon-spin { + display: inline-block; +} +li [class^="icon"], +li [class*=" icon"] { + display: inline-block; + width: 1.25em; + text-align: center; +} +li [class^="icon"].icon-large, +li [class*=" icon"].icon-large { + /* increased font size for icon-large */ + + width: 1.5625em; +} +ul.icons { + list-style-type: none; + text-indent: -0.75em; +} +ul.icons li [class^="icon"], +ul.icons li [class*=" icon"] { + width: .75em; +} +.icon-muted { + color: #eeeeee; +} +.icon-border { + border: solid 1px #eeeeee; + padding: .2em .25em .15em; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.icon-2x { + font-size: 2em; +} +.icon-2x.icon-border { + border-width: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.icon-3x { + font-size: 3em; +} +.icon-3x.icon-border { + border-width: 3px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.icon-4x { + font-size: 4em; +} +.icon-4x.icon-border { + border-width: 4px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +[class^="icon"].pull-left, +[class*=" icon"].pull-left { + margin-right: .35em; +} +[class^="icon"].pull-right, +[class*=" icon"].pull-right { + margin-left: .35em; +} +.btn [class^="icon"].pull-left.icon-2x, +.btn [class*=" icon"].pull-left.icon-2x, +.btn [class^="icon"].pull-right.icon-2x, +.btn [class*=" icon"].pull-right.icon-2x { + margin-top: .35em; +} +.btn [class^="icon"].icon-spin.icon-large, +.btn [class*=" icon"].icon-spin.icon-large { + height: .75em; +} +.btn.btn-small [class^="icon"].pull-left.icon-2x, +.btn.btn-small [class*=" icon"].pull-left.icon-2x, +.btn.btn-small [class^="icon"].pull-right.icon-2x, +.btn.btn-small [class*=" icon"].pull-right.icon-2x { + margin-top: .45em; +} +.btn.btn-large [class^="icon"].pull-left.icon-2x, +.btn.btn-large [class*=" icon"].pull-left.icon-2x, +.btn.btn-large [class^="icon"].pull-right.icon-2x, +.btn.btn-large [class*=" icon"].pull-right.icon-2x { + margin-top: .2em; +} +.icon-spin { + display: inline-block; + -webkit-animation: spin 2s infinite linear; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} +@-moz-keyframes spin { + 0% { -moz-transform: rotate(0deg); } + 100% { -moz-transform: rotate(359deg); } +} +@-webkit-keyframes spin { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(359deg); } +} +@-o-keyframes spin { + 0% { -o-transform: rotate(0deg); } + 100% { -o-transform: rotate(359deg); } +} +@-ms-keyframes spin { + 0% { -ms-transform: rotate(0deg); } + 100% { -ms-transform: rotate(359deg); } +} +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(359deg); } +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.icon-glass:before { content: "\f000"; } +.icon-music:before { content: "\f001"; } +.icon-search:before { content: "\f002"; } +.icon-envelope:before { content: "\f003"; } +.icon-heart:before { content: "\f004"; } +.icon-star:before { content: "\f005"; } +.icon-star-empty:before { content: "\f006"; } +.icon-user:before { content: "\f007"; } +.icon-film:before { content: "\f008"; } +.icon-th-large:before { content: "\f009"; } +.icon-th:before { content: "\f00a"; } +.icon-th-list:before { content: "\f00b"; } +.icon-ok:before { content: "\f00c"; } +.icon-remove:before { content: "\f00d"; } +.icon-zoom-in:before { content: "\f00e"; } + +.icon-zoom-out:before { content: "\f010"; } +.icon-off:before { content: "\f011"; } +.icon-signal:before { content: "\f012"; } +.icon-cog:before { content: "\f013"; } +.icon-trash:before { content: "\f014"; } +.icon-home:before { content: "\f015"; } +.icon-file:before { content: "\f016"; } +.icon-time:before { content: "\f017"; } +.icon-road:before { content: "\f018"; } +.icon-download-alt:before { content: "\f019"; } +.icon-download:before { content: "\f01a"; } +.icon-upload:before { content: "\f01b"; } +.icon-inbox:before { content: "\f01c"; } +.icon-play-circle:before { content: "\f01d"; } +.icon-repeat:before { content: "\f01e"; } + +/* \f020 doesn't work in Safari. all shifted one down */ +.icon-refresh:before { content: "\f021"; } +.icon-list-alt:before { content: "\f022"; } +.icon-lock:before { content: "\f023"; } +.icon-flag:before { content: "\f024"; } +.icon-headphones:before { content: "\f025"; } +.icon-volume-off:before { content: "\f026"; } +.icon-volume-down:before { content: "\f027"; } +.icon-volume-up:before { content: "\f028"; } +.icon-qrcode:before { content: "\f029"; } +.icon-barcode:before { content: "\f02a"; } +.icon-tag:before { content: "\f02b"; } +.icon-tags:before { content: "\f02c"; } +.icon-book:before { content: "\f02d"; } +.icon-bookmark:before { content: "\f02e"; } +.icon-print:before { content: "\f02f"; } + +.icon-camera:before { content: "\f030"; } +.icon-font:before { content: "\f031"; } +.icon-bold:before { content: "\f032"; } +.icon-italic:before { content: "\f033"; } +.icon-text-height:before { content: "\f034"; } +.icon-text-width:before { content: "\f035"; } +.icon-align-left:before { content: "\f036"; } +.icon-align-center:before { content: "\f037"; } +.icon-align-right:before { content: "\f038"; } +.icon-align-justify:before { content: "\f039"; } +.icon-list:before { content: "\f03a"; } +.icon-indent-left:before { content: "\f03b"; } +.icon-indent-right:before { content: "\f03c"; } +.icon-facetime-video:before { content: "\f03d"; } +.icon-picture:before { content: "\f03e"; } + +.icon-pencil:before { content: "\f040"; } +.icon-map-marker:before { content: "\f041"; } +.icon-adjust:before { content: "\f042"; } +.icon-tint:before { content: "\f043"; } +.icon-edit:before { content: "\f044"; } +.icon-share:before { content: "\f045"; } +.icon-check:before { content: "\f046"; } +.icon-move:before { content: "\f047"; } +.icon-step-backward:before { content: "\f048"; } +.icon-fast-backward:before { content: "\f049"; } +.icon-backward:before { content: "\f04a"; } +.icon-play:before { content: "\f04b"; } +.icon-pause:before { content: "\f04c"; } +.icon-stop:before { content: "\f04d"; } +.icon-forward:before { content: "\f04e"; } + +.icon-fast-forward:before { content: "\f050"; } +.icon-step-forward:before { content: "\f051"; } +.icon-eject:before { content: "\f052"; } +.icon-chevron-left:before { content: "\f053"; } +.icon-chevron-right:before { content: "\f054"; } +.icon-plus-sign:before { content: "\f055"; } +.icon-minus-sign:before { content: "\f056"; } +.icon-remove-sign:before { content: "\f057"; } +.icon-ok-sign:before { content: "\f058"; } +.icon-question-sign:before { content: "\f059"; } +.icon-info-sign:before { content: "\f05a"; } +.icon-screenshot:before { content: "\f05b"; } +.icon-remove-circle:before { content: "\f05c"; } +.icon-ok-circle:before { content: "\f05d"; } +.icon-ban-circle:before { content: "\f05e"; } + +.icon-arrow-left:before { content: "\f060"; } +.icon-arrow-right:before { content: "\f061"; } +.icon-arrow-up:before { content: "\f062"; } +.icon-arrow-down:before { content: "\f063"; } +.icon-share-alt:before { content: "\f064"; } +.icon-resize-full:before { content: "\f065"; } +.icon-resize-small:before { content: "\f066"; } +.icon-plus:before { content: "\f067"; } +.icon-minus:before { content: "\f068"; } +.icon-asterisk:before { content: "\f069"; } +.icon-exclamation-sign:before { content: "\f06a"; } +.icon-gift:before { content: "\f06b"; } +.icon-leaf:before { content: "\f06c"; } +.icon-fire:before { content: "\f06d"; } +.icon-eye-open:before { content: "\f06e"; } + +.icon-eye-close:before { content: "\f070"; } +.icon-warning-sign:before { content: "\f071"; } +.icon-plane:before { content: "\f072"; } +.icon-calendar:before { content: "\f073"; } +.icon-random:before { content: "\f074"; } +.icon-comment:before { content: "\f075"; } +.icon-magnet:before { content: "\f076"; } +.icon-chevron-up:before { content: "\f077"; } +.icon-chevron-down:before { content: "\f078"; } +.icon-retweet:before { content: "\f079"; } +.icon-shopping-cart:before { content: "\f07a"; } +.icon-folder-close:before { content: "\f07b"; } +.icon-folder-open:before { content: "\f07c"; } +.icon-resize-vertical:before { content: "\f07d"; } +.icon-resize-horizontal:before { content: "\f07e"; } + +.icon-bar-chart:before { content: "\f080"; } +.icon-twitter-sign:before { content: "\f081"; } +.icon-facebook-sign:before { content: "\f082"; } +.icon-camera-retro:before { content: "\f083"; } +.icon-key:before { content: "\f084"; } +.icon-cogs:before { content: "\f085"; } +.icon-comments:before { content: "\f086"; } +.icon-thumbs-up:before { content: "\f087"; } +.icon-thumbs-down:before { content: "\f088"; } +.icon-star-half:before { content: "\f089"; } +.icon-heart-empty:before { content: "\f08a"; } +.icon-signout:before { content: "\f08b"; } +.icon-linkedin-sign:before { content: "\f08c"; } +.icon-pushpin:before { content: "\f08d"; } +.icon-external-link:before { content: "\f08e"; } + +.icon-signin:before { content: "\f090"; } +.icon-trophy:before { content: "\f091"; } +.icon-github-sign:before { content: "\f092"; } +.icon-upload-alt:before { content: "\f093"; } +.icon-lemon:before { content: "\f094"; } +.icon-phone:before { content: "\f095"; } +.icon-check-empty:before { content: "\f096"; } +.icon-bookmark-empty:before { content: "\f097"; } +.icon-phone-sign:before { content: "\f098"; } +.icon-twitter:before { content: "\f099"; } +.icon-facebook:before { content: "\f09a"; } +.icon-github:before { content: "\f09b"; } +.icon-unlock:before { content: "\f09c"; } +.icon-credit-card:before { content: "\f09d"; } +.icon-rss:before { content: "\f09e"; } + +.icon-hdd:before { content: "\f0a0"; } +.icon-bullhorn:before { content: "\f0a1"; } +.icon-bell:before { content: "\f0a2"; } +.icon-certificate:before { content: "\f0a3"; } +.icon-hand-right:before { content: "\f0a4"; } +.icon-hand-left:before { content: "\f0a5"; } +.icon-hand-up:before { content: "\f0a6"; } +.icon-hand-down:before { content: "\f0a7"; } +.icon-circle-arrow-left:before { content: "\f0a8"; } +.icon-circle-arrow-right:before { content: "\f0a9"; } +.icon-circle-arrow-up:before { content: "\f0aa"; } +.icon-circle-arrow-down:before { content: "\f0ab"; } +.icon-globe:before { content: "\f0ac"; } +.icon-wrench:before { content: "\f0ad"; } +.icon-tasks:before { content: "\f0ae"; } + +.icon-filter:before { content: "\f0b0"; } +.icon-briefcase:before { content: "\f0b1"; } +.icon-fullscreen:before { content: "\f0b2"; } + +.icon-group:before { content: "\f0c0"; } +.icon-link:before { content: "\f0c1"; } +.icon-cloud:before { content: "\f0c2"; } +.icon-beaker:before { content: "\f0c3"; } +.icon-cut:before { content: "\f0c4"; } +.icon-copy:before { content: "\f0c5"; } +.icon-paper-clip:before { content: "\f0c6"; } +.icon-save:before { content: "\f0c7"; } +.icon-sign-blank:before { content: "\f0c8"; } +.icon-reorder:before { content: "\f0c9"; } +.icon-list-ul:before { content: "\f0ca"; } +.icon-list-ol:before { content: "\f0cb"; } +.icon-strikethrough:before { content: "\f0cc"; } +.icon-underline:before { content: "\f0cd"; } +.icon-table:before { content: "\f0ce"; } + +.icon-magic:before { content: "\f0d0"; } +.icon-truck:before { content: "\f0d1"; } +.icon-pinterest:before { content: "\f0d2"; } +.icon-pinterest-sign:before { content: "\f0d3"; } +.icon-google-plus-sign:before { content: "\f0d4"; } +.icon-google-plus:before { content: "\f0d5"; } +.icon-money:before { content: "\f0d6"; } +.icon-caret-down:before { content: "\f0d7"; } +.icon-caret-up:before { content: "\f0d8"; } +.icon-caret-left:before { content: "\f0d9"; } +.icon-caret-right:before { content: "\f0da"; } +.icon-columns:before { content: "\f0db"; } +.icon-sort:before { content: "\f0dc"; } +.icon-sort-down:before { content: "\f0dd"; } +.icon-sort-up:before { content: "\f0de"; } + +.icon-envelope-alt:before { content: "\f0e0"; } +.icon-linkedin:before { content: "\f0e1"; } +.icon-undo:before { content: "\f0e2"; } +.icon-legal:before { content: "\f0e3"; } +.icon-dashboard:before { content: "\f0e4"; } +.icon-comment-alt:before { content: "\f0e5"; } +.icon-comments-alt:before { content: "\f0e6"; } +.icon-bolt:before { content: "\f0e7"; } +.icon-sitemap:before { content: "\f0e8"; } +.icon-umbrella:before { content: "\f0e9"; } +.icon-paste:before { content: "\f0ea"; } +.icon-lightbulb:before { content: "\f0eb"; } +.icon-exchange:before { content: "\f0ec"; } +.icon-cloud-download:before { content: "\f0ed"; } +.icon-cloud-upload:before { content: "\f0ee"; } + +.icon-user-md:before { content: "\f0f0"; } +.icon-stethoscope:before { content: "\f0f1"; } +.icon-suitcase:before { content: "\f0f2"; } +.icon-bell-alt:before { content: "\f0f3"; } +.icon-coffee:before { content: "\f0f4"; } +.icon-food:before { content: "\f0f5"; } +.icon-file-alt:before { content: "\f0f6"; } +.icon-building:before { content: "\f0f7"; } +.icon-hospital:before { content: "\f0f8"; } +.icon-ambulance:before { content: "\f0f9"; } +.icon-medkit:before { content: "\f0fa"; } +.icon-fighter-jet:before { content: "\f0fb"; } +.icon-beer:before { content: "\f0fc"; } +.icon-h-sign:before { content: "\f0fd"; } +.icon-plus-sign-alt:before { content: "\f0fe"; } + +.icon-double-angle-left:before { content: "\f100"; } +.icon-double-angle-right:before { content: "\f101"; } +.icon-double-angle-up:before { content: "\f102"; } +.icon-double-angle-down:before { content: "\f103"; } +.icon-angle-left:before { content: "\f104"; } +.icon-angle-right:before { content: "\f105"; } +.icon-angle-up:before { content: "\f106"; } +.icon-angle-down:before { content: "\f107"; } +.icon-desktop:before { content: "\f108"; } +.icon-laptop:before { content: "\f109"; } +.icon-tablet:before { content: "\f10a"; } +.icon-mobile-phone:before { content: "\f10b"; } +.icon-circle-blank:before { content: "\f10c"; } +.icon-quote-left:before { content: "\f10d"; } +.icon-quote-right:before { content: "\f10e"; } + +.icon-spinner:before { content: "\f110"; } +.icon-circle:before { content: "\f111"; } +.icon-reply:before { content: "\f112"; } +.icon-github-alt:before { content: "\f113"; } +.icon-folder-close-alt:before { content: "\f114"; } +.icon-folder-open-alt:before { content: "\f115"; } + +.icons-phone:before { content: "\e000"; } +.icons-mobile:before { content: "\e001"; } +.icons-mouse:before { content: "\e002"; } +.icons-directions:before { content: "\e003"; } +.icons-mail:before { content: "\e004"; } +.icons-paperplane:before { content: "\e005"; } +.icons-pencil:before { content: "\e006"; } +.icons-feather:before { content: "\e007"; } +.icons-paperclip:before { content: "\e008"; } +.icons-drawer:before { content: "\e009"; } +.icons-reply:before { content: "\e00a"; } +.icons-reply-all:before { content: "\e00b"; } +.icons-forward:before { content: "\e00c"; } +.icons-user:before { content: "\e00d"; } +.icons-users:before { content: "\e00e"; } +.icons-user-add:before { content: "\e00f"; } +.icons-vcard:before { content: "\e010"; } +.icons-export:before { content: "\e011"; } +.icons-location:before { content: "\e012"; } +.icons-map:before { content: "\e013"; } +.icons-compass:before { content: "\e014"; } +.icons-location-2:before { content: "\e015"; } +.icons-target:before { content: "\e016"; } +.icons-share:before { content: "\e017"; } +.icons-sharable:before { content: "\e018"; } +.icons-heart:before { content: "\e019"; } +.icons-heart-2:before { content: "\e01a"; } +.icons-star:before { content: "\e01b"; } +.icons-star-2:before { content: "\e01c"; } +.icons-thumbs-up:before { content: "\e01d"; } +.icons-thumbs-down:before { content: "\e01e"; } +.icons-chat:before { content: "\e01f"; } +.icons-comment:before { content: "\e020"; } +.icons-quote:before { content: "\e021"; } +.icons-house:before { content: "\e022"; } +.icons-popup:before { content: "\e023"; } +.icons-search:before { content: "\e024"; } +.icons-flashlight:before { content: "\e025"; } +.icons-printer:before { content: "\e026"; } +.icons-bell:before { content: "\e027"; } +.icons-link:before { content: "\e028"; } +.icons-flag:before { content: "\e029"; } +.icons-cog:before { content: "\e02a"; } +.icons-tools:before { content: "\e02b"; } +.icons-trophy:before { content: "\e02c"; } +.icons-tag:before { content: "\e02d"; } +.icons-camera:before { content: "\e02e"; } +.icons-megaphone:before { content: "\e02f"; } +.icons-moon:before { content: "\e030"; } +.icons-palette:before { content: "\e031"; } +.icons-leaf:before { content: "\e032"; } +.icons-music:before { content: "\e033"; } +.icons-music-2:before { content: "\e034"; } +.icons-new:before { content: "\e035"; } +.icons-graduation:before { content: "\e036"; } +.icons-book:before { content: "\e037"; } +.icons-newspaper:before { content: "\e038"; } +.icons-bag:before { content: "\e039"; } +.icons-airplane:before { content: "\e03a"; } +.icons-lifebuoy:before { content: "\e03b"; } +.icons-eye:before { content: "\e03c"; } +.icons-clock:before { content: "\e03d"; } +.icons-microphone:before { content: "\e03e"; } +.icons-calendar:before { content: "\e03f"; } +.icons-bolt:before { content: "\e040"; } +.icons-thunder:before { content: "\e041"; } +.icons-droplet:before { content: "\e042"; } +.icons-cd:before { content: "\e043"; } +.icons-briefcase:before { content: "\e044"; } +.icons-air:before { content: "\e045"; } +.icons-hourglass:before { content: "\e046"; } +.icons-gauge:before { content: "\e047"; } +.icons-language:before { content: "\e048"; } +.icons-network:before { content: "\e049"; } +.icons-key:before { content: "\e04a"; } +.icons-battery:before { content: "\e04b"; } +.icons-bucket:before { content: "\e04c"; } +.icons-magnet:before { content: "\e04d"; } +.icons-drive:before { content: "\e04e"; } +.icons-cup:before { content: "\e04f"; } +.icons-rocket:before { content: "\e050"; } +.icons-brush:before { content: "\e051"; } +.icons-suitcase:before { content: "\e052"; } +.icons-cone:before { content: "\e053"; } +.icons-earth:before { content: "\e054"; } +.icons-keyboard:before { content: "\e055"; } +.icons-browser:before { content: "\e056"; } +.icons-publish:before { content: "\e057"; } +.icons-progress-3:before { content: "\e058"; } +.icons-progress-2:before { content: "\e059"; } +.icons-brogress-1:before { content: "\e05a"; } +.icons-progress-0:before { content: "\e05b"; } +.icons-sun:before { content: "\e05c"; } +.icons-sun-2:before { content: "\e05d"; } +.icons-adjust:before { content: "\e05e"; } +.icons-code:before { content: "\e05f"; } +.icons-screen:before { content: "\e060"; } +.icons-infinity:before { content: "\e061"; } +.icons-light-bulb:before { content: "\e062"; } +.icons-credit-card:before { content: "\e063"; } +.icons-database:before { content: "\e064"; } +.icons-voicemail:before { content: "\e065"; } +.icons-clipboard:before { content: "\e066"; } +.icons-cart:before { content: "\e067"; } +.icons-box:before { content: "\e068"; } +.icons-ticket:before { content: "\e069"; } +.icons-rss:before { content: "\e06a"; } +.icons-signal:before { content: "\e06b"; } +.icons-thermometer:before { content: "\e06c"; } +.icons-droplets:before { content: "\e06d"; } +.icons-untitled:before { content: "\e06e"; } +.icons-statistics:before { content: "\e06f"; } +.icons-pie:before { content: "\e070"; } +.icons-bars:before { content: "\e071"; } +.icons-graph:before { content: "\e072"; } +.icons-lock:before { content: "\e073"; } +.icons-lock-open:before { content: "\e074"; } +.icons-logout:before { content: "\e075"; } +.icons-login:before { content: "\e076"; } +.icons-checkmark:before { content: "\e077"; } +.icons-cross:before { content: "\e078"; } +.icons-minus:before { content: "\e079"; } +.icons-plus:before { content: "\e07a"; } +.icons-cross-2:before { content: "\e07b"; } +.icons-minus-2:before { content: "\e07c"; } +.icons-plus-2:before { content: "\e07d"; } +.icons-cross-3:before { content: "\e07e"; } +.icons-minus-3:before { content: "\e07f"; } +.icons-plus-3:before { content: "\e080"; } +.icons-erase:before { content: "\e081"; } +.icons-blocked:before { content: "\e082"; } +.icons-info:before { content: "\e083"; } +.icons-info-2:before { content: "\e084"; } +.icons-question:before { content: "\e085"; } +.icons-help:before { content: "\e086"; } +.icons-warning:before { content: "\e087"; } +.icons-cycle:before { content: "\e088"; } +.icons-cw:before { content: "\e089"; } +.icons-ccw:before { content: "\e08a"; } +.icons-shuffle:before { content: "\e08b"; } +.icons-arrow:before { content: "\e08c"; } +.icons-arrow-2:before { content: "\e08d"; } +.icons-retweet:before { content: "\e08e"; } +.icons-loop:before { content: "\e08f"; } +.icons-history:before { content: "\e090"; } +.icons-back:before { content: "\e091"; } +.icons-switch:before { content: "\e092"; } +.icons-list:before { content: "\e093"; } +.icons-add-to-list:before { content: "\e094"; } +.icons-layout:before { content: "\e095"; } +.icons-list-2:before { content: "\e096"; } +.icons-text:before { content: "\e097"; } +.icons-text-2:before { content: "\e098"; } +.icons-document:before { content: "\e099"; } +.icons-docs:before { content: "\e09a"; } +.icons-landscape:before { content: "\e09b"; } +.icons-pictures:before { content: "\e09c"; } +.icons-video:before { content: "\e09d"; } +.icons-music-3:before { content: "\e09e"; } +.icons-folder:before { content: "\e09f"; } +.icons-archive:before { content: "\e0a0"; } +.icons-trash:before { content: "\e0a1"; } +.icons-upload:before { content: "\e0a2"; } +.icons-download:before { content: "\e0a3"; } +.icons-disk:before { content: "\e0a4"; } +.icons-install:before { content: "\e0a5"; } +.icons-cloud:before { content: "\e0a6"; } +.icons-upload-2:before { content: "\e0a7"; } +.icons-bookmark:before { content: "\e0a8"; } +.icons-bookmarks:before { content: "\e0a9"; } +.icons-book-2:before { content: "\e0aa"; } +.icons-play:before { content: "\e0ab"; } +.icons-pause:before { content: "\e0ac"; } +.icons-record:before { content: "\e0ad"; } +.icons-stop:before { content: "\e0ae"; } +.icons-next:before { content: "\e0af"; } +.icons-previous:before { content: "\e0b0"; } +.icons-first:before { content: "\e0b1"; } +.icons-last:before { content: "\e0b2"; } +.icons-resize-enlarge:before { content: "\e0b3"; } +.icons-resize-shrink:before { content: "\e0b4"; } +.icons-volume:before { content: "\e0b5"; } +.icons-sound:before { content: "\e0b6"; } +.icons-mute:before { content: "\e0b7"; } +.icons-flow-cascade:before { content: "\e0b8"; } +.icons-flow-branch:before { content: "\e0b9"; } +.icons-flow-tree:before { content: "\e0ba"; } +.icons-flow-line:before { content: "\e0bb"; } +.icons-flow-parallel:before { content: "\e0bc"; } +.icons-arrow-left:before { content: "\e0bd"; } +.icons-arrow-down:before { content: "\e0be"; } +.icons-arrow-up--upload:before { content: "\e0bf"; } +.icons-arrow-right:before { content: "\e0c0"; } +.icons-arrow-left-2:before { content: "\e0c1"; } +.icons-arrow-down-2:before { content: "\e0c2"; } +.icons-arrow-up:before { content: "\e0c3"; } +.icons-arrow-right-2:before { content: "\e0c4"; } +.icons-arrow-left-3:before { content: "\e0c5"; } +.icons-arrow-down-3:before { content: "\e0c6"; } +.icons-arrow-up-2:before { content: "\e0c7"; } +.icons-arrow-right-3:before { content: "\e0c8"; } +.icons-arrow-left-4:before { content: "\e0c9"; } +.icons-arrow-down-4:before { content: "\e0ca"; } +.icons-arrow-up-3:before { content: "\e0cb"; } +.icons-arrow-right-4:before { content: "\e0cc"; } +.icons-arrow-left-5:before { content: "\e0cd"; } +.icons-arrow-down-5:before { content: "\e0ce"; } +.icons-arrow-up-4:before { content: "\e0cf"; } +.icons-arrow-right-5:before { content: "\e0d0"; } +.icons-arrow-left-6:before { content: "\e0d1"; } +.icons-arrow-down-6:before { content: "\e0d2"; } +.icons-arrow-up-5:before { content: "\e0d3"; } +.icons-arrow-right-6:before { content: "\e0d4"; } +.icons-arrow-left-7:before { content: "\e0d5"; } +.icons-arrow-down-7:before { content: "\e0d6"; } +.icons-arrow-up-6:before { content: "\e0d7"; } +.icons-untitled-2:before { content: "\e0d8"; } +.icons-arrow-left-8:before { content: "\e0d9"; } +.icons-arrow-down-8:before { content: "\e0da"; } +.icons-arrow-up-7:before { content: "\e0db"; } +.icons-arrow-right-7:before { content: "\e0dc"; } +.icons-menu:before { content: "\e0dd"; } +.icons-ellipsis:before { content: "\e0de"; } +.icons-dots:before { content: "\e0df"; } +.icons-dot:before { content: "\e0e0"; } +.icons-cc:before { content: "\e0e1"; } +.icons-cc-by:before { content: "\e0e2"; } +.icons-cc-nc:before { content: "\e0e3"; } +.icons-cc-nc-eu:before { content: "\e0e4"; } +.icons-cc-nc-jp:before { content: "\e0e5"; } +.icons-cc-sa:before { content: "\e0e6"; } +.icons-cc-nd:before { content: "\e0e7"; } +.icons-cc-pd:before { content: "\e0e8"; } +.icons-cc-zero:before { content: "\e0e9"; } +.icons-cc-share:before { content: "\e0ea"; } +.icons-cc-share-2:before { content: "\e0eb"; } +.icons-daniel-bruce:before { content: "\e0ec"; } +.icons-daniel-bruce-2:before { content: "\e0ed"; } diff --git a/app/assets/stylesheets/item.css b/app/assets/stylesheets/item.css index a71a3af1..bc5041e6 100644 --- a/app/assets/stylesheets/item.css +++ b/app/assets/stylesheets/item.css @@ -16,7 +16,7 @@ .item h3 { margin: 5px 0; } -.item h3 [class^="icons-"] { +.item h3 [class^="icon"] { margin: 3px 5px 0 3px; } .item .detail { diff --git a/app/assets/stylesheets/lib/bootstrap-datetimepicker.css b/app/assets/stylesheets/lib/bootstrap-datetimepicker.css new file mode 100644 index 00000000..aaf685cb --- /dev/null +++ b/app/assets/stylesheets/lib/bootstrap-datetimepicker.css @@ -0,0 +1,221 @@ +/*! +* Datepicker for Bootstrap +* +* Copyright 2012 Stefan Petre +* Licensed under the Apache License v2.0 +* http://www.apache.org/licenses/LICENSE-2.0 +* +*/ +.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; +} +.bootstrap-datetimepicker-widget { + top:0; + left:0; + min-width: 113px; + padding:4px; + margin-top:1px; + -webkit-border-radius:4px; + -moz-border-radius:4px; + border-radius:4px; +} +.bootstrap-datetimepicker-widget:before { + content:''; + display:inline-block; + border-left:7px solid transparent; + border-right:7px solid transparent; + border-bottom:7px solid #ccc; + border-bottom-color:rgba(0,0,0,0.2); + position:absolute; + top:-7px; + left:6px; +} +.bootstrap-datetimepicker-widget:after { + content:''; + display:inline-block; + border-left:6px solid transparent; + border-right:6px solid transparent; + border-bottom:6px solid #fff; + position:absolute; + top:-6px; + left:7px; +} +.bootstrap-datetimepicker-widget .timepicker { + min-width: 110px; +} +.bootstrap-datetimepicker-widget>ul { + list-style-type:none; + margin:0; +} +.bootstrap-datetimepicker-widget .timepicker-hour, +.bootstrap-datetimepicker-widget .timepicker-minute, +.bootstrap-datetimepicker-widget .timepicker-second { + font-weight:bold; + font-size:1.2em; +} +.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator { + width:4px; + padding:0; + margin:0; +} +.bootstrap-datetimepicker-widget .datepicker>div { + display:none; +} +.bootstrap-datetimepicker-widget .picker-switch { + text-align:center; +} +.bootstrap-datetimepicker-widget table { + width:100%; + margin:0; +} +.bootstrap-datetimepicker-widget td, +.bootstrap-datetimepicker-widget th { + text-align:center; + width:20px; + height:20px; + -webkit-border-radius:4px; + -moz-border-radius:4px; + border-radius:4px; + vertical-align: middle; +} +.bootstrap-datetimepicker-widget td.day:hover, +.bootstrap-datetimepicker-widget td.hour:hover, +.bootstrap-datetimepicker-widget td.minute:hover, +.bootstrap-datetimepicker-widget td.second:hover { + background:#eee; + cursor:pointer; +} +.bootstrap-datetimepicker-widget td.old, +.bootstrap-datetimepicker-widget td.new { + color:#999; +} +.bootstrap-datetimepicker-widget td.active, +.bootstrap-datetimepicker-widget td.active:hover { + color:#fff; + background-color:#006dcc; + background-image:-moz-linear-gradient(top,#08c,#04c); + background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c)); + background-image:-webkit-linear-gradient(top,#08c,#04c); + background-image:-o-linear-gradient(top,#08c,#04c); + background-image:linear-gradient(to bottom,#08c,#04c); + background-repeat:repeat-x; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0); + border-color:#04c #04c #002a80; + border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); + *background-color:#04c; + filter:progid:DXImageTransform.Microsoft.gradient(enabled = false); + color:#fff; + text-shadow:0 -1px 0 rgba(0,0,0,0.25); +} +.bootstrap-datetimepicker-widget td.active:hover, +.bootstrap-datetimepicker-widget td.active:hover:hover, +.bootstrap-datetimepicker-widget td.active:active, +.bootstrap-datetimepicker-widget td.active:hover:active, +.bootstrap-datetimepicker-widget td.active.active, +.bootstrap-datetimepicker-widget td.active:hover.active, +.bootstrap-datetimepicker-widget td.active.disabled, +.bootstrap-datetimepicker-widget td.active:hover.disabled, +.bootstrap-datetimepicker-widget td.active[disabled], +.bootstrap-datetimepicker-widget td.active:hover[disabled] { + color:#fff; + background-color:#04c; + *background-color:#003bb3; +} +.bootstrap-datetimepicker-widget td.active:active, +.bootstrap-datetimepicker-widget td.active:hover:active, +.bootstrap-datetimepicker-widget td.active.active, +.bootstrap-datetimepicker-widget td.active:hover.active { + background-color:#039 \9; +} +.bootstrap-datetimepicker-widget td span { + display:block; + width:100%; + height:54px; + line-height:54px; + float:left; + cursor:pointer; + -webkit-border-radius:4px; + -moz-border-radius:4px; + border-radius:4px; +} +.bootstrap-datetimepicker-widget .datepicker-months td span, +.bootstrap-datetimepicker-widget .datepicker-years td span { + width: 50px; +} +.bootstrap-datetimepicker-widget td span:hover { + background:#eee; +} +.bootstrap-datetimepicker-widget td span.active { + color:#fff; + background-color:#006dcc; + background-image:-moz-linear-gradient(top,#08c,#04c); + background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c)); + background-image:-webkit-linear-gradient(top,#08c,#04c); + background-image:-o-linear-gradient(top,#08c,#04c); + background-image:linear-gradient(to bottom,#08c,#04c); + background-repeat:repeat-x; + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0); + border-color:#04c #04c #002a80; + border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25); + *background-color:#04c; + filter:progid:DXImageTransform.Microsoft.gradient(enabled = false); + color:#fff; + text-shadow:0 -1px 0 rgba(0,0,0,0.25); +} +.bootstrap-datetimepicker-widget td span.active:hover, +.bootstrap-datetimepicker-widget td span.active:active, +.bootstrap-datetimepicker-widget td span.active.active, +.bootstrap-datetimepicker-widget td span.active.disabled, +.bootstrap-datetimepicker-widget td span.active[disabled] { + color:#fff; + background-color:#04c; + *background-color:#003bb3; +} +.bootstrap-datetimepicker-widget td span.active:active, +.bootstrap-datetimepicker-widget td span.active.active { + background-color:#039 \9; +} +.bootstrap-datetimepicker-widget td span.old { + color:#999; +} +.bootstrap-datetimepicker-widget th.switch { + width:145px; +} +.bootstrap-datetimepicker-widget th.next, +.bootstrap-datetimepicker-widget th.prev { + font-size:21px; +} +.bootstrap-datetimepicker-widget thead tr:first-child th { + cursor:pointer; +} +.bootstrap-datetimepicker-widget thead tr:first-child th:hover { + background:#eee; +} +.input-append.date .add-on i, +.input-prepend.date .add-on i { + cursor:pointer; +} diff --git a/app/assets/stylesheets/mobile.css b/app/assets/stylesheets/mobile.css index 96b49179..49425a62 100644 --- a/app/assets/stylesheets/mobile.css +++ b/app/assets/stylesheets/mobile.css @@ -5,6 +5,6 @@ *= require mobile/jquery.mobile-1.2.0.css *= require mobile/add2home *= require mobile/orbit-mobile - *= require mobile/icons - *= require mobile/font-awesome + *= require icons + *= require font-awesome */ \ No newline at end of file diff --git a/app/assets/stylesheets/mobile/orbit-mobile.css.erb b/app/assets/stylesheets/mobile/orbit-mobile.css.erb index 86fe763e..72a3c887 100644 --- a/app/assets/stylesheets/mobile/orbit-mobile.css.erb +++ b/app/assets/stylesheets/mobile/orbit-mobile.css.erb @@ -194,28 +194,25 @@ div[data-role="page"] { padding: 0 0 20px; margin-bottom: 0; } -#news_content .content .newpic { +#announcement_content .content .newpic { width: 320px; height: 220px; margin: 0 auto; } -#news_content .content .newstitle { +#announcement_content .content .newstitle { font-size: 1.4em; padding: 0 10px; margin: 1em 0; } -#news_content .content .newsDate { +#announcement_content .content .newsDate { padding: 0 10px; font-size: 1em; color: #8D8D8D; } -#news_content .content .newsummary { +#announcement_content .content .newsummary { padding: 0 10px 20px; margin-bottom: 0; } -#announcement_content .content { - padding: 10px; -} #map div[data-role="content"] { padding: 0; } diff --git a/app/assets/stylesheets/new_admin.css.erb b/app/assets/stylesheets/new_admin.css.erb index 2fb7e28e..2cb340da 100644 --- a/app/assets/stylesheets/new_admin.css.erb +++ b/app/assets/stylesheets/new_admin.css.erb @@ -11,9 +11,10 @@ *= require orbit-bar *= require bootstrap-orbit *= require list - *= require widgets + *= require widget *= require scroll_style *= require isotope *= require icons *= require site-map + *= require lib/bootstrap-datetimepicker */ diff --git a/app/assets/stylesheets/orbit-bar.css.erb b/app/assets/stylesheets/orbit-bar.css.erb index 154f1158..5cebe273 100644 --- a/app/assets/stylesheets/orbit-bar.css.erb +++ b/app/assets/stylesheets/orbit-bar.css.erb @@ -1,234 +1,234 @@ - #orbit-bar { - margin-bottom: 0; + margin-bottom:0; position:fixed; width:100%; - z-index: 99; - top: 0; - left: 0; + z-index:99; + top:0; + left:0; } #orbit-bar .navbar-inner { - min-height: 28px; - height: 28px; - border: none; - -moz-border-radius: 0px; - -webkit-border-radius: 0px; - border-radius: 0px; - padding-top: 2px; - padding-bottom: 1px; - -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(127, 149, 165, 1), 0 -1px 0 rgba(31, 32, 36, 1) inset; - -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(127, 149, 165, 1), 0 -1px 0 rgba(31, 32, 36, 1) inset; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(127, 149, 165, 1), 0 -1px 0 rgba(31, 32, 36, 1) inset; - background-image: -moz-linear-gradient(top, #545b60, #191a1c); - background-image: -ms-linear-gradient(top, #545b60, #191a1c); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#545b60), to(#191a1c)); - background-image: -webkit-linear-gradient(top, #545b60, #191a1c); - background-image: -o-linear-gradient(top, #545b60, #191a1c); - background-image: linear-gradient(top, #545b60, #191a1c); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#545b60', endColorstr='#191a1c', GradientType=0); + min-height:28px; + height:28px; + border:none; + -moz-border-radius:0px; + -webkit-border-radius:0px; + border-radius:0px; + padding-top:2px; + padding-bottom:1px; + -webkit-box-shadow:0 1px 3px rgba(0,0,0,0.8),inset 0 1px 0 #7f95a5,0 -1px 0 #1f2024 inset; + -moz-box-shadow:0 1px 3px rgba(0,0,0,0.8),inset 0 1px 0 #7f95a5,0 -1px 0 #1f2024 inset; + box-shadow:0 1px 3px rgba(0,0,0,0.8),inset 0 1px 0 #7f95a5,0 -1px 0 #1f2024 inset; + background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#545b60), to(#191a1c)); + background-image:-webkit-linear-gradient(top, #545b60, #191a1c); + background-image:-moz-linear-gradient(top, #545b60, #191a1c); + background-image:-ms-linear-gradient(top, #545b60, #191a1c); + background-image:-o-linear-gradient(top, #545b60, #191a1c); + background-image:linear-gradient(top, #545b60, #191a1c); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#545b60', endColorstr='#191a1c', GradientType=0); } #orbit-bar .navbar-search { - left: 30px; - margin: 0; - position: absolute; - text-align: right; - top: -1px; - z-index: 0; - opacity: 0; - -moz-opacity: 0; + left:30px; + margin:0; + position:absolute; + text-align:right; + top:-1px; + z-index:0; + opacity:0; + -moz-opacity:0; filter:alpha(opacity=0); } #orbit-bar .nav.pull-right { - margin-right: -20px; + margin-right:-20px; } #orbit-bar .search-query { - padding: 7px 9px 5px; - height: 12px; - margin-top: 3px; - border: none; - line-height: 14px; - border-radius: 3px; + padding:7px 9px 5px; + height:12px; + margin-top:3px; + border:none; + line-height:14px; + border-radius:3px; } #orbit-bar .search-query:focus { - background-position: 5px 2px; + background-position:5px 2px; } #orbit-bar .container { width:100%; } #orbit-bar .orbit-logo .brand { - background: url(<%= asset_path 'orbit-bar.png' %>) no-repeat -162px -5px; + background:url(<%= asset_path 'orbit-bar.png' %>) no-repeat -162px -5px; text-indent:-9999px; - padding: 5px 20px 4px; + padding:5px 20px 4px; } #orbit-bar .orbit-logo .brand:hover { - background-color: rgba(0,157,220,1); + background-color:#009ddc; } #orbit-bar .orbit-logo.open .brand { - background-color: rgba(0,157,220,1); + background-color:#009ddc; } #orbit-bar .orbit-logo .dropdown-menu { - left: -15px; + left:-15px; } -#orbit-bar .nav > li { - height: 28px; -} -#orbit-bar .nav > li > a:hover { - background-color: rgba(0,157,220,1); -} -#orbit-bar .nav > li > a { - /*background-image: url(<%= asset_path 'orbit-bar.png' %>);*/ - background-repeat:no-repeat; - display: inline-block; - width: 17px; - height: 16px; - padding: 6px 6px 6px 5px; -} -#orbit-bar .nav > li > a[data-icon]:before { +#orbit-bar .dropdown-menu>li [class^="icon"], +#orbit-bar .dropdown-menu>li [class*=" icon"] { font-size: 1.5em; - color: #fff; - line-height: 16px; - text-shadow: none; + margin-right: 10px; } -#orbit-bar .nav > li.search { - overflow: hidden; - width: 28px; - position: relative; +#orbit-bar .nav>li { + height:28px; } -#orbit-bar .nav > li > a.orbit-bar-home { - background-position: -10px -10px; +#orbit-bar .nav>li>a:hover { + background-color:#009ddc; } -#orbit-bar .nav > li > a.orbit-bar-desktop { - background-position: -106px -9px; +#orbit-bar .nav>li>a { + background-repeat:no-repeat; + display:inline-block; + width:17px; + height:16px; + padding:6px 6px 6px 5px; } -#orbit-bar .nav > li > a.orbit-bar-member { - background-position: -4px -37px; +#orbit-bar .nav>li>a[data-icon]:before { + font-size:1.5em; + color:#fff; + line-height:16px; + text-shadow:none; } -#orbit-bar .nav > li > a.orbit-bar-member { - background-position: -10px -43px; +#orbit-bar .nav>li.search { + overflow:hidden; + width:28px; + position:relative; } -#orbit-bar .nav > li > a.orbit-bar-language { - background-position: -42px -42px; +#orbit-bar .nav>li>a.orbit-bar-home { + background-position:-10px -10px; } -#orbit-bar .nav > li > a.orbit-bar-search { - background-position: -75px -10px; - overflow: hidden; - position: absolute; - right: 0; - z-index: 1; +#orbit-bar .nav>li>a.orbit-bar-desktop { + background-position:-106px -9px; } -#orbit-bar .nav > li.language.open > a.orbit-bar-language { - background-color: rgba(0,157,220,1); +#orbit-bar .nav>li>a.orbit-bar-member { + background-position:-4px -37px; +} +#orbit-bar .nav>li>a.orbit-bar-member { + background-position:-10px -43px; +} +#orbit-bar .nav>li>a.orbit-bar-language { + background-position:-42px -42px; +} +#orbit-bar .nav>li>a.orbit-bar-search { + background-position:-75px -10px; + overflow:hidden; + position:absolute; + right:0; + z-index:1; +} +#orbit-bar .nav>li.language.open>a.orbit-bar-language { + background-color:#009ddc; } .language-menu .active { - color: #ffffff; - text-decoration: none; - background-color: #0088cc; + color:#ffffff; + text-decoration:none; + background-color:#0088cc; } -#orbit-bar .nav > li > a.orbit-bar-account { - background-image: none; - height: 22px; - padding: 3px; - text-indent: inherit; - min-width: 110px; - width: auto !important; - text-align: left; - color: #FFFFFF; - text-shadow: none; - background-color: rgba(0, 0, 0, 0.5); +#orbit-bar .nav>li>a.orbit-bar-account { + background-image:none; + height:22px; + padding:3px; + text-indent:inherit; + min-width:110px; + width:auto !important; + text-align:left; + color:#FFFFFF; + text-shadow:none; + background-color:rgba(0,0,0,0.5); } -#orbit-bar .nav > li > a.orbit-bar-account:hover { - background-color: #08C; +#orbit-bar .nav>li>a.orbit-bar-account:hover { + background-color:#08C; } #orbit-bar .nav span.member-name { - display: inline-block; - line-height: 22px; - padding: 0 10px; - vertical-align: top; + display:inline-block; + line-height:22px; + padding:0 10px; + vertical-align:top; } #orbit-bar .nav img.member-img { - display: inline-block; - max-width: 24px; - margin-top: -2px; + display:inline-block; + max-width:24px; + margin-top:-2px; } #orbit-bar .clear { - clear: none; + clear:none; } #orbit-bar .account-menu { - right: 5px; + right:5px; } -#orbit-bar .bar-login { - -} -#orbit-bar .bar-login .open, #orbit-bar .open .orbit-bar-account { - background-color: #009DDC; +#orbit-bar .bar-login .open,#orbit-bar .open .orbit-bar-account { + background-color:#009DDC; } #orbit-bar .bar-login .dropdown-menu { - padding: 0 0 10px; - max-width: 260px; + padding:0 0 10px; + max-width:260px; } #orbit-bar .bar-login .dropdown-menu .log { - margin: 10px 15px 0; - list-style: none outside none; + margin:10px 15px 0; + list-style:none outside none; } #orbit-bar .bar-login .dropdown-menu .log .title { - background: url(<%= asset_path 'sign-in-logo2.png' %>) no-repeat center center; - height: 70px; + background:url(<%= asset_path 'sign-in-logo2.png' %>) no-repeat center center; + height:70px; } #orbit-bar .bar-login .dropdown-menu .log form { - margin: 0 0 8px; + margin:0 0 8px; } #orbit-bar .bar-login .dropdown-menu .log input { - display: inline-block; - margin: 0; + display:inline-block; + margin:0; } #orbit-bar .bar-login .dropdown-menu .log .span2 { - width: 182px; + width:182px; } #orbit-bar .bar-login .dropdown-menu .log .forgot { - margin-bottom: 20px; - padding: 3px 0 0; - float: right; - display: inline-block; - color: #0088CC; + margin-bottom:20px; + padding:3px 0 0; + float:right; + display:inline-block; + color:#0088CC; } #orbit-bar .bar-login .dropdown-menu .log .input-prepend { - margin-top: 20px; + margin-top:20px; } #orbit-bar .bar-login .dropdown-menu .log .remember { - margin-top: 5px; + margin-top:5px; } #orbit-bar .bar-login .dropdown-menu .log .forgot:hover { - padding: 3px 0 0; - float: right; - display: inline-block; - color: #005580; - text-decoration: underline; - background-color: transparent; + padding:3px 0 0; + float:right; + display:inline-block; + color:#005580; + text-decoration:underline; + background-color:transparent; } #orbit-bar .bar-login .dropdown-menu .log .btn { - width: 220px; + width:220px; } #orbit-bar .bar-login .dropdown-menu .log .divider { position:relative; - overflow: inherit; - margin: 20px 0; + overflow:inherit; + margin:20px 0; } #orbit-bar .bar-login .dropdown-menu .log .divider span { - position: absolute; - width: 20px; - height: 20px; - background-color: #FFF; - color: #666; - top: -9px; - left: 100px; - font-size: 1.4em; - text-align: center; + position:absolute; + width:20px; + height:20px; + background-color:#FFF; + color:#666; + top:-9px; + left:100px; + font-size:1.4em; + text-align:center; } #orbit-bar .bar-login .dropdown-menu .register { - color: #FFFFFF; - margin: 0 15px; - width: 188px; + color:#FFFFFF; + margin:0 15px; + width:188px; } #orbit-bar .add-on i { - font-size: 12px; + font-size:12px; } \ No newline at end of file diff --git a/app/assets/stylesheets/style.css.erb b/app/assets/stylesheets/style.css.erb index 00ee8e0a..f86c9a91 100644 --- a/app/assets/stylesheets/style.css.erb +++ b/app/assets/stylesheets/style.css.erb @@ -49,8 +49,11 @@ #main-sidebar #position span { color: #FFF; } -#main-sidebar #position [class^="icons"] { +#main-sidebar #position>a [class^="icon"] { color: #FFF; + font-size: 1.5em; + line-height: 2em; + margin-right: 10px; } #main-sidebar #position a { display: block; @@ -79,8 +82,9 @@ color: #CFCFCF; text-shadow: 0 -1px 0px rgba(36, 36, 36, 0.65); } -#main-sidebar #position #collapse-menu [class^="icon-"] { +#main-sidebar #position #collapse-menu [class^="icon"] { display: inline; + line-height: 3px; } #main-sidebar #position a:hover { text-decoration: none; @@ -91,11 +95,13 @@ #main-sidebar .nav > li { margin: 1px 0; } -#main-sidebar .nav > li > a [class^="icons-"] { +#main-sidebar .nav > li > a [class^="icon"] { float: left; color: #333; + font-size: 1.5em; + line-height: 1.5em; } -#main-sidebar .nav > li.active > a [class^="icons-"] { +#main-sidebar .nav > li.active > a [class^="icon"] { opacity: 1; -moz-opacity: 1; filter:alpha(opacity=10); @@ -133,7 +139,7 @@ -webkit-box-shadow: inset -5px 0px 15px rgba(0, 0, 0, .15); -moz-box-shadow: inset -5px 0px 15px rgba(0, 0, 0, .15); } -#main-sidebar .overview > .nav > li:hover > a [class^="icons-"] { +#main-sidebar .overview > .nav > li:hover > a [class^="icon"] { color: #fff; } #main-sidebar .nav > li > .nav { @@ -156,7 +162,7 @@ #main-sidebar .nav > li > .nav > li { position: relative; } -#main-sidebar .nav > li > .nav > li [class^="icon-"] { +#main-sidebar .nav > li > .nav > li [class^="icon"] { position: absolute; color: #FFF; top: 4px; @@ -183,8 +189,8 @@ #main-sidebar .nav > li > .nav > li.active > a:hover { background-color: #6B6B6B; } -#main-sidebar .nav > li > .nav > li.active > a [class^="icon-"], -#main-sidebar .nav > li > .nav > li > a:hover [class^="icon-"] { +#main-sidebar .nav > li > .nav > li.active > a [class^="icon"], +#main-sidebar .nav > li > .nav > li > a:hover [class^="icon"] { display: block; } #main-wrap { @@ -198,6 +204,11 @@ height: auto; min-height: 36px; } +#main-wrap .subnav .breadcrumb { + margin: 0; + border-bottom: 1px solid #DBDBDB; + border-radius: 0; +} #main-wrap .pagination { margin: 18px 0 0; text-align: center; @@ -453,14 +464,12 @@ .sign-in .error .help-inline { display:inline-block; } -.web-symbol:after { - font-family: 'WebSymbolsRegular'; - content: "{"; - margin-left: 2px; - margin-top: 8px; +.web-symbol:before { + font-family: 'entypo'; + content: "\e0ce"; } -.active .web-symbol:after { - content: "}"; +.active .web-symbol:before { + content: "\e0cf"; } .img-peview { margin-left: 12px; @@ -539,19 +548,21 @@ margin-left:40px; } .folded #main-sidebar .nav { + padding-right: 0; padding-left: 12px; width: 28px; white-space: nowrap; } -.folded #main-sidebar .nav > li > a [class^="icons-"] { +/*.folded #main-sidebar .nav > li > a [class^="icon"] { margin-left: 1px; -} +}*/ /*.folded #main-sidebar .viewport { width: 39px; background-color: rgba(100,100,100,.3) }*/ -.folded #main-sidebar:hover .viewport { - width: 198px; +.folded #main-sidebar .viewport { + /*width: 198px;*/ + overflow: visible; /*background-color: rgba(100,100,100,.3)*/ } .folded #main-sidebar .overview > .nav-list > li { @@ -563,6 +574,7 @@ } .folded #main-sidebar .overview > .nav-list > li:hover > a { width: 172px; + position: relative; } .folded #main-sidebar .overview > .nav-list > li > a > span, .folded #main-sidebar #position span { display: none; @@ -629,7 +641,7 @@ #banner_tab li a { padding-right: 32px; } -#banner_tab li [class^="icons-"] { +#banner_tab li [class^="icon"] { float: right; margin-top: 8px; } diff --git a/app/assets/stylesheets/widget.css b/app/assets/stylesheets/widget.css index e99a5668..6942221b 100644 --- a/app/assets/stylesheets/widget.css +++ b/app/assets/stylesheets/widget.css @@ -3,7 +3,6 @@ } .widget-box { background-color: #FFF; - overflow: hidden; min-width: 300px; margin: 0 0 5px 5px; position:relative; @@ -25,7 +24,7 @@ background-image: linear-gradient(top, #B7B7B7, #9d9d9d); filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#B7B7B7', endColorstr='#9d9d9d', GradientType=0); } -.widget-box .widget-title [class^="icons-"] { +.widget-box .widget-title [class^="icon"] { margin: 3px 5px 0 2px; } .widget-box .widget-content { diff --git a/app/assets/stylesheets/widgets.css b/app/assets/stylesheets/widgets.css deleted file mode 100644 index aee09615..00000000 --- a/app/assets/stylesheets/widgets.css +++ /dev/null @@ -1,160 +0,0 @@ -.widget-size-300 { - width:298px; -} -.widget-box { - background-color: #FFF; - overflow: hidden; - min-width: 300px; - margin: 0 0 5px 5px; - position:relative; -} -.widget-box .widget-title { - margin: 0; - font-size: 1.5em; - line-height: 1.5em; - color: #FFF; - padding-left: 5px; - border-radius: 5px 5px 0 0; - -moz-border-radius: 5px 5px 0 0; - -webkit-border-radius: 5px 5px 0 0; - background-image: -moz-linear-gradient(top, #B7B7B7, #9d9d9d); - background-image: -ms-linear-gradient(top, #B7B7B7, #9d9d9d); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#B7B7B7), to(#9d9d9d)); - background-image: -webkit-linear-gradient(top, #B7B7B7, #9d9d9d); - background-image: -o-linear-gradient(top, #B7B7B7, #9d9d9d); - background-image: linear-gradient(top, #B7B7B7, #9d9d9d); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#B7B7B7', endColorstr='#9d9d9d', GradientType=0); -} -.widget-box .widget-title [class^="icons-"] { - margin: 3px 5px 0 2px; -} -.widget-box .widget-content { - padding: 10px; - border-width: 0 1px 1px; - border-style: solid; - border-color: #CCCCCC; - border-radius: 0 0 5px 5px; - -moz-border-radius: 0 0 5px 5px; - -webkit-border-radius: 0 0 5px 5px; -} -.widget-box .form-horizontal .control-group > label { - width: 50px; -} -.widget-box .form-horizontal .controls { - margin-left: 60px; -} -.widget-action { - position:absolute; - right:1px; - top:6px; -} -.action { - float: left; - display:inline-block; - margin-right: 5px; - opacity: 0.8; - filter: alpha(opacity=80); - color: #FFF; -} -.action:hover { - opacity: 1; - filter: alpha(opacity=80); - cursor: pointer; - color: #FFF; - text-decoration: none; -} -.select-role { - display:none; - padding: 10px 0; -} -.file-upload { - position:relative; - overflow: hidden; -} -.file-upload .file-name { - white-space: nowrap; - overflow: hidden; - border-style: solid; - border-width: 1px 1px 1px 0; - border-color: #CCC; - display: inline-block; - float: left; - padding: 4px 10px; - height: 18px; - line-height: 18px; - -webkit-border-radius: 0 3px 3px 0; - -moz-border-radius: 0 3px 3px 0; - border-radius: 0 3px 3px 0; - text-align: left; - margin: 0; - width: 193px; -} -.file-upload .upload { - margin:0; - padding:0; - position:absolute; - top: 0; - left:0; - opacity:.0; - font-size: 60px; - left: -595px/9; - filter: alpha(opacity= 0); - outline: none; -} -.file-upload .upload:focus { - position:absolute; -} -.file-upload .input-medium { - border-radius: 3px 3px 3px 3px !important; - width: 267px; - position: relative; - z-index: 5; - display: block; - clear: both; -} -.file-upload .control-label { - margin-top: 0; - margin-bottom: 5px; -} -.upload-picture { - margin-bottom: 5px; - text-align: center; - width: 276px; - overflow: hidden; - height: 90px; -} -.upload-picture img { - left: 0; - margin-top: -15%; - width: 100%; -} -.widget-box .widgetInfo { - display: inline-block; - text-align: center; - width: 255px; - margin : 0px 0 5px; - padding: 5px 10px; -} -#widget-link table { - margin-bottom:0 -} -/*Date*/ -.showDate { - border-style: solid; - border-width: 1px 0 1px 1px; - border-color: #CCC; - display: inline-block; - float: left; - padding: 4px 10px; - height: 18px; - line-height: 18px; - -webkit-border-radius: 3px 0 0 3px; - -moz-border-radius: 3px 0 0 3px; - border-radius: 3px 0 0 3px; - text-align: center; -} -.calendarInput { - position: absolute; - visibility: hidden; - left: 11px; -} \ No newline at end of file diff --git a/app/controllers/admin/infos_controller.rb b/app/controllers/admin/infos_controller.rb index e79fba7b..d6325ef0 100644 --- a/app/controllers/admin/infos_controller.rb +++ b/app/controllers/admin/infos_controller.rb @@ -40,9 +40,10 @@ class Admin::InfosController < ApplicationController @attribute.update_attributes(params[:info]) @attribute.attribute_fields.each{|t| t.destroy if t["to_delete"] == true} respond_to do |format| - format.html { redirect_to :action => :index } + format.html { redirect_to(edit_admin_info_path(params[:id])) } format.js { render 'admin/attributes/toggle_enable' } end + end def destroy diff --git a/app/controllers/admin/module_apps_controller.rb b/app/controllers/admin/module_apps_controller.rb index af529086..da029420 100644 --- a/app/controllers/admin/module_apps_controller.rb +++ b/app/controllers/admin/module_apps_controller.rb @@ -3,38 +3,12 @@ class Admin::ModuleAppsController < ApplicationController before_filter :user_has_sub_manager_privilege?, :only => [ :assign_sub_manager, :remove_sub_manager ] layout "new_admin" - + helper Admin::PagePartsHelper def index @module_apps = ModuleApp.all.entries end - def reload_frontend_pages - @categories =[] - @module_app = ModuleApp.find(params[:id]) - - @frontend_path = @module_app.widgets.keys[0] if ( !@module_app.widgets.blank? && @module_app.widgets[0].blank? ) - - @frontend_style = @module_app.widgets[@frontend_path] if ( !@frontend_path.blank? ) - - case @module_app.key - when 'announcement' - @categories = BulletinCategory.all - @tags = AnnouncementTag.all - when 'news' - @categories = NewsBulletinCategory.all - @tags = NewsTag.all - when 'web_resource' - @categories = WebLinkCategory.all - @tags = WebResourceTag.all - when 'archive' - @categories = ArchiveFileCategory.all - @tags = ArchiveTag.all - end - respond_to do |format| - format.js {} - end - end def module_auth_proc @module_app = ModuleApp.find(params[:id]) @@ -136,7 +110,6 @@ class Admin::ModuleAppsController < ApplicationController end #user is not permited to do that flash[:notice] = t('app_auth.operation_not_permitted') - render :nothing => true, :status => 403 - end - + render :nothing => true,:status => 403 + end end \ No newline at end of file diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb index dc5f2b36..1ac7d669 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -25,7 +25,8 @@ class Admin::PagePartsController < ApplicationController def edit @part = PagePart.find(params[:id]) @module_apps = ModuleApp.excludes(widgets: nil).where(enable_frontend: true).order_by(:title, :asc) - @module_app = @part.module_app ? @part.module_app : @module_apps[0] + @module_app = @part.module_app ? @part.module_app : nil + @user_choose = @part.widget_path @r_tag = @part.public_r_tag.blank? ? LIST[:public_r_tags][0] : @part.public_r_tag @tag_objects = @r_tag.classify.constantize.all rescue nil @widget_path = @part.widget_path ? @part.widget_path : @module_app.widgets.keys[0] @@ -37,11 +38,12 @@ class Admin::PagePartsController < ApplicationController # @widget_style = @module_app.widgets[@widget_path] if !@widget_path.blank? && !@module_app.widgets.blank? # end - @widget_path = @part.widget_path ? @part.widget_path : @module_app.widgets.keys[0] + @widget_path = @part.widget_path ? @part.widget_path : (@module_app.widgets.keys[0] rescue nil) - if @module_app.widgets.any?{|b| b.class == Array} + if @module_app && @module_app.widgets.any?{|b| b.class == Array} @widget_style = @module_app.widgets[@widget_path] if !@widget_path.blank? && !@module_app.widgets.blank? end + # TODO 應該要有一些東西來決定 @categories @tags # case @module_app.key # when 'announcement' @@ -55,7 +57,7 @@ class Admin::PagePartsController < ApplicationController # when 'archive' # @categories = ArchiveFileCategory.all # @tags = ArchiveTag.all - # end + # end if @module_app end @@ -69,6 +71,11 @@ class Admin::PagePartsController < ApplicationController params[:page_part][:widget_field] = params[:page_part][:widget_field].zip( params[:page_part][:widget_field_type] ) if params[:page_part][:widget_field] params[:page_part][:widget_field_type] = nil + + if params[:page_part][:module_app].blank? + params[:page_part][:module_app] = nil + params[:page_part][:kind] = nil + end if @part.update_attributes(params[:page_part]) set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu') @@ -99,13 +106,13 @@ class Admin::PagePartsController < ApplicationController end def reload_widgets - @part = PagePart.find params[:part_id] + @part = PagePart.find params[:id] @categories =[] - @module_app = ModuleApp.find(params[:id]) + @module_app = ModuleApp.find(params[:module_app_id]) rescue nil - @widget_path = @module_app.widgets.keys[0] if ( @module_app.widgets[0].blank? ) + @widget_path = @module_app.widgets.keys[0] if (@module_app && @module_app.widgets[0].blank? ) - @widget_style = @module_app.get_widget_style[@widget_path][:style] unless @widget_path.nil? + @widget_style = @module_app.widgets[@widget_path] if ( !@widget_path.blank? ) case @module_app.key when 'announcement' @@ -113,15 +120,16 @@ class Admin::PagePartsController < ApplicationController @tags = AnnouncementTag.all when 'gallery' @albums = GalleryAlbum.all + @tags = [] when 'web_resource' @categories = WebLinkCategory.all @tags = WebResourceTag.all when 'archive' @categories = ArchiveFileCategory.all @tags = ArchiveTag.all - end + end if @module_app - @part.widget_path = @module_app.widgets.first if @module_app.needs_to_widget_option? + @part.widget_path = @module_app.widgets.first if( @module_app && @module_app.needs_to_widget_option?) respond_to do |format| format.js {} end @@ -129,8 +137,11 @@ class Admin::PagePartsController < ApplicationController def reload_widget_styles @module_app = ModuleApp.find(params[:module_app_id]) - style_ary = @module_app.get_widget_style[params[:id]] - @widget_style = style_ary[:style] unless style_ary.nil? + + @part = PagePart.find params[:id] + @user_choose =@widget_path= params[:frontend] + @widget_style = @module_app.widgets[@widget_path] + respond_to do |format| format.js {} diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb index 0e58a00f..e1cd0c0d 100644 --- a/app/controllers/admin/pages_controller.rb +++ b/app/controllers/admin/pages_controller.rb @@ -1,5 +1,5 @@ class Admin::PagesController < Admin::ItemsController - +helper Admin::PagePartsHelper def show @item = Page.find(params[:id]) respond_to do |format| @@ -19,15 +19,21 @@ class Admin::PagesController < Admin::ItemsController end def edit - @item = Page.find(params[:id]) + @item = @page =Page.find(params[:id]) + @user_choose = @item.app_frontend_url @apps = ModuleApp.excludes(app_pages: nil).entries @module_apps = ModuleApp.excludes(widgets: nil).where(enable_frontend: true).order_by(:title, :asc) @designs = Design.all.entries @design = @item.design ? @item.design : @designs.first - @app_frontend_urls = @item.module_app.app_pages if @item.module_app - + + if @item.module_app + @app_frontend_urls = @item.module_app.app_pages + @app_frontend_urls << 'default_widget' if @item.module_app.has_default_widget? + end + + if @item.module_app @module_app = @item.module_app @@ -84,13 +90,13 @@ class Admin::PagesController < Admin::ItemsController def update @item = Page.find(params[:id]) - if @item.module_app && @item.module_app.key == 'page_content' && @item.page_contexts.blank? - @item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id ) - end - - params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type] ) if params[:page][:frontend_field] - params[:page][:frontend_field_type] = nil + if @item.module_app && @item.module_app.key == 'page_content' && @item.page_contexts.blank? + @item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id ) + end + params[:page][:frontend_field] = params[:page][:frontend_field].zip( params[:page][:frontend_field_type] ) if params[:page][:frontend_field] + params[:page][:frontend_field_type] = nil + if @item.update_attributes(params[:page]) flash[:notice] = t('update.success.page') respond_to do |format| @@ -123,7 +129,44 @@ class Admin::PagesController < Admin::ItemsController format.js { @item = @item.parent } end end + + def reload_front_end_setting + @page = Page.find params[:id] + @module_app = ModuleApp.find params[:module_app_id] + @chosen_frontend = @user_choose = params[:frontend] + end + + def reload_frontend_pages + @page = Page.find params[:id] rescue nil + # @categories =[] + @module_app = ModuleApp.find(params[:module_app_id]) rescue nil + @app_frontend_urls = @module_app.nil? ? nil : @module_app.app_pages + @app_frontend_urls << 'default_widget' if(@module_app && @module_app.has_default_widget?) + + + case (@module_app.nil? ? nil : @module_app.key ) + when 'announcement' + @categories = BulletinCategory.all + @tags = AnnouncementTag.all + when 'news' + @categories = NewsBulletinCategory.all + @tags = NewsTag.all + when 'web_resource' + @categories = WebLinkCategory.all + @tags = WebResourceTag.all + when 'archive' + @categories = ArchiveFileCategory.all + @tags = ArchiveTag.all + else + @categories = [] + @tags = [] + end + respond_to do |format| + format.js {} + end + end + def reload_themes @design = Design.find(params[:id]) @themes = @design.themes diff --git a/app/controllers/admin/roles_controller.rb b/app/controllers/admin/roles_controller.rb index 3e8576c6..ade4aa43 100644 --- a/app/controllers/admin/roles_controller.rb +++ b/app/controllers/admin/roles_controller.rb @@ -3,7 +3,7 @@ class Admin::RolesController < ApplicationController layout "new_admin" before_filter :authenticate_user! before_filter :is_admin? - before_filter :set_attribute, :only => [:index, :show, :new, :edit] + before_filter :set_attribute, :only => [:index, :show, :new, :edit, :role_field, :sub_role, :add_sub_role, :edit_sub_role, :sub_role_field] helper Admin::AttributeValuesViewHelper def index @@ -13,11 +13,98 @@ class Admin::RolesController < ApplicationController def show + end + + def role_field + + @field_name = 'role' + + @attribute = Role.find(params[:role_id]) + + end + + def sub_role + + @attribute = Role.find(params[:role_id]) + @attribute_fields_upper_object = @attribute.sub_roles + + + end + + def add_sub_role + + @attribute = Role.find(params[:role_id]) + # @sub_attribute = Role.find(params[:role_id]) + + @sub_attribute = SubRole.new + @sub_attribute.role_id = params[:role_id] + + end + + def edit_sub_role + + @sub_attribute = SubRole.find(params[:role_id]) + + @attribute = Role.find(@sub_attribute.role_id) + + @sub_attribute.role_id = @sub_attribute.role_id + + end + + def sub_role_field + + @field_name = 'sub_role' + + @sub_attribute = SubRole.find(params[:role_id]) + + @attribute = Role.find(@sub_attribute.role_id) + + end + + def add_attribute_field + + if params[:sub_role] + + @field_name = 'sub_role' + + attribute = SubRole.find(params[:sub_role][:id]) rescue nil + @attribute_field_counter = attribute.attribute_fields.count + @attribute_field = attribute.attribute_fields.build + @attribute_field.save + + @attribute_field[:af_count] = @attribute_field_counter + + @attribute = SubRole.find(params[:sub_role][:id]) + + else + + @field_name = 'role' + + attribute = Role.find(params[:role_id]) rescue nil + @attribute_field_counter = attribute.attribute_fields.count + @attribute_field = attribute.attribute_fields.build + @attribute_field.save + + @attribute_field[:af_count] = @attribute_field_counter + + @attribute = Role.find(params[:role_id]) + + end + + respond_to do |format| + format.js { render 'add_attribute_field' } + end + + end def new @attribute = Role.new - render :template => 'admin/attributes/new' + + if !params[:parent_id] + render :template => 'admin/attributes/new' + end + end def edit @@ -27,24 +114,75 @@ class Admin::RolesController < ApplicationController end def create - @attribute = Role.new(params[:role]) - @attribute.save - redirect_to :action => :index + + if params[:sub_role] + + @sub_role = SubRole.new(params[:sub_role]) + + # @sub_role.role_id = params[:id] + + respond_to do |format| + if @sub_role.save + format.html { redirect_to(admin_role_sub_role_url(params[:sub_role][:role_id])) } + end + end + + else + + @attribute = Role.new(params[:role]) + @attribute.save + redirect_to :action => :index + + end + end def update - @attribute = Role.find(params[:id]) - @attribute.update_attributes(params[:role]) - respond_to do |format| - format.html { redirect_to :action => :index } - format.js { render 'admin/attributes/toggle_enable' } + + if params[:sub_role] + + @sub_role = SubRole.find(params[:sub_role][:id]) + @sub_role.update_attributes(params[:sub_role]) + @sub_role.attribute_fields.each{|t| t.destroy if t["to_delete"] == true} + respond_to do |format| + format.html { redirect_to(admin_role_sub_role_url(@sub_role.role_id)) } + format.js { render 'toggle_enable' } + end + + else + + @attribute = Role.find(params[:id]) + @attribute.update_attributes(params[:role]) + @attribute.attribute_fields.each{|t| t.destroy if t["to_delete"] == true} + respond_to do |format| + format.html { redirect_to :action => :index } + format.js { render 'admin/attributes/toggle_enable' } + end + end + end def destroy - @attribute = Role.find(params[:id]) - @attribute.destroy - redirect_to :action => :index + + if params[:sub_role] + + @sub_role = SubRole.find(params[:sub_role][:id]) + + respond_to do |format| + if @sub_role.destroy + format.html { redirect_to(admin_role_sub_role_url(@sub_role.role_id)) } + end + end + + else + + @attribute = Role.find(params[:id]) + @attribute.destroy + redirect_to :action => :index + + end + end protected diff --git a/app/controllers/admin/sub_roles_controller.rb b/app/controllers/admin/sub_roles_controller.rb new file mode 100644 index 00000000..e39f783d --- /dev/null +++ b/app/controllers/admin/sub_roles_controller.rb @@ -0,0 +1,4 @@ +class Admin::SubRolesController < RolesController + + +end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index dbd906ca..b0fc4adb 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -11,8 +11,8 @@ class ApplicationController < ActionController::Base rescue_from PageError, :with => :render_page_error layout :layout_by_resource - - helper :admin + + helper :admin, :orbit_form before_filter :set_locale, :set_site, :prepare_for_mobile helper_attr :site_valid_locales @@ -251,7 +251,13 @@ class ApplicationController < ActionController::Base def prepare_for_mobile if @site.mobile_on - session[:mobile_param] = params[:mobile] if params[:mobile] + session[:mobile_param] = if request.path =~ /mobile/ + '1' + elsif params[:mobile] + params[:mobile] + else + session[:mobile_param] + end request.format = :mobile if mobile_device? end end diff --git a/app/controllers/default_widget_controller.rb b/app/controllers/default_widget_controller.rb index 2e72cf81..637810cd 100644 --- a/app/controllers/default_widget_controller.rb +++ b/app/controllers/default_widget_controller.rb @@ -1,7 +1,12 @@ class DefaultWidgetController< OrbitWidgetController def front_end_available(var) - @page_part = PagePart.find params[:part_id] + @page_part = case params[:item_type] + when "page" + Page.find params[:page_id] + when "page_part" + PagePart.find params[:part_id] + end @page_part.module_app.enable_frontend? end @@ -9,23 +14,29 @@ class DefaultWidgetController< OrbitWidgetController @tag_class = nil @default_widget = @page_part.module_app.get_default_widget - @widget_image_field = @default_widget[:image] - data_limit = @page_part.widget_data_count.is_a?(Fixnum) ? @page_part.widget_data_count : (@page_part.widget_data_count.to_i rescue 3) + @widget_image_field = @default_widget["image"] || @default_widget[:image] + data_limit = case @page_part + when Page + @fields = @page_part.frontend_field + @page_part.frontend_data_count.is_a?(Fixnum) ? @page_part.frontend_data_count : (@page_part.frontend_data_count.to_i rescue 3) + when PagePart + @fields = @page_part.widget_field + @page_part.widget_data_count.is_a?(Fixnum) ? @page_part.widget_data_count : (@page_part.widget_data_count.to_i rescue 3) + end @data = eval(@default_widget["query"]).limit(data_limit).includes(@widget_image_field) - - @fields = @page_part.widget_field - + case params[:type] - when "typeA" - @tag_class = 'defulat_widget_typeA' - render "typeA" - when /typeB_/ - @tag_class = "defulat_widget_#{params[:type]}" - render "typeB" - when "typeC" - @tag_class = 'defulat_widget_typeC' - render "typeC" - end + when "typeA" + @tag_class = 'default_widget_typeA' + render "typeA" + when /typeB_/ + @tag_class = "default_widget_#{params[:type]}" + render "typeB" + when "typeC" + @tag_class = 'default_widget_typeC' + render "typeC" + end + end end diff --git a/app/controllers/desktop/journal_lists_controller.rb b/app/controllers/desktop/journal_lists_controller.rb deleted file mode 100644 index 2667a5a7..00000000 --- a/app/controllers/desktop/journal_lists_controller.rb +++ /dev/null @@ -1,18 +0,0 @@ -class Desktop::JournalListsController < ApplicationController - def index - level_types = JournalLevelType.all - all_journal_lists = WritingJournal.where(create_user_id: current_user.id) - all_journal_lists = all_journal_lists.map do |j| - [ j.journal_title, - j.journal_level_type_ids.map do |type| - level_types.find(type).title - end] - end - - @journal_lists = all_journal_lists.uniq - - respond_to do |format| - format.html { render :layout => false} - end - end -end diff --git a/app/controllers/desktop_controller.rb b/app/controllers/desktop_controller.rb index 4eef26be..bb3e12dc 100644 --- a/app/controllers/desktop_controller.rb +++ b/app/controllers/desktop_controller.rb @@ -117,8 +117,8 @@ class DesktopController< ApplicationController widge = DesktopWidget.find(tile.desktop_widget_id.to_s) # data_content = widge.widget_layout.file data_content = "/desktop/widget_layout?id="+tile.desktop_widget_id.to_s - jsfile = widge.javascripts.collect{|js| js.file} - cssfile = widge.css_default.file + jsfile = widge.javascripts.collect{|js| js.file.as_json[:file]} + cssfile = widge.css_default.file.as_json[:file] shape = widge.shape title = widge.name else @@ -212,4 +212,4 @@ class DesktopController< ApplicationController render :xml=>feed end -end \ No newline at end of file +end diff --git a/app/controllers/desktop_publications_controller.rb b/app/controllers/desktop_publications_controller.rb index 6c38de37..ae77ed19 100644 --- a/app/controllers/desktop_publications_controller.rb +++ b/app/controllers/desktop_publications_controller.rb @@ -1,9 +1,9 @@ require 'mime/types' class DesktopPublicationsController< ApplicationController - def journal_p - render "desktop/journal_p", :layout => false - end + #def journal_p + # render "desktop/journal_p", :layout => false + #end def books render "desktop/books", :layout => false diff --git a/app/controllers/front_controller.rb b/app/controllers/front_controller.rb index 0ef39633..eb14b25d 100644 --- a/app/controllers/front_controller.rb +++ b/app/controllers/front_controller.rb @@ -28,6 +28,10 @@ class FrontController < ApplicationController @page_id = params[:page_id] end + def show_inner_ad_image + @ad_image = AdImage.find(params[:id]) rescue nil + @ad_images = AdImage.all + end private diff --git a/app/controllers/mobile_controller.rb b/app/controllers/mobile_controller.rb index 5b05214e..d07e9a87 100644 --- a/app/controllers/mobile_controller.rb +++ b/app/controllers/mobile_controller.rb @@ -2,6 +2,8 @@ class MobileController < ApplicationController layout 'mobile' + before_filter :no_footer_for_app + def index date_now = Time.now @bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page(params[:page_main]).per(15) @@ -49,4 +51,10 @@ class MobileController < ApplicationController @page_title = @page_context.page.title end + protected + + def no_footer_for_app + @no_footer = true if request.path.starts_with?("/app") + end + end diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb index a6535c5f..57e6a5ff 100644 --- a/app/controllers/pages_controller.rb +++ b/app/controllers/pages_controller.rb @@ -65,7 +65,6 @@ class PagesController < ApplicationController def get_item module_app = ModuleApp.first(:conditions => {:key => params[:app_name]}) - if !params[:category_id].blank? && !params[:tag_id].blank? @item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id], :tag => params[:tag_id]}) @item = Item.first(:conditions => {:module_app_id => module_app.id, :app_frontend_url => params[:app_action], :category => params[:category_id], :tag => ''}) unless @item diff --git a/app/helpers/admin/items_helper.rb b/app/helpers/admin/items_helper.rb index 948df59c..fe76e1e0 100644 --- a/app/helpers/admin/items_helper.rb +++ b/app/helpers/admin/items_helper.rb @@ -11,8 +11,7 @@ module Admin::ItemsHelper no_nested = 'no-nest' end ret << "
  • " - # ret << "" - ret << "
    " + ret << "
    " ret << (link_to node.title, dest, :class => 'js_history') ret << "
    " ret << (link_to t(:edit), eval("edit_admin_#{node.class.to_s.downcase}_path(node)"), :class => 'js_history') if node.class.to_s.eql?('Page') diff --git a/app/helpers/admin/page_parts_helper.rb b/app/helpers/admin/page_parts_helper.rb index 8e2951f5..24f21b78 100644 --- a/app/helpers/admin/page_parts_helper.rb +++ b/app/helpers/admin/page_parts_helper.rb @@ -9,14 +9,86 @@ module Admin::PagePartsHelper end end - def widget_field_options(i) + def widget_field_options(i,local_item=nil) + local_item = @part if local_item.nil? && @part + local_item = @page if local_item.nil? && @page options = @module_app.widget_fields.collect{|widget_field| [I18n.t(widget_field[1]), widget_field[0]]} - options_for_select(options, (@part[:widget_field][i][0] if (@part && !@part[:widget_field].blank? && !@part[:widget_field][i].blank?)) ) + + case local_item + when Page + options_for_select(options, (local_item[:frontend_field][i][0] if (local_item && !local_item[:frontend_field].blank? && !local_item[:frontend_field][i].blank?)) ) + when PagePart + options_for_select(options, (local_item[:widget_field][i][0] if (local_item && !local_item[:widget_field].blank? && !local_item[:widget_field][i].blank?)) ) + end end - def widget_fiield_type_options(i) + def widget_fiield_type_options(i,local_item=nil) options = LIST[:widget_field_type].collect{|widget_field| [widget_field.humanize, widget_field]} - options_for_select(options, (@part[:widget_field][i][1] if (@part && !@part[:widget_field].blank? && !@part[:widget_field][i].blank?)) ) + local_item = @part if local_item.nil? && @part + local_item = @page if local_item.nil? && @page + + case local_item + when Page + options_for_select(options, (local_item[:frontend_field][i][1] if (local_item && !local_item[:frontend_field].blank? && !local_item[:frontend_field][i].blank?)) ) + when PagePart + options_for_select(options, (local_item[:widget_field][i][1] if (local_item && !local_item[:widget_field].blank? && !local_item[:widget_field][i].blank?)) ) + end + end + + def tag_checked_value(part,radio_value) + if radio_value.blank? + (part.nil? || part[:tag].blank?)? true : false + else + part and (part[:tag] == radio_value.to_s) ? true : false + end + end + + def category_checked_value(part,radio_value) + if radio_value.blank? + (part.nil? || part[:category].blank?)? true : false + else + part and (part[:category] == radio_value.to_s) ? true : false + end + end + + def style_checked_value(part,radio_value) + case part + when Page + if part.frontend_style.nil? && radio_value == "typeA" + true + else + (part.frontend_style == radio_value) ? true : false + end + when PagePart + if part.widget_style.nil? && radio_value == "typeA" + true + else + (part.widget_style == radio_value) ? true : false + end + when nil + false + end + end + + def nil_radio_button(part,tag_or_cate) + field_name = case part + when PagePart + 'page_part' + when Page + 'page' + end + content_tag :label,:class=>"radio inline" do + op = radio_button(field_name, tag_or_cate, '' , :checked => eval("#{tag_or_cate}_checked_value(part,'')")) + op << I18n.t("default_widget.no_value") + end + end + + def show_default_widget_setting_panel + @module_app && @module_app.has_default_widget? && (!@user_choose.nil? && @user_choose== 'default_widget') #&& @part.widget_path == 'default_widget' + end + + def show_custom_widget_setting_panel + true end end \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e20a0c29..980db7bc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -54,8 +54,14 @@ module ApplicationHelper raw(formatted_messages.join) end - def link_back - link_to t('back'), get_go_back, :class => 'nav' + def link_back(custom_class=nil) + case custom_class + when nil + link_to t('back'), get_go_back, :class => 'nav' + else + link_to t('back'), get_go_back, :class => custom_class + end + end # Clean the link back @@ -254,6 +260,10 @@ module ApplicationHelper object.strftime("%Y-%m-%d") end + def display_time(object) + object.strftime("%H:%M") + end + def share_links(object, key) content_tag :div, :class => 'fb' do concat social_share_button_tag(object.title, :fb_url => generate_fb_url(object,key), :image => "http://#{request.env['HTTP_HOST']}#{object.image_url}") @@ -278,4 +288,9 @@ module ApplicationHelper end end + # NTU link + def get_link(site_number) + "http://#{request.host}:2#{site_number}00" + end + end diff --git a/app/helpers/attribute_fields_helper.rb b/app/helpers/attribute_fields_helper.rb index 2705dc8f..be1b39ee 100644 --- a/app/helpers/attribute_fields_helper.rb +++ b/app/helpers/attribute_fields_helper.rb @@ -149,7 +149,7 @@ protected link_entry_ary = [".#{get_pairing_tab_class({})}",".#{key}"] link_entry_ary << ".add_more_item_#{add_more_counter}" if can_add_more link_entry = link_entry_ary.join - content_tag(:li,link_to(I18n.t("langs."+key),link_entry,:data=>{:toggle=>"tab"}),:class=>(key == I18n.locale.to_s ? "active" : nil),:for=>key) + content_tag(:li,link_to(I18nVariable.from_locale(key),link_entry,:data=>{:toggle=>"tab"}),:class=>(key == I18n.locale.to_s ? "active" : nil),:for=>key) end.join.html_safe # of VALID_LOCALES.collect for tabs end # of content ul end diff --git a/app/helpers/default_widget_helper.rb b/app/helpers/default_widget_helper.rb index acab557c..645f50f0 100644 --- a/app/helpers/default_widget_helper.rb +++ b/app/helpers/default_widget_helper.rb @@ -49,7 +49,8 @@ module DefaultWidgetHelper when nil eval method_entry else - eval("#{method_entry}('#{object}')" ) + object = "'#{object.to_s}'" if object.class == BSON::ObjectId + eval("#{method_entry}(#{object})" ) end end diff --git a/app/helpers/desktop/co_author_relations_helper.rb b/app/helpers/desktop/co_author_relations_helper.rb deleted file mode 100644 index fa03bbae..00000000 --- a/app/helpers/desktop/co_author_relations_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Desktop::CoAuthorRelationsHelper -end diff --git a/app/helpers/desktop/journal_lists_helper.rb b/app/helpers/desktop/journal_lists_helper.rb deleted file mode 100644 index e21dc09f..00000000 --- a/app/helpers/desktop/journal_lists_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Desktop::JournalListsHelper -end diff --git a/app/helpers/front_helper.rb b/app/helpers/front_helper.rb new file mode 100644 index 00000000..6a276d96 --- /dev/null +++ b/app/helpers/front_helper.rb @@ -0,0 +1,9 @@ +module FrontHelper + + def ad_image_link(ad_image) + link = ad_image.out_link + link = front_show_inner_ad_image_path(:id=> ad_image.id) if link.blank? && !ad_image.context.blank? + link + end + +end \ No newline at end of file diff --git a/app/helpers/orbit_form_helper.rb b/app/helpers/orbit_form_helper.rb new file mode 100644 index 00000000..30133f19 --- /dev/null +++ b/app/helpers/orbit_form_helper.rb @@ -0,0 +1,104 @@ +module OrbitFormHelper + def self.included(base) + ActionView::Helpers::FormBuilder.send(:include, Orbit::FormBuilder) + end + + def datetime_picker(object_name, method, options = {}) + options[:icon_time] ||= 'icons-clock' + options[:icon_date] ||= 'icons-calendar' + options[:icon_clear] ||= 'icons-cross-3' + options[:input_class] ||= 'input-large' + options[:value] ||= options[:object][method] if options[:object] && options[:object][method] + case options[:picker_type] + when 'date' + content_tag :div, :id => options[:id], :class => options[:class] do + date_picker(object_name, method, options) + end + when 'time' + content_tag :div, :id => options[:id], :class => options[:class] do + time_picker(object_name, method, options) + end + when 'separated' + options[:label] ||= I18n.t('datetime_picker.separated.label') + content_tag :div, :id => options[:id], :class => "separated_picker #{options[:class]}" do + concat label_tag options[:label] unless options[:no_label] + concat hidden_field(object_name, method) + concat separated_picker(object_name, method, options) + end + else + content_tag :div, :id => options[:id], :class => options[:class] do + default_picker(object_name, method, options) + end + end + end + + def date_picker(object_name, method, options) + custom = {} + custom[:format] = 'yyyy-MM-dd' + custom[:value] = display_date(options[:value]) if options[:value] + custom[:picker_class] = 'date_picker' + custom[:label] = options[:label] || I18n.t('datetime_picker.date.label') + custom[:placeholder] = options[:placeholder] || I18n.t('datetime_picker.date.placeholder') + picker(object_name, method, options.merge(custom)) + end + + def default_picker(object_name, method, options) + custom = {} + custom[:format] = 'yyyy-MM-dd hh:mm' + custom[:value] = display_date_time(options[:value]) if options[:value] + custom[:picker_class] = 'default_picker' + custom[:label] = options[:label] || I18n.t('datetime_picker.default.label') + custom[:placeholder] = options[:placeholder] || I18n.t('datetime_picker.default.placeholder') + picker(object_name, method, options.merge(custom)) + end + + def time_picker(object_name, method, options) + custom = {} + custom[:format] = 'hh:mm' + custom[:value] = display_time(options[:value]) if options[:value] + custom[:picker_class] = 'time_picker' + custom[:label] = options[:label] || I18n.t('datetime_picker.time.label') + custom[:placeholder] = options[:placeholder] || I18n.t('datetime_picker.time.placeholder') + picker(object_name, method, options.merge(custom)) + end + + def separated_picker(object_name, method, options) + custom = {} + custom[:no_label] = true + custom[:separated] = true + date_picker(nil, nil, options.merge(custom)) + time_picker(nil, nil, options.merge(custom)) + end + + + def single_picker(object_name, method, options) + content_tag :div, :id => options[:id], :class => options[:class] do + picker(object_name, method, options) + end + end + + def double_picker(object_name, method, options) + + end + + def picker(object_name, method, options) + content_tag :div, :class => "#{options[:picker_class]} input-append", :style => "#{(options[:picker_class].eql?('time_picker') && options[:value].blank? && options[:separated]) ? 'pointer-events:none' : nil}" do + concat label_tag options[:label] unless options[:no_label] + concat text_field object_name, method, :placeholder => options[:placeholder], :class => options[:input_class], 'data-format' => options[:format], :value => options[:value] + concat (content_tag :span, :class => 'add-on clearDate' do + content_tag :i, nil, :class => options[:icon_clear] + end) + concat (content_tag :span, :class => 'add-on iconbtn' do + content_tag :i, nil, 'data-time-icon' => options[:icon_time], 'data-date-icon' => options[:icon_date] + end) + end + end + +end + +module Orbit::FormBuilder + # ActionPack's metaprogramming would have done this for us, if FormHelper#labeled_input + # had been defined at load. Instead we define it ourselves here. + def datetime_picker(method, options = {}) + @template.datetime_picker(@object_name, method, objectify_options(options)) + end +end \ No newline at end of file diff --git a/app/models/ad_image.rb b/app/models/ad_image.rb index c01bc6b4..aad34852 100644 --- a/app/models/ad_image.rb +++ b/app/models/ad_image.rb @@ -5,7 +5,10 @@ class AdImage mount_uploader :file, ImageUploader field :title, localize: true - field :context, localize: true + field :context, localize: true + field :to_save, :type => Boolean + field :to_destroy, :type => Boolean + field :direct_to_after_click,type: Boolean @@ -16,28 +19,12 @@ class AdImage field :post_date,type: Date field :unpost_date,type: Date - - field :to_save, :type => Boolean - field :to_destroy, :type => Boolean belongs_to :ad_banner - # validates_numericality_of :weight, greater_than_or_equal_to: 1,less_than_or_equal_to: 10 - # validates_format_of :out_link, with: /(http:\/\/.*|)/ ,:message => 'Need a valid URL' - attr_reader :parse_post_date,:parse_unpost_date - before_validation :add_http validates :out_link, :format => /^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$/ix, :allow_blank => true - def parse_post_date=(att) - self.post_date = (Date.parse att.gsub(/\s+/, "") rescue nil) - end - - - def parse_unpost_date=(att) - self.unpost_date = (Date.parse att.gsub(/\s+/, "") rescue nil) - end - def display? if (self.post_date <= Date.today && (self.unpost_date.nil? || self.unpost_date>= Date.today) rescue false) return true diff --git a/app/models/module_app.rb b/app/models/module_app.rb index aa0f0008..d188a70b 100644 --- a/app/models/module_app.rb +++ b/app/models/module_app.rb @@ -163,6 +163,16 @@ class ModuleApp end end + def has_default_widget? + case self[:widgets] + when Array + false + when Hash + self[:widgets].has_key? 'default_widget' + end + + end + protected def set_key diff --git a/app/models/page_part.rb b/app/models/page_part.rb index ebaac684..b48c8060 100644 --- a/app/models/page_part.rb +++ b/app/models/page_part.rb @@ -23,6 +23,15 @@ class PagePart before_save :delete_empty_widget_field after_save :update_parent + # def module_app + # if self[:module_app] + # self[:module_app] + # elsif self[:kind] == 'module_widget' + # self.page.module_app + # else + # nil + # end + # end protected @@ -37,5 +46,4 @@ class PagePart self.page.save end - end \ No newline at end of file diff --git a/app/models/user/attribute.rb b/app/models/user/attribute.rb index c0970863..a1367c9f 100644 --- a/app/models/user/attribute.rb +++ b/app/models/user/attribute.rb @@ -6,7 +6,9 @@ class Attribute field :key field :built_in, :type => Boolean, :default => false field :disabled, :type => Boolean, :default => false - field :title, localize: true + field :title, localize: true + + field :to_search, :type => Boolean, :default => false has_many :attribute_fields, :autosave => true, :dependent => :destroy accepts_nested_attributes_for :attribute_fields, :allow_destroy => true diff --git a/app/models/user/attribute_field.rb b/app/models/user/attribute_field.rb index d486ccd0..0a6c4ac3 100644 --- a/app/models/user/attribute_field.rb +++ b/app/models/user/attribute_field.rb @@ -11,6 +11,9 @@ class AttributeField field :built_in, :type => Boolean, :default => false field :disabled, :type => Boolean, :default => false field :to_delete,:type=> Boolean,:default => false + + field :to_search,:type=> Boolean,:default => false + field :typeA,:type=> Hash,:default=>{:cross_lang=>false} field :typeB,:type=> Hash,:default=>{} field :typeC,:type=> Hash,:default=>{:calendar=>"west_calendar",:format=>"format3"} diff --git a/app/models/user/role.rb b/app/models/user/role.rb index cd3d6775..7291c88c 100644 --- a/app/models/user/role.rb +++ b/app/models/user/role.rb @@ -1,4 +1,4 @@ -class Role +class Role < Attribute include Mongoid::Document include Mongoid::Timestamps @@ -6,12 +6,13 @@ class Role field :key field :built_in, :type => Boolean, :default => false field :disabled, :type => Boolean, :default => false + field :title, localize: true has_many :sub_roles, :autosave => true, :dependent => :destroy has_many :users has_many :statuses, :autosave => true, :dependent => :destroy - has_many :attribute_fields, :autosave => true, :dependent => :destroy + # has_many :attribute_fields, :autosave => true, :dependent => :destroy accepts_nested_attributes_for :sub_roles, :allow_destroy => true def is_built_in? diff --git a/app/models/user/user.rb b/app/models/user/user.rb index ac32423f..26c8a042 100644 --- a/app/models/user/user.rb +++ b/app/models/user/user.rb @@ -72,14 +72,32 @@ class User sub_roles.where(role_id: role.id) end - def disable_sub_role=(var) + def disable_role=(var) var[:id].each do |id,val| # binding.pry if id == '5052c5b22b5c49ab02000004' if (val=="true") + self.roles = self.roles.reject{|t| t.id.to_s==id} + elsif(val=="false") + self.roles << Role.find(id) + end + end + end + + def disable_sub_role=(var) + var[:id].each do |id,val| + + @sr = SubRole.find(id) + + @roid = Role.find(@sr.role_id.to_s) + + # binding.pry if id == '5052c5b22b5c49ab02000004' + + if ( self.roles.include?(@roid) == false or val=="true") self.sub_roles = self.sub_roles.reject{|t| t.id.to_s==id} elsif(val=="false") self.sub_roles << SubRole.find(id) end + end end @@ -189,7 +207,8 @@ class User protected def save_roles - self.roles = self.sub_roles.collect{|t| t.role}.uniq + # self.roles = self.sub_roles.collect{|t| t.role}.uniq + self.roles = self.roles.uniq end diff --git a/app/views/admin/ad_banners/_ad_image_update.html.erb b/app/views/admin/ad_banners/_ad_image_update.html.erb index 281d0753..b0f6c63c 100644 --- a/app/views/admin/ad_banners/_ad_image_update.html.erb +++ b/app/views/admin/ad_banners/_ad_image_update.html.erb @@ -2,7 +2,7 @@ <%= image_tag ad_image.file rescue nil%>

    <%= ad_image.display? ? "[#{t('ad.showing')}]" : "[#{t('ad.not_showing')}]" %> - <%= "#{ad_image.post_date ||'NeedReset' }~#{ad_image.unpost_date || 'NeedReset'}" %> + <%= "#{ad_image.post_date} ~ #{ad_image.unpost_date}" %>

    <%if at_least_module_manager || sub_manager?(ad_image.ad_banner) %>

    diff --git a/app/views/admin/ad_images/_form.html.erb b/app/views/admin/ad_images/_form.html.erb index fd139347..884c08c0 100644 --- a/app/views/admin/ad_images/_form.html.erb +++ b/app/views/admin/ad_images/_form.html.erb @@ -1,13 +1,7 @@ -<% content_for :page_specific_css do %> - <%= stylesheet_link_tag "lib/datepicker" %> -<% end %> <% content_for :page_specific_javascript do %> - <%= javascript_include_tag "lib/datepicker" %> - <%= javascript_include_tag "lib/date.format.js" %> <%= javascript_include_tag "inc/modal-preview" %> <%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %> <%= javascript_include_tag "inc/jquery.imagesloaded.js" %> - <% end %> @@ -16,62 +10,19 @@

    -
    - +
    +

    <%= t(:date_) %>

    -
    -
    - - <%= f.hidden_field :parse_post_date,:value => @ad_image.post_date.strftime('%Y / %m / %d') %> - <%= f.hidden_field :parse_unpost_date,:value => @ad_image.unpost_date.strftime('%Y / %m / %d')%> - -
    -
    -
    -
    - + <%= f.datetime_picker :post_date, :picker_type => 'date', :label => t(:start_date) %> + <%= f.datetime_picker :unpost_date, :picker_type => 'date', :label => t(:end_date) %>
    -
    - +
    +

    <%= t(:picture) %>

    @@ -98,18 +49,18 @@
    -
    - +
    +
    -

    <%= t(:type) %>

    +

    <%= t(:type) %>

    <%= f.select :link_open ,AdImage::LINK_OPEN_TYPES%>
    -
    - +
    +

    <%= t(:frequency) %>

    @@ -118,10 +69,10 @@
    @@ -42,7 +42,7 @@ <% end -%>
    @@ -52,7 +52,7 @@ <% end -%>
    <% if params[:at].blank? #header for index%> diff --git a/app/views/admin/users_new_interface/_plugin_summary.html.erb b/app/views/admin/users_new_interface/_plugin_summary.html.erb index 4db0b922..1c1c0589 100644 --- a/app/views/admin/users_new_interface/_plugin_summary.html.erb +++ b/app/views/admin/users_new_interface/_plugin_summary.html.erb @@ -1,5 +1,5 @@
    -

    Module Name

    +

    Module Name

    diff --git a/app/views/admin/users_new_interface/_role.html.erb b/app/views/admin/users_new_interface/_role.html.erb index 7d5f174c..c3adeacc 100644 --- a/app/views/admin/users_new_interface/_role.html.erb +++ b/app/views/admin/users_new_interface/_role.html.erb @@ -1,11 +1,27 @@ -
    -

    <%= role.title %>

    -
    + +<% role_disable = @user.roles.include?(role) ? false : true %> +
    +

    + <%= role.title %> + <%= hidden_field_tag("user[disable_role][id][#{role.id}]",role_disable,:for=>@form_index,:class=>"subrole_disable_field",:value=>role_disable)%> +

    + +
    + + <% role.attribute_fields.each do |rf|%> + + <%= rf.block_helper(@user,@form_index)%> + <% @form_index = @form_index +1 %> + + <% end %> + +<% @form_index = @form_index +1 %> - <% role.sub_roles.each do |sub_role| %> - <% sub_role_disable = @user.sub_roles.include?(sub_role) ? false : true %> + <% role.sub_roles.where(:disabled=>false).each do |sub_role| %> + <% sub_role_disable = @user.sub_roles.include?(sub_role) ? false : true %> + <%# sub_role_disable = !sub_role.disabled ? false : true %> <%#= hidden_field_tag("[user][new_attribute_values][sub_role][disable][#{sub_role.id}]",sub_role_disable)%> <%= sub_role.title %> diff --git a/app/views/admin/users_new_interface/_show_roles.html.erb b/app/views/admin/users_new_interface/_show_roles.html.erb index fa4775df..0ecfb0b2 100644 --- a/app/views/admin/users_new_interface/_show_roles.html.erb +++ b/app/views/admin/users_new_interface/_show_roles.html.erb @@ -1,9 +1,16 @@
    + <%= show_roles.title %>

    + <% show_roles.attribute_fields.where(:disabled=>false).each do |rf| %> + + + + + <% end -%> <%= render :partial => 'show_sub_role',:collection=> @user.get_sub_roles_by_role(show_roles)%>
    <%= rf.title %><%= show_attribute_value(@user.get_attribute_value(rf).get_value_by_locale(I18n.locale)) rescue '' %>
    diff --git a/app/views/admin/users_new_interface/_side_bar.html.erb b/app/views/admin/users_new_interface/_side_bar.html.erb index d4bb74b5..002e1be8 100644 --- a/app/views/admin/users_new_interface/_side_bar.html.erb +++ b/app/views/admin/users_new_interface/_side_bar.html.erb @@ -1,15 +1,17 @@ <%= content_tag :li, :class => active_for_controllers('users_new_interface') do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-member')+ content_tag(:span, t(:member)), admin_users_new_interface_index_path %> + <%= link_to content_tag(:i, nil, :class => 'icons-user')+ content_tag(:span, t(:member)), admin_users_new_interface_index_path %> <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('users_new_interface')) do -%> <%= content_tag :li, link_to((t(:all_member) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, admin_users_new_interface_index_path), :class => active_for_action('users_new_interface', 'index') %> - <%= content_tag :li, link_to((t(:add_member) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_admin_users_new_interface_path), :class => active_for_action('users_new_interface', 'new') %> - <%= content_tag :li, link_to((t(:roles) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_infos_path ), :class => active_for_action('users_new_interfacexx', 'index') %> - <%= content_tag :li, link_to((t(:info) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, admin_roles_path), :class => active_for_action('users_new_interfacexx', 'index') %> + <%= content_tag :li, link_to((t(:add_member) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_admin_users_new_interface_path), :class => active_for_action('users_new_interface', 'new') if (is_admin? rescue nil) %> + <%= content_tag :li, link_to((t(:roles) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_roles_path ), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %> + <%= content_tag :li, link_to((t(:info) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, edit_admin_info_path(Info.first.id.to_s)), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %> + <%= content_tag :li, link_to((t(:authorigation) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, '#'), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %> + <%= content_tag :li, link_to((t(:registrant) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, '#'), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %> <% end -%> <% end -%> <%= content_tag :li, :class => active_for_controllers('plugins') do -%> - <%= link_to content_tag(:i, nil, :class => 'icons-pie')+ content_tag(:span, t(:plugins)), admin_plugins_path %> + <%= link_to content_tag(:i, nil, :class => 'icons-pie')+ content_tag(:span, t(:analysis)), admin_plugins_path %> <%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('plugins')) do -%> <%= content_tag :li, link_to((t(:all_plugins) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, admin_plugins_path), :class => active_for_action('users_new_interface', 'index') %> <% end -%> diff --git a/app/views/admin/users_new_interface/edit.html.erb b/app/views/admin/users_new_interface/edit.html.erb index ba1754be..2312f2bb 100644 --- a/app/views/admin/users_new_interface/edit.html.erb +++ b/app/views/admin/users_new_interface/edit.html.erb @@ -1,5 +1,5 @@ <% content_for :side_bar do %> - <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-users', :side_bar_content => 'admin/users_new_interface/side_bar'} %> <% end %> <% content_for :page_specific_css do -%> diff --git a/app/views/admin/users_new_interface/index.html.erb b/app/views/admin/users_new_interface/index.html.erb index 4eb230c0..7c6d61a4 100644 --- a/app/views/admin/users_new_interface/index.html.erb +++ b/app/views/admin/users_new_interface/index.html.erb @@ -1,5 +1,5 @@ <% content_for :side_bar do %> - <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-users', :side_bar_content => 'admin/users_new_interface/side_bar'} %> <% end %> <%= render :partial => "js_and_css"%> diff --git a/app/views/admin/users_new_interface/index_summary.html.erb b/app/views/admin/users_new_interface/index_summary.html.erb index f2348d2e..8c50f7d9 100644 --- a/app/views/admin/users_new_interface/index_summary.html.erb +++ b/app/views/admin/users_new_interface/index_summary.html.erb @@ -1,5 +1,5 @@ <% content_for :side_bar do %> - <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-users', :side_bar_content => 'admin/users_new_interface/side_bar'} %> <% end %> <%= render :partial => "js_and_css"%> diff --git a/app/views/admin/users_new_interface/index_thumbnail.html.erb b/app/views/admin/users_new_interface/index_thumbnail.html.erb index 2510d099..2e958462 100644 --- a/app/views/admin/users_new_interface/index_thumbnail.html.erb +++ b/app/views/admin/users_new_interface/index_thumbnail.html.erb @@ -1,5 +1,5 @@ <% content_for :side_bar do %> - <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-users', :side_bar_content => 'admin/users_new_interface/side_bar'} %> <% end %> <%= render :partial => "js_and_css"%> diff --git a/app/views/admin/users_new_interface/new.html.erb b/app/views/admin/users_new_interface/new.html.erb index d52ff1c1..2d6fc612 100644 --- a/app/views/admin/users_new_interface/new.html.erb +++ b/app/views/admin/users_new_interface/new.html.erb @@ -1,5 +1,5 @@ <% content_for :side_bar do %> - <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-users', :side_bar_content => 'admin/users_new_interface/side_bar'} %> <% end %> <% content_for :page_specific_css do -%> diff --git a/app/views/admin/users_new_interface/plugin_dashbroad.html.erb b/app/views/admin/users_new_interface/plugin_dashbroad.html.erb index 320d4db3..834e66bd 100644 --- a/app/views/admin/users_new_interface/plugin_dashbroad.html.erb +++ b/app/views/admin/users_new_interface/plugin_dashbroad.html.erb @@ -1,5 +1,5 @@ <% content_for :side_bar do %> - <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-users', :side_bar_content => 'admin/users_new_interface/side_bar'} %> <% end %>
    diff --git a/app/views/admin/users_new_interface/show.html.erb b/app/views/admin/users_new_interface/show.html.erb index ad5168dd..9a1d2776 100644 --- a/app/views/admin/users_new_interface/show.html.erb +++ b/app/views/admin/users_new_interface/show.html.erb @@ -1,5 +1,5 @@ <% content_for :side_bar do %> - <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-users', :side_bar_content => 'admin/users_new_interface/side_bar'} %> <% end %> <%= render :partial => "js_and_css"%> diff --git a/app/views/admin/users_new_interface/temp_edit.html.erb b/app/views/admin/users_new_interface/temp_edit.html.erb index f99b93ad..f9bef61c 100644 --- a/app/views/admin/users_new_interface/temp_edit.html.erb +++ b/app/views/admin/users_new_interface/temp_edit.html.erb @@ -1,5 +1,5 @@ <% content_for :side_bar do %> - <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-users', :side_bar_content => 'admin/users_new_interface/side_bar'} %> <% end %> <% content_for :page_specific_css do -%> diff --git a/app/views/default_widget/typeA.html.erb b/app/views/default_widget/typeA.html.erb index c797ce73..f6e0eb54 100644 --- a/app/views/default_widget/typeA.html.erb +++ b/app/views/default_widget/typeA.html.erb @@ -1,6 +1,6 @@ <%= content_tag :div,:class=>@tag_class do%> -
    - +
    +
    <% @fields.each do |field|%> diff --git a/app/views/default_widget/typeB.html.erb b/app/views/default_widget/typeB.html.erb index 3d1fe462..12dade57 100644 --- a/app/views/default_widget/typeB.html.erb +++ b/app/views/default_widget/typeB.html.erb @@ -1,5 +1,5 @@ <%= content_tag :div,:class=>@tag_class do%> -
      +
        <% @data.each do |row_data| %> <%= content_tag(:li) do %>
        diff --git a/app/views/default_widget/typeC.html.erb b/app/views/default_widget/typeC.html.erb index fa4d1800..1fa99ee0 100644 --- a/app/views/default_widget/typeC.html.erb +++ b/app/views/default_widget/typeC.html.erb @@ -2,7 +2,7 @@
        <%= image_tag @data.first.send(@widget_image_field)%>
        -
          +
            <% @data.each do |row_data| %> <%= content_tag(:li) do %> <% @fields.each do |field|%> @@ -12,4 +12,4 @@ <% end %>
          more
          -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/desktop/co_author_relations/_new.html.erb b/app/views/desktop/co_author_relations/_new.html.erb deleted file mode 100644 index fc0d0891..00000000 --- a/app/views/desktop/co_author_relations/_new.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for(@co_author_relation, url: desktop_co_author_relations_path, html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %> - <%= render partial: 'desktop/co_author_relations/form' , locals: {:f => f}%> -<% end %> diff --git a/app/views/desktop/co_author_relations/_show_form.html.erb b/app/views/desktop/co_author_relations/_show_form.html.erb deleted file mode 100644 index ad943e45..00000000 --- a/app/views/desktop/co_author_relations/_show_form.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -<% @co_author_relations.each_with_index do |co_author_relation,i| %> - <% if ( i % 6 ) == 0 %> -
          -
            - <% end %> -
          • -
            <%= co_author_relation.relation %>
            -
            - <%= link_to 'Edit', edit_desktop_co_author_relation_path(co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %> - <%= link_to 'Destroy', desktop_co_author_relation_path(co_author_relation), "confirm-message"=>'Are you sure?', "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %> -
            -
          • - <% if ( i % 6 ) == 5 %> -
          -
          - <% end %> -<% end %> \ No newline at end of file diff --git a/app/views/desktop/co_author_relations/edit.html.erb b/app/views/desktop/co_author_relations/edit.html.erb deleted file mode 100644 index 0132d45b..00000000 --- a/app/views/desktop/co_author_relations/edit.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for(@co_author_relation, url: desktop_co_author_relation_path(@co_author_relation), html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationEditForm"} ) do |f| %> - <%= render partial: 'desktop/co_author_relations/form' , locals: {:f => f}%> -<% end %> diff --git a/app/views/desktop/co_authors/edit.html.erb b/app/views/desktop/co_authors/edit.html.erb deleted file mode 100644 index 015f6321..00000000 --- a/app/views/desktop/co_authors/edit.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: desktop_co_author_path(@co_author) do |f| %> - <%= render partial: 'desktop/co_authors/form', locals: {:f => f} %> -<% end %> diff --git a/app/views/desktop/co_authors/new.html.erb b/app/views/desktop/co_authors/new.html.erb deleted file mode 100644 index 1a4ec2d5..00000000 --- a/app/views/desktop/co_authors/new.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: desktop_co_authors_path do |f| %> - <%= render partial: 'desktop/co_authors/form', locals: {:f => f} %> -<% end %> diff --git a/app/views/desktop/index.html.erb b/app/views/desktop/index.html.erb index 9ce9df2f..01903447 100644 --- a/app/views/desktop/index.html.erb +++ b/app/views/desktop/index.html.erb @@ -1,104 +1,105 @@
          -
          -
            -
          • Home -
              -
            • App Manager
            • -
            • All Sections
            • -
            • Settings
            • -
            -
          • -
          • Publication -
              - -
            • Journal Papers
            • +
              +
                +
              • Home +
                  +
                • App Manager
                • +
                • All Sections
                • +
                • Settings
                • +
                +
              • +
              • Publication +
                  -
                • Seminar Papers
                • +
                • Journal Papers
                • -
                • Books
                • +
                • Seminar Papers
                • -
                -
              • -
              • Research -
                  -
                • Research Domain
                • -
                • Research Project
                • -
                • Patents
                • -
                • Labs
                • -
                -
              • -
              • Experience -
                  -
                • Working
                • -
                • Education
                • -
                • Honors
                • -
                • Activities
                • -
                • Clubs
                • -
                -
              • -
              • Learning & Teaching -
                  -
                • Courses
                • -
                • Homework
                • -
                • Certification
                • -
                -
              • -
              • Personal -
                  -
                • myPage
                • -
                • Blog
                • -
                • Album
                • -
                • Calendar
                • -
                • Files
                • -
                -
              • -
              • Orbit -
                  -
                • Academia Connection
                • -
                -
              • -
              • AppStore
              • -
              -
              -
              +
            • Books
            • + +
            +
          • +
          • Research +
              +
            • Research Domain
            • +
            • Research Project
            • +
            • Patents
            • +
            • Labs
            • +
            +
          • +
          • Experience +
              +
            • Working
            • +
            • Education
            • +
            • Honors
            • +
            • Activities
            • +
            • Clubs
            • +
            +
          • +
          • Learning & Teaching +
              +
            • Courses
            • +
            • Homework
            • +
            • Certification
            • +
            +
          • +
          • Personal +
              +
            • myPage
            • +
            • Blog
            • +
            • Album
            • +
            • Calendar
            • +
            • Files
            • +
            +
          • +
          • Orbit +
              +
            • Academia Connection
            • +
            +
          • +
          • AppStore
          • +
          +
          +
          - -
          - - -
          + +
          + + +
          +<%= javascript_include_tag "personal_journal" %> diff --git a/app/views/desktop/journal_pages/edit.html.erb b/app/views/desktop/journal_pages/edit.html.erb deleted file mode 100644 index 80d8ae2e..00000000 --- a/app/views/desktop/journal_pages/edit.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for @writing_journal, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: desktop_journal_page_path(@writing_journal) do |f| %> - <%= render partial: 'desktop/journal_pages/form', locals: {:f => f} %> -<%end%> diff --git a/app/views/desktop/journal_pages/new.html.erb b/app/views/desktop/journal_pages/new.html.erb deleted file mode 100644 index c872e7cf..00000000 --- a/app/views/desktop/journal_pages/new.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -<%= form_for @writing_journal, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: desktop_journal_pages_path do |f| %> - <%= render partial: 'desktop/journal_pages/form', locals: {:f => f} %> -<%end%> diff --git a/app/views/desktop/journal_pages/show.html.erb b/app/views/desktop/journal_pages/show.html.erb deleted file mode 100644 index f2a44a9c..00000000 --- a/app/views/desktop/journal_pages/show.html.erb +++ /dev/null @@ -1,2 +0,0 @@ -

          Desktop::JournalPages#show

          -

          Find me in app/views/desktop/journal_pages/show.html.erb

          diff --git a/app/views/front/show_banner.html.erb b/app/views/front/show_banner.html.erb index 921c360d..491dbe72 100644 --- a/app/views/front/show_banner.html.erb +++ b/app/views/front/show_banner.html.erb @@ -19,7 +19,7 @@
          <% (images = @ad_banner.ad_images).shuffle.each do |ad_image| %> <% if ad_image.display? %> - <%= ad_image.title || ' time_to_next='<%= @ad_banner.transition_msec %>' link_open='<%= ad_image.link_open %>' link_url='<%= (ad_image.out_link) %>' style=' <%= 'cursor:pointer;' if !ad_image.out_link.blank? %>'/> + <%= ad_image.title || ' title='<%= ad_image.title || ' ' %>' time_to_next='<%= @ad_banner.transition_msec %>' link_open='<%= ad_image.link_open %>' link_url='<%= ad_image_link(ad_image) %>' style=' <%= 'cursor:pointer;' if !ad_image_link(ad_image).blank? %>'/> <% end %> <% end %>
          diff --git a/app/views/front/show_inner_ad_image.html.erb b/app/views/front/show_inner_ad_image.html.erb new file mode 100644 index 00000000..39350f62 --- /dev/null +++ b/app/views/front/show_inner_ad_image.html.erb @@ -0,0 +1,21 @@ +<%if @ad_image && @ad_image.display? %> +

          <%= @ad_image.title %>

          +
          +
          + <%= display_date_time(@ad_image.post_date) %> +
          +
          +
          + <%#= image_tag(@ad_image.image.url, :size => "320x240") if @ad_image.image.file %> + <%= link_to image_tag(@ad_image.file.url, :size => "320x240"), @ad_image.file.url, {:target => '_blank', :title => @ad_image.title} if @ad_image.file.file %> +
          +
          + <%= @ad_image.context.html_safe rescue '' %> +
          + + <%#= share_links(@ad_image, 'ad_image') %> + + +<% else %> + +<% end %> \ No newline at end of file diff --git a/app/views/layouts/_guest_orbit_menu.erb b/app/views/layouts/_guest_orbit_menu.erb index df292674..a1b12368 100644 --- a/app/views/layouts/_guest_orbit_menu.erb +++ b/app/views/layouts/_guest_orbit_menu.erb @@ -1,5 +1,5 @@ Orbit \ No newline at end of file diff --git a/app/views/layouts/_member_orbit_menu.erb b/app/views/layouts/_member_orbit_menu.erb index fc703960..c617b143 100644 --- a/app/views/layouts/_member_orbit_menu.erb +++ b/app/views/layouts/_member_orbit_menu.erb @@ -1,7 +1,7 @@ Orbit
        diff --git a/config/locales/ntu.en.yml b/config/locales/ntu.en.yml new file mode 100644 index 00000000..bffdd7c5 --- /dev/null +++ b/config/locales/ntu.en.yml @@ -0,0 +1,15 @@ +en: + + ntu: + site_names: + "00": "Dean of General Affairs" + "01": "Documentation Division" + "02": "Cashier Division" + "03": "General Service Division" + "04": "General Affairs Division, College of Social Science" + "05": "Property Management Division" + "06": "Procurement Division" + "07": "Facilities Service Division" + "08": "General Service Division" + "09": "Campus Security" + "10": "Construction and Maintenance Division" \ No newline at end of file diff --git a/config/locales/ntu.zh_tw.yml b/config/locales/ntu.zh_tw.yml new file mode 100644 index 00000000..cfd0f499 --- /dev/null +++ b/config/locales/ntu.zh_tw.yml @@ -0,0 +1,15 @@ +zh_tw: + + ntu: + site_names: + "00": "總務處" + "01": "文書組" + "02": "出納組" + "03": "事務組" + "04": "社科院總務分處" + "05": "保管組" + "06": "採購組" + "07": "經營管理組" + "08": "事務組" + "09": "駐警隊" + "10": "營繕組" \ No newline at end of file diff --git a/config/locales/picker.en.yml b/config/locales/picker.en.yml new file mode 100644 index 00000000..999d9195 --- /dev/null +++ b/config/locales/picker.en.yml @@ -0,0 +1,14 @@ +en: + + datetime_picker: + date: + label: Date + placeholder: "YYYY-MM-DD" + default: + label: Date and time + placeholder: "YYYY-MM-DD HH:MM" + separated: + label: Date and time + time: + label: Time + placeholder: "HH:MM" \ No newline at end of file diff --git a/config/locales/picker.zh_tw.yml b/config/locales/picker.zh_tw.yml new file mode 100644 index 00000000..1bedaa99 --- /dev/null +++ b/config/locales/picker.zh_tw.yml @@ -0,0 +1,14 @@ +zh_tw: + + datetime_picker: + date: + label: 日期 + placeholder: "YYYY-MM-DD" + default: + label: 日期和時間 + placeholder: "YYYY-MM-DD HH:MM" + separated: + label: 日期和時間 + time: + label: 時間 + placeholder: "HH:MM" \ No newline at end of file diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 291f5264..80ec221c 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -2,6 +2,11 @@ zh_tw: _locale: 中文 + front_page: + select_app_url: 模組前台樣式 + is_published: 是否公開 + menu_enable_lang: 選單啓用語系 + link_enable_lang: 連結生效語系 access: denied: app: @@ -106,6 +111,31 @@ zh_tw: default_css: 預設樣式表 delete: 刪除 delete_file: 刪除檔案 + default_widget: + no_support_setting: 沒有可以使用的設定 + no_value: 不設定(全部) + fields_: 前台輸出欄位 + fields_order: 輸出欄位順序 + fields_style: 輸出欄位樣式 + select_module_app: 套用模組 + select_widget_path: 外掛樣版選擇 + select_widget_style: 排版樣式 + widget_data_count: 顯示則數 + select_widget_ext_option: 模組延伸選項 + caption: + typeA: 表格式排版,簡單明瞭呈現內容 + typeB_style2: 一圖一文式,輸出欄位水平排列 + typeB_style3: 一圖一文式,輸出欄位垂直排列,圖片在左方 + typeB_style4: 一圖一文式,輸出欄位垂直排列,圖片在右方 + typeC: 一圖多文式,輸出欄位垂直排列 + data_source: + category: 資料來源:類別 + tag: 資料來源:標籤 + delete: + file: 刪除檔案 + success: + paper: Paper was successfully deleted. + delete_: 刪除 description: 描述 desktop: 桌面 disable: 關閉 @@ -313,7 +343,7 @@ zh_tw: template: 樣版 template_name: 樣版名稱 text: 內文 - theme: 主題 + theme: 套用頁面樣式 themes: 主題 title: 標題 top: 置頂 @@ -350,6 +380,7 @@ zh_tw: visitors_today: 今日造訪人次 yes_: "是" + nccu: date: 起迄日期 file: 附加檔案 diff --git a/config/routes.rb b/config/routes.rb index 20ddb31f..271b8366 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,6 @@ Orbit::Application.routes.draw do + # get "robots.txt" => 'robots#index' + devise_for :users do match "/users_passwd" => "desktop/registrations#update", :as => :users_passwd, :via => :put end @@ -40,7 +42,6 @@ Orbit::Application.routes.draw do end end - match 'ad_banners/:id/preview' => 'ad_banners#realtime_preview',:as => :realtime_preview_ad_banner,:via => :put match 'ad_banners/:id/rename' => 'ad_banners#rename',:as => :rename_ad_banner,:via => :post @@ -51,6 +52,7 @@ Orbit::Application.routes.draw do end resources :ad_images ,:except => [:show,:index] end + resources :dashboards resources :designs do collection do @@ -64,22 +66,33 @@ Orbit::Application.routes.draw do post 'upload_image' => 'designs#upload_image' end end + resources :infos do get 'add_attribute_field' end + resources :items + match 'update_position' => 'items#update_position' resources :links do member do get 'delete' end end + resources :pages do + collection do + get 'reload_after_module_changed', :action=>'reload_frontend_pages' + get 'reload_after_list_changed',:action=> 'reload_front_end_setting' + end member do get 'delete' get 'reload_themes' + get 'reload_after_module_changed',:action=>'reload_frontend_pages' + get 'reload_after_list_changed',:action=> 'reload_front_end_setting' end end + resources :module_apps do match 'manager_auth_proc' => "module_apps_new_interface#setting" ,:as => :manager_auth_proc,:via => :get match 'manager_auth_proc' => "module_apps_new_interface#update_setting" ,:as => :manager_auth_proc,:via => :post @@ -96,16 +109,17 @@ Orbit::Application.routes.draw do match 'remove_manager/:app_manager_id' ,:action=> 'remove_manager',:via => "delete",:as =>:remove_manager match 'remove_sub_manager/:app_sub_manager_id' ,:action=> 'remove_sub_manager',:via => "delete",:as =>:remove_sub_manager - get 'reload_frontend_pages' end end + resources :page_parts do member do - get 'reload_widgets' - get 'reload_widget_styles' + get 'reload_after_module_changed',:action=>'reload_widgets' + get 'reload_after_list_changed',:action=> 'reload_widget_styles' get 'reload_r_tag_options' end end + resources :plugins resources :purchases do collection do @@ -116,10 +130,16 @@ Orbit::Application.routes.draw do get 'download' end end + resources :roles do + get 'role_field' + get 'sub_role_field' + get 'sub_role' get 'add_sub_role' + get 'edit_sub_role' get 'add_attribute_field' end + resources :sites do get 'mail_setting' get 'site_info' @@ -130,18 +150,20 @@ Orbit::Application.routes.draw do get 'ui_theme' get 'change_design' end + resources :tags resources :users + resources :users_new_interface do member do get 'temp_edit' end end - + resources :member_selects do - match 'member_select_search' => "member_selects#member_select_search" ,:as => :member_select_search,:via => "post" - match 'member_select_add' => "member_selects#member_select_add" ,:as => :member_select_add,:via => "post" - end + match 'member_select_search' => "member_selects#member_select_search" ,:as => :member_select_search,:via => "post" + match 'member_select_add' => "member_selects#member_select_add" ,:as => :member_select_add,:via => "post" + end match 'module_store' => 'module_store#index' match 'module_store/show' => 'module_store#show' @@ -181,16 +203,7 @@ Orbit::Application.routes.draw do match '/desktop/widget_layout' => 'desktop#widget_layout' match '/desktop/temp_func/'=>'desktop#temp_func' - namespace :desktop do - match '/journal_pages/get_journals_json' => 'journal_pages#get_journals_json' - resources :journal_pages, except: :show - resources :journal_lists, only: :index - resources :co_authors, except: :show - resources :co_author_relations, except: :show - end - # namespace :desktop_publications do - match 'desktop_publications/journal_p'=>'desktop_publications#journal_p' match 'desktop_publications/books' => 'desktop_publications#books' match 'desktop_publications/books_list'=>'desktop_publications#books_list' match 'desktop_publications/books_add'=>'desktop_publications#books_add' @@ -231,14 +244,21 @@ Orbit::Application.routes.draw do #match '/desktop_orbit/eventajaxload' => 'desktop_publications#delete_journal' # match '/desktop_orbit/eventajaxload' => 'desktop_publications#update_journal' + def controller_paths(controller, actions) + actions.each do |action| + if action.eql? 'index' + match "#{controller}" => "#{controller}##{action}", :as => "#{controller}" + else + match "#{controller}/#{action}(/:id)" => "#{controller}##{action}", :as => "#{controller}_#{action}" + end + end + end - scope '/front' do - match 'show_banner/:id' => 'front#show_banner', :as => :front_show_banner - match 'show_footer' => 'front#show_footer', :as => :front_show_footer - match 'show_menu/:id' => 'front#show_menu', :as => :front_show_menu - match 'show_page_sub_menu' => 'front#show_page_sub_menu', :as => :front_show_page_sub_menu - match 'show_site_sub_menu' => 'front#show_site_sub_menu', :as => :front_show_site_sub_menu - match 'show_sitemap' => 'front#show_sitemap', :as => :front_show_sitemap + controller_paths :front, %w[show_banner show_footer show_menu show_page_sub_menu show_site_sub_menu show_sitemap] + controller_paths :mobile, %w[index announcement announcement_content dialog_contact dialog_copyright dialog_language map page page_content] + + scope 'app' do + controller_paths :mobile, %w[index announcement announcement_content dialog_contact dialog_copyright dialog_language map page page_content] end scope '/mobile' do @@ -280,4 +300,6 @@ Orbit::Application.routes.draw do root :to => 'pages#index' + match '/panel/ad_banner/front_end/inner_page/:id' => 'front#show_inner_ad_image', :as => :front_show_inner_ad_image + end diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index 1075fe75..d6bafdd3 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -184,15 +184,21 @@ module ParserCommon # page_contents def parse_contents_edit(body, page, edit=nil) public_r_tags = [] + url = '' body.css('.page_content').each do |content| ret = '' category = params[:category_id].blank? ? page[:category] : params[:category_id] tag = params[:tag_id].blank? ? page[:tag] : params[:tag_id] if (content["main"] == "true" && !page.module_app.nil?) - ret << "
        " + if page.app_frontend_url == 'default_widget' + url = "/panel/orbit_app/widget/#{page.frontend_style}?inner=true" + else + url = "/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}" + end + ret << "
        " else part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil part_title = part.title rescue nil @@ -213,7 +219,7 @@ module ParserCommon raise ModuleAppError,"PagePart can't find ModuleApp" if part.module_app.nil? "/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true" end - options = "&part_id=#{part.id}&category_id=#{!part[:category].blank? ? part[:category].blank? : category}&tag_id=#{!part[:tag].blank? ? part[:tag] : tag}&page=#{params[:page]}&search_query=#{params[:search_query]}&part_title=#{Rack::Utils.escape(part_title).gsub("+", "%20") rescue nil}" + options = "&part_id=#{part.id}&category_id=#{!part[:category].blank? ? part[:category].blank? : category}&tag_id=#{!part[:tag].blank? ? part[:tag] : tag}&page=#{params[:page]}&search_query=#{params[:search_query]}&part_title=#{Rack::Utils.escape(part_title).gsub("+", "%20") rescue nil}&item_type=page_part" ret << "
        " when 'public_r_tag' ret << "" diff --git a/lib/parsers/parser_front_end.rb b/lib/parsers/parser_front_end.rb index 29328174..49dccef0 100644 --- a/lib/parsers/parser_front_end.rb +++ b/lib/parsers/parser_front_end.rb @@ -95,11 +95,18 @@ module ParserFrontEnd # page_contents def parse_contents(body, page, edit=nil, locale) public_r_tags = [] + url = '' body.css('.page_content').each do |content| ret = '' if (content["main"] == "true" && !page.module_app.nil?) - url = "/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}\#{(\"/\" + params[:id]) if params[:id] && !params[:id].eql?(page.id.to_s)}\#{(\"/\" + params[:controller_action]) if params[:controller_action] && params[:id]}?inner=true" - options = "&page_id=#{page.id}&category_id=\#{category}&tag_id=\#{tag}&preview=\#{params[:preview]}&page_main=\#{params[:page_main]}&search_query=\#{params[:search_query]}&name=\#{params[:name]}" + if page.app_frontend_url == 'default_widget' + url = "/panel/orbit_app/widget/#{page.frontend_style}?inner=true" + else + "/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}\#{(\"/\" + params[:id]) if params[:id] && !params[:id].eql?(page.id.to_s)}\#{(\"/\" + params[:controller_action]) if params[:controller_action] && params[:id]}?inner=true" + end + + + options = "&page_id=#{page.id}&category_id=\#{category}&tag_id=\#{tag}&preview=\#{params[:preview]}&page_main=\#{params[:page_main]}&search_query=\#{params[:search_query]}&name=\#{params[:name]}&item_type=page" ret << "" else part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil @@ -117,7 +124,8 @@ module ParserFrontEnd "/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true" end - options = "&part_id=\#{part.id}&category_id=\#{!part[:category].blank? ? part[:category].blank? : category}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}" + options = "&part_id=\#{part.id}&category_id=\#{!part[:category].blank? ? part[:category].blank? : category}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}&item_type=page_part" + ret << "" when 'public_r_tag' diff --git a/lib/tasks/migrate.rake b/lib/tasks/migrate.rake index 63994388..cf8ec258 100644 --- a/lib/tasks/migrate.rake +++ b/lib/tasks/migrate.rake @@ -354,6 +354,7 @@ namespace :migrate do task :make_default_widget_work_config => :environment do a = ModuleApp.where(:key=>'announcement').first a.widgets[:default_widget] = ['typeA','typeC','typeB_style2','typeB_style3','typeB_style4'] + a.widgets = {"index"=>["1", "2"], "default_widget"=>["typeA", "typeC", "typeB_style2", "typeB_style3", "typeB_style4"]} a.widget_fields = [ ["title","announcement.default_widget.title"], ["bulletin_category_with_title","announcement.default_widget.bulletin_category_with_title"], @@ -383,5 +384,32 @@ namespace :migrate do end end + task :add_inner_page_for_ad_banner => :environment do + a = ModuleApp.where(:key=>'ad_banner').first + a.app_pages = ["inner_page"] + a.save + end + + + task :correct_gallery_and_web_resoure_config => :environment do + a = ModuleApp.where(:key=>'web_resource').first + if a + a.widgets = {} + a.widgets[:web_links] = [] + a.widgets[:home_list] = [] + a.app_pages = ["web_links"] + a.save + end + + a = ModuleApp.where(:key=>'gallery').first + if a + a.widgets = {} + a.widgets[:widget1] = [] + a.widget_options_fields_i18n = {"widget1"=>{"vertical"=>"gallery.widget_option.vertical", "horizontal"=>"gallery.widget_option.horizontal", "album_id"=>"gallery.widget_option.album"}} + a.widget_options = {"widget1"=>{"vertical"=>[1, 2], "horizontal"=>[1, 2, 3, 4, 5, 6], "album_id"=>{"query"=>"GalleryAlbum.all", "value"=>:id, "label"=>:name}}} + a.save + end + + end end diff --git a/vendor/built_in_modules/announcement/announcement.json b/vendor/built_in_modules/announcement/announcement.json index 191fbd7d..15d129a4 100644 --- a/vendor/built_in_modules/announcement/announcement.json +++ b/vendor/built_in_modules/announcement/announcement.json @@ -1,17 +1,24 @@ -{ - "title": "announcement", - "version": "0.1", - "organization": "Rulingcom", - "author": "RD dep", - "intro": "A simple blog……", - "update_info": "Some info", - "create_date": "11-11-2011", - "app_pages": ["bulletins"], - "widgets": { - "index":["1","2","3","4","5"], - "bulletins_and_web_links":[] - }, - "category": ["BulletinCategory"], - "widget_fields":["title","category","postdate"], - "enable_frontend": true -} + { +"app_pages":["bulletins"], +"author":"RD dep", +"create_date":"11-11-2011", +"enable_frontend":true, +"get_default_widget":{"query":"Bulletin.all","image":"image"}, +"intro":"A simple blog", +"key":"announcement", +"organization":"Rulingcom", +"title":"Announcement", +"update_info":"Some info", +"version":"0.1", +"widget_fields":[["title","announcement.default_widget.title"], + ["bulletin_category_with_title","announcement.default_widget.bulletin_category_with_title"], + ["postdate","announcement.default_widget.postdate"]], + "widget_fields_link_method":{"title":{"method":"panel_announcement_front_end_bulletin_path","args":"self"}, + "bulletin_category_with_title":{"method":"panel_announcement_front_end_bulletins_path", + "args":{"category_id":["bulletin_category","id"]} + }}, +"widget_options":null, +"widget_options_fields_i18n":null, +"widgets":{"index":["1","2"], +"default_widget":["typeA","typeC","typeB_style2","typeB_style3","typeB_style4"] +}} \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb index 622944a0..c8d32827 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb @@ -70,13 +70,6 @@ class Panel::Announcement::Widget::BulletinsController < OrbitWidgetController end - def bulletins_and_web_links - @tags = AnnouncementTag.any_in(key: ['students', 'alumni', 'employee', 'guest']).asc(:order) - @selected_tag = AnnouncementTag.find(params[:id]) rescue @tags[0] - @bulletins = @selected_tag.get_visible_bulletins(:postdate).available_for_lang(I18n.locale).can_display.page(params[:page]).per(5) rescue nil - @web_links = WebResourceTag.first(:conditions => {:en => @selected_tag[:en]}).get_visible_links(:created_at).available_for_lang(I18n.locale).page(params[:page]).per(5) rescue nil - end - def reload_bulletins @selected_tag = AnnouncementTag.find(params[:tag_id]) @bulletins = @selected_tag.get_visible_bulletins(:postdate).available_for_lang(I18n.locale).can_display.page(params[:page]).per(5) rescue nil diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_clear_filters.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_clear_filters.html.erb index 9ea5b97b..465e0ce5 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_clear_filters.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_clear_filters.html.erb @@ -1,3 +1,3 @@
        - <%= link_to content_tag(:i, nil, :class => 'icons-brush-large') + t(:clear), panel_announcement_back_end_bulletins_path(:filter => @filter, :sort => params[:sort], :direction => params[:direction], :clear => true, :type => type), :class => "btn btn-small js_history" %> + <%= link_to content_tag(:i, nil, :class => 'icons-cycle') + t(:clear), panel_announcement_back_end_bulletins_path(:filter => @filter, :sort => params[:sort], :direction => params[:direction], :clear => true, :type => type), :class => "btn btn-small js_history" %>
        \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb index 7fc9cb80..906db029 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb @@ -2,21 +2,21 @@ -
        +
        <%= render 'filter_status' %>
        diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb index 77ac7c9e..85ff463a 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb @@ -8,8 +8,8 @@
        -
        - +
        +

        <%= t('nccu.picture') %>

        @@ -40,32 +40,26 @@
        -
        - +
        +

        <%= t(:date_) %>

        - -
        - <%= f.datetime_select :postdate, {:use_month_numbers => true, :order => [:day, :month, :year] }, {:class => 'span1'} %> -
        + <%= f.datetime_picker :postdate, :picker_type => 'separated', :label => t(:start) %>
        - -
        - <%= f.datetime_select :deadline, {:use_month_numbers => true, :prompt => { :month => 'Month', :day => 'Day', :year => 'Year'}, :order => [:day, :month, :year] }, {:class => 'span1'} %> -
        + <%= f.datetime_picker :deadline, :picker_type => 'separated', :label => t(:end) %>
        <% if show_form_status_field(@bulletin)%>
        -
        - +
        +
        -

        <%= t(:status) %>

        +

        <%= t(:status) %>

        <%= content_tag :label,:class => "checkbox inline" do -%> @@ -86,8 +80,8 @@ <% end %> <% if @bulletin.is_rejected %>
        -
        - +
        +

        <%= t('approval.stat') %>

        @@ -96,8 +90,8 @@
        <% end %>
        -
        - +
        +

        <%= t('nccu.tags') %>

        @@ -114,8 +108,8 @@
        <% if params[:action] != 'new' %>
        -
        - +
        +
        @@ -183,8 +177,8 @@
    <% @bulletins.each do |post| %> - <% @item.frontend_field.each do |ff| %> + <% @item.frontend_field.each do |ff| %> - <% end %> + <% end %>
    <% if ff[1] == 'title' %> @@ -27,7 +26,7 @@ <% elsif ff[1] == 'date' %> <%= display_date(post.send(ff[0])) %> <% elsif ff[1] == 'category' %> - <%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").title rescue nil %> + <%= post.send(ff[0]).title rescue nil %> <% elsif ff[1] == 'img' %>
    <%= image_tag(post.send(wf[0]).url) %>
    <% elsif ff[1] == 'text' %> @@ -50,8 +49,8 @@ <% end %>
    diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.html.erb deleted file mode 100644 index a902c6d1..00000000 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -
    - -
    - -
    -

    <%= link_to t("announcement.bulletins"), panel_announcement_front_end_bulletins_path, :class => 'more' %>

    - -
    - - - -<% content_for :page_specific_javascript do %> - <%= javascript_include_tag "news_link" %> -<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.js.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.js.erb deleted file mode 100644 index 9439ce4d..00000000 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.js.erb +++ /dev/null @@ -1,3 +0,0 @@ -$('#bulletins_web_links_tags').html("<%= j render :partial => 'tag', :collection => @tags %>") -$('#bulletins_web_links_bulletins').html("<%= j render 'bulletins' if @bulletins %>") -$('#bulletins_web_links_web_links').html("<%= j render 'web_links' if @web_links %>") \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/init.rb b/vendor/built_in_modules/announcement/init.rb index 70299ea3..dad19454 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -4,9 +4,6 @@ module Announcement base_url File.expand_path File.dirname(__FILE__) personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile",:i18n=>'announcement.announcement' - -# personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile",:i18n=>'admin.announcement' - version "0.1" organization "Rulingcom" @@ -48,7 +45,6 @@ module Announcement :priority=>2, :active_for_action=>{:bulletins=>:index}, :available_for => [:all] - context_link 'announcement.add_new', :link_path=>"new_panel_announcement_back_end_bulletin_path" , :priority=>1, diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb index 1314a7c4..8912b1d2 100644 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_files/_form.html.erb @@ -7,10 +7,10 @@
    -
    - +
    +
    -

    Status

    +

    Status

    <%= f.check_box :is_top %><%= t('top') %> @@ -21,8 +21,8 @@
    -
    - +
    +

    Tags

    diff --git a/vendor/built_in_modules/calendar/app/views/panel/calendar/back_end/cals/index.html.erb b/vendor/built_in_modules/calendar/app/views/panel/calendar/back_end/cals/index.html.erb index f5491db9..0b3a4e29 100644 --- a/vendor/built_in_modules/calendar/app/views/panel/calendar/back_end/cals/index.html.erb +++ b/vendor/built_in_modules/calendar/app/views/panel/calendar/back_end/cals/index.html.erb @@ -19,7 +19,7 @@ <% end %>
    - Clear + Clear
    diff --git a/app/uploaders/gallery_uploader.rb b/vendor/built_in_modules/gallery/app/uploaders/gallery_uploader.rb similarity index 100% rename from app/uploaders/gallery_uploader.rb rename to vendor/built_in_modules/gallery/app/uploaders/gallery_uploader.rb diff --git a/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/albums/index.html.erb b/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/albums/index.html.erb index 32273335..f53ad5dc 100644 --- a/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/albums/index.html.erb +++ b/vendor/built_in_modules/gallery/app/views/panel/gallery/back_end/albums/index.html.erb @@ -21,7 +21,7 @@ <% end %>
    @@ -31,7 +31,7 @@ <% end %>
    diff --git a/vendor/built_in_modules/gallery/config/locales/zh_tw.yml b/vendor/built_in_modules/gallery/config/locales/zh_tw.yml index 6cb8af93..164c93cc 100644 --- a/vendor/built_in_modules/gallery/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/gallery/config/locales/zh_tw.yml @@ -35,4 +35,5 @@ zh_tw: no_description: 沒有描述 widget_option: horizontal: 水平圖片數量 - vertical: 垂直圖片數量 \ No newline at end of file + vertical: 垂直圖片數量 + album: 相簿 \ No newline at end of file diff --git a/vendor/built_in_modules/location/Gemfile b/vendor/built_in_modules/location/Gemfile index cdc455ae..a6e487f4 100644 --- a/vendor/built_in_modules/location/Gemfile +++ b/vendor/built_in_modules/location/Gemfile @@ -1,6 +1,6 @@ source "http://rubygems.org" -# Declare your gem's dependencies in gprs.gemspec. +# Declare your gem's dependencies in location.gemspec. # Bundler will treat runtime dependencies like base dependencies, and # development dependencies will be added by default to the :development group. gemspec diff --git a/vendor/built_in_modules/location/README.rdoc b/vendor/built_in_modules/location/README.rdoc index 0e425195..937b4141 100644 --- a/vendor/built_in_modules/location/README.rdoc +++ b/vendor/built_in_modules/location/README.rdoc @@ -1,3 +1,3 @@ = Location -This project rocks and uses MIT-LICENSE. \ No newline at end of file +This project rocks and uses MIT-LICENSE. diff --git a/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/.gitkeep b/vendor/built_in_modules/location/app/assets/images/location/.gitkeep similarity index 100% rename from vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/.gitkeep rename to vendor/built_in_modules/location/app/assets/images/location/.gitkeep diff --git a/vendor/built_in_modules/location/app/assets/javascripts/panel/location/back_end/locations.js b/vendor/built_in_modules/location/app/assets/javascripts/panel/location/back_end/locations.js new file mode 100644 index 00000000..dee720fa --- /dev/null +++ b/vendor/built_in_modules/location/app/assets/javascripts/panel/location/back_end/locations.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/app/views/desktop/co_authors/show.html.erb b/vendor/built_in_modules/location/app/assets/stylesheets/location/.gitkeep similarity index 100% rename from app/views/desktop/co_authors/show.html.erb rename to vendor/built_in_modules/location/app/assets/stylesheets/location/.gitkeep diff --git a/vendor/built_in_modules/location/app/assets/stylesheets/panel/location/back_end/locations.css b/vendor/built_in_modules/location/app/assets/stylesheets/panel/location/back_end/locations.css new file mode 100644 index 00000000..afad32db --- /dev/null +++ b/vendor/built_in_modules/location/app/assets/stylesheets/panel/location/back_end/locations.css @@ -0,0 +1,4 @@ +/* + Place all the styles related to the matching controller here. + They will automatically be included in application.css. +*/ diff --git a/vendor/built_in_modules/location/app/controllers/panel/location/back_end/locations_controller.rb b/vendor/built_in_modules/location/app/controllers/panel/location/back_end/locations_controller.rb new file mode 100644 index 00000000..5594bb7f --- /dev/null +++ b/vendor/built_in_modules/location/app/controllers/panel/location/back_end/locations_controller.rb @@ -0,0 +1,77 @@ +class Panel::Location::BackEnd::LocationsController < OrbitBackendController + include AdminHelper + + before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :create, :update, :delete] + before_filter :force_order_for_user,:except => [:get_locations,:index] + + def index + @location_infos = LocationInfo.all + respond_to do |format| + format.html # new.html.erb + format.json { render json: @locations } + end + end + + def new + @location_info = LocationInfo.new + + respond_to do |format| + format.html # new.html.erb + format.json { render json: @location } + end + end + + def edit + @location_info = LocationInfo.find(params[:id]) + end + + def show + @location_info = LocationInfo.find(params[:id]) + respond_to do |format| + format.html + format.json { render json: @location } + end + end + + def create + @location_info = LocationInfo.new(params[:location_info]) + if @location_info.save + flash[:success] = "Success!!" + redirect_to panel_location_back_end_locations_url + else + error_msg = @location_info.errors.full_messages + render 'new' + end + end + + def update + @location_info = LocationInfo.find(params[:id]) + @location_info.update_attributes(params[:location_info]) + redirect_to panel_location_back_end_locations_url + end + + def destroy + @location_info = LocationInfo.find(params[:id]) + @location_info.destroy + redirect_to panel_location_back_end_locations_url + + end + + def get_locations + location_infos = LocationInfo.all + @data = Array.new + + location_infos.each do |location| + picurl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.url}" + thumburl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.thumb.url}" + @data << { name: location.name, + pic_url: picurl, + thumb_url: thumburl, + longitude: location.longitude, + latitude: location.latitude, + description: location.description } + end + + render :json => JSON.pretty_generate({location: @data}) + end +end diff --git a/vendor/built_in_modules/location/app/helpers/panel/location/back_end/locations_helper.rb b/vendor/built_in_modules/location/app/helpers/panel/location/back_end/locations_helper.rb new file mode 100644 index 00000000..a354c2c9 --- /dev/null +++ b/vendor/built_in_modules/location/app/helpers/panel/location/back_end/locations_helper.rb @@ -0,0 +1,2 @@ +module Panel::Location::BackEnd::LocationsHelper +end diff --git a/vendor/built_in_modules/location/app/models/location_info.rb b/vendor/built_in_modules/location/app/models/location_info.rb new file mode 100644 index 00000000..23e87841 --- /dev/null +++ b/vendor/built_in_modules/location/app/models/location_info.rb @@ -0,0 +1,19 @@ +class LocationInfo + include Mongoid::Document + include Mongoid::Timestamps + + mount_uploader :file, LocationsUploader + + field :name, localize: true + field :description, localize: true + field :longitude, type: Float + field :latitude, type: Float + + validates :file, presence: true + validates :longitude, + numericality: { less_than_or_equal_to: 180.0, greater_than_or_equal_to: -180.0 }, + unless: Proc.new{self.longitude.blank?} + validates :latitude, + numericality: { less_than_or_equal_to: 90.0, greater_than_or_equal_to: -90.0 }, + unless: Proc.new{self.latitude.blank?} +end diff --git a/vendor/built_in_modules/location/app/uploaders/locations_uploader.rb b/vendor/built_in_modules/location/app/uploaders/locations_uploader.rb new file mode 100644 index 00000000..55056a5b --- /dev/null +++ b/vendor/built_in_modules/location/app/uploaders/locations_uploader.rb @@ -0,0 +1,61 @@ +class LocationsUploader < CarrierWave::Uploader::Base + + # Include RMagick or ImageScience support: + # include CarrierWave::RMagick + # include CarrierWave::ImageScience + include CarrierWave::MiniMagick + + # Choose what kind of storage to use for this uploader: + # storage :file + # storage :s3 + + # Override the directory where uploaded files will be stored. + # This is a sensible default for uploaders that are meant to be mounted: + def store_dir + "location/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" + end + + # Provide a default URL as a default if there hasn't been a file uploaded: + # def default_url + # "/images/fallback/" + [version_name, "default.png"].compact.join('_') + # end + + # Process files as they are uploaded: + # process :scale => [200, 300] + # + # def scale(width, height) + # # do something + # end + + # Create different versions of your uploaded files: + # version :thumb do + # process :scale => [50, 50] + # end + + version :thumb do + process :resize_to_fill => [150, 120] + end + + # Add a white list of extensions which are allowed to be uploaded. + # For images you might use something like this: + # def extension_white_list + # %w(jpg jpeg gif png) + # end + + # Override the filename of the uploaded files: + # def filename + # "something.jpg" if original_filename + # end + +# def manipulate! +# raise current_path.inspect +# image = ::MiniMagick::Image.open(current_path) +# image = yield(image) +# image.write(current_path) +# ::MiniMagick::Image.open(current_path) +# rescue ::MiniMagick::Error, ::MiniMagick::Invalid => e +# raise CarrierWave::ProcessingError.new("Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: #{e}") +# end + +end + diff --git a/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/_form.html.erb b/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/_form.html.erb new file mode 100644 index 00000000..d38b744c --- /dev/null +++ b/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/_form.html.erb @@ -0,0 +1,38 @@ + <% @location_info.errors.full_messages.each do |msg| %> +
  • * <%= msg %>
  • + <% end %> +
    + +
    + <%= f.fields_for :name_translations do |f| %> + <%= f.text_field locale, :class=>'span4', :value => (@location_info.name_translations[locale.to_s] rescue nil) %> + <% end %> +
    +
    +
    + +
    + <%= @location_info.file? ? ( link_to t(:view), @location_info.file.url, {:class => 'for_preview btn', :target => '_blank', :title => t(:view)}) : '' %> + <%= f.file_field :file %> +
    +
    +
    + +
    + <%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %> + <%= f.text_field :latitude, :class=>"span2", :placeholder => "Langitude" %> +
    +
    +
    + +
    + <%= f.fields_for :description_translations do |f| %> + <%= f.text_area locale, :class=>'span4', :cols=>"30", :row=>"5", :value => (@location_info.description_translations[locale.to_s] rescue nil) %> + <% end %> +
    +
    +
    +
    + <%= f.submit t("submit"), :class=>"btn" %> +
    +
    diff --git a/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/edit.html.erb b/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/edit.html.erb new file mode 100644 index 00000000..357907d8 --- /dev/null +++ b/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/edit.html.erb @@ -0,0 +1,4 @@ +<%= form_for @location_info, :url=> panel_location_back_end_location_path(@location_info), :html => { :class=>"form-horizontal"} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> + diff --git a/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/index.html.erb b/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/index.html.erb new file mode 100644 index 00000000..12d23773 --- /dev/null +++ b/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/index.html.erb @@ -0,0 +1,33 @@ + + + + + + + + + <%if is_manager? %> + + + <% end %> + + + + <% @location_infos.each do |location| %> + + + + + + + <%if is_manager? %> + + + <%end%> + + <% end %> + +
    <%= t('location.picture') %><%= t('location.name') %><%= t('location.longitude') %><%= t('location.latitude') %><%= t('location.description') %><%= t('location.edit') %><%= t('location.delete') %>
    <%= image_tag(location.file, alt: location.file, size: "50x50" ) if !location.file.blank? %><%= location.name %><%= location.longitude%><%= location.latitude%><%= location.description %><%= link_to 'Edit', edit_panel_location_back_end_location_path(location) %><%= link_to 'Destroy', panel_location_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %>
    +<%if is_manager? %> +<%= link_to 'New', new_panel_location_back_end_location_path %> +<% end %> diff --git a/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/new.html.erb b/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/new.html.erb new file mode 100644 index 00000000..36545064 --- /dev/null +++ b/vendor/built_in_modules/location/app/views/panel/location/back_end/locations/new.html.erb @@ -0,0 +1,3 @@ +<%= form_for @location_info, :url=> panel_location_back_end_locations_path, :html => { :class=>"form-horizontal"} do |f| %> + <%= render :partial => 'form', :locals => {:f => f} %> +<% end %> diff --git a/vendor/built_in_modules/location/lib/tasks/location_tasks.rake b/vendor/built_in_modules/location/lib/tasks/location_tasks.rake index ba45136c..152c5d6b 100644 --- a/vendor/built_in_modules/location/lib/tasks/location_tasks.rake +++ b/vendor/built_in_modules/location/lib/tasks/location_tasks.rake @@ -1,4 +1,4 @@ # desc "Explaining what the task does" -# task :gprs do +# task :location do # # Task goes here # end diff --git a/vendor/built_in_modules/location/location.gemspec b/vendor/built_in_modules/location/location.gemspec index 5d20e869..439256b7 100644 --- a/vendor/built_in_modules/location/location.gemspec +++ b/vendor/built_in_modules/location/location.gemspec @@ -1,11 +1,11 @@ $:.push File.expand_path("../lib", __FILE__) # Maintain your gem's version: -require "gprs/version" +require "location/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |s| - s.name = "gprs" + s.name = "location" s.version = Location::VERSION s.authors = ["TODO: Your name"] s.email = ["TODO: Your email"] diff --git a/vendor/built_in_modules/location/location.json b/vendor/built_in_modules/location/location.json new file mode 100644 index 00000000..01e89b5d --- /dev/null +++ b/vendor/built_in_modules/location/location.json @@ -0,0 +1,12 @@ +{ + "title": "location", + "version": "0.1", + "organization": "Rulingcom", + "author": "RD dep", + "intro": "A simple blog……", + "update_info": "Some info", + "create_date": "11-11-2011", + "widgets": [], + "category": [], + "enable_frontend": false +} diff --git a/vendor/built_in_modules/location/test/dummy/config/application.rb b/vendor/built_in_modules/location/test/dummy/config/application.rb index f03b73e0..e98216b3 100644 --- a/vendor/built_in_modules/location/test/dummy/config/application.rb +++ b/vendor/built_in_modules/location/test/dummy/config/application.rb @@ -3,7 +3,7 @@ require File.expand_path('../boot', __FILE__) require 'rails/all' Bundler.require -require "gprs" +require "location" module Dummy class Application < Rails::Application diff --git a/vendor/built_in_modules/location/test/functional/panel/location/back_end/locations_controller_test.rb b/vendor/built_in_modules/location/test/functional/panel/location/back_end/locations_controller_test.rb new file mode 100644 index 00000000..0edd65ab --- /dev/null +++ b/vendor/built_in_modules/location/test/functional/panel/location/back_end/locations_controller_test.rb @@ -0,0 +1,14 @@ +require 'test_helper' + +class Panel::Location::BackEnd::LocationsControllerTest < ActionController::TestCase + test "should get index" do + get :index + assert_response :success + end + + test "should get edit" do + get :edit + assert_response :success + end + +end diff --git a/vendor/built_in_modules/location/test/unit/helpers/panel/location/back_end/locations_helper_test.rb b/vendor/built_in_modules/location/test/unit/helpers/panel/location/back_end/locations_helper_test.rb new file mode 100644 index 00000000..9e39a511 --- /dev/null +++ b/vendor/built_in_modules/location/test/unit/helpers/panel/location/back_end/locations_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class Panel::Location::BackEnd::LocationsHelperTest < ActionView::TestCase +end diff --git a/vendor/built_in_modules/personal_book/app/views/panel/personal_book/back_end/writing_books/_form.html.erb b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/back_end/writing_books/_form.html.erb index cb6f342f..3b591b78 100644 --- a/vendor/built_in_modules/personal_book/app/views/panel/personal_book/back_end/writing_books/_form.html.erb +++ b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/back_end/writing_books/_form.html.erb @@ -7,8 +7,8 @@
    -
    - +
    +

    <%= f.label :author_type ,t("personal_book.author_type")%>

    @@ -24,8 +24,8 @@
    -
    - +
    +

    Tags

    diff --git a/vendor/built_in_modules/personal_book/app/views/panel/personal_book/plugin/writing_books/_form.html.erb b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/plugin/writing_books/_form.html.erb index f9cd05f0..afb1feb7 100644 --- a/vendor/built_in_modules/personal_book/app/views/panel/personal_book/plugin/writing_books/_form.html.erb +++ b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/plugin/writing_books/_form.html.erb @@ -7,8 +7,8 @@
    -
    - +
    +

    <%= f.label :author_type ,t("personal_book.author_type")%>

    @@ -24,8 +24,8 @@
    -
    - +
    +

    Tags

    diff --git a/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/back_end/diplomas/_form.html.erb b/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/back_end/diplomas/_form.html.erb index 45e207e8..2828be10 100644 --- a/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/back_end/diplomas/_form.html.erb +++ b/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/back_end/diplomas/_form.html.erb @@ -7,8 +7,8 @@
    -
    - +
    +

    Tags

    diff --git a/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/plugin/diplomas/_form.html.erb b/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/plugin/diplomas/_form.html.erb index 9dd062d2..ea7d9653 100644 --- a/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/plugin/diplomas/_form.html.erb +++ b/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/plugin/diplomas/_form.html.erb @@ -7,8 +7,8 @@
    -
    - +
    +

    Tags

    diff --git a/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/back_end/experiences/_form.html.erb b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/back_end/experiences/_form.html.erb index f275c346..b790124c 100644 --- a/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/back_end/experiences/_form.html.erb +++ b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/back_end/experiences/_form.html.erb @@ -7,8 +7,8 @@
    -
    - +
    +

    Tags

    diff --git a/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/plugin/experiences/_form.html.erb b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/plugin/experiences/_form.html.erb index f2156d5c..90e0778f 100644 --- a/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/plugin/experiences/_form.html.erb +++ b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/plugin/experiences/_form.html.erb @@ -7,8 +7,8 @@
    -
    - +
    +

    Tags

    diff --git a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/back_end/honors/_form.html.erb b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/back_end/honors/_form.html.erb index f0bdcf51..38ff35a8 100644 --- a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/back_end/honors/_form.html.erb +++ b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/back_end/honors/_form.html.erb @@ -7,8 +7,8 @@
    -
    - +
    +

    Tags

    diff --git a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/plugin/honors/_form.html.erb b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/plugin/honors/_form.html.erb index 99761d82..58bdec34 100644 --- a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/plugin/honors/_form.html.erb +++ b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/plugin/honors/_form.html.erb @@ -7,8 +7,8 @@
    -
    - +
    +

    Tags

    diff --git a/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal.js b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal.js new file mode 100644 index 00000000..57fc98e4 --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal.js @@ -0,0 +1 @@ +//= require_tree ./personal_journal/desktop diff --git a/app/assets/javascripts/desktop/journal_pages.js.erb b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js similarity index 99% rename from app/assets/javascripts/desktop/journal_pages.js.erb rename to vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js index 79f1d17e..a16830ba 100644 --- a/app/assets/javascripts/desktop/journal_pages.js.erb +++ b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js @@ -50,7 +50,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // return false; }) } - + var bindSecondaryHandlers = function(){ $("#journal_p div#paper_list a.icon-check-empty").click(function(){ if($(this).hasClass("icon-check-empty")){ @@ -177,7 +177,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // } var getData = function(){ - $.getJSON("/desktop/journal_pages/get_journals_json",function(journals){ + $.getJSON("/panel/personal_journal/desktop/get_journals_json",function(journals){ journalData = eval(journals); journalview(); bindHandlers(); diff --git a/app/controllers/desktop/co_author_relations_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_author_relations_controller.rb similarity index 95% rename from app/controllers/desktop/co_author_relations_controller.rb rename to vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_author_relations_controller.rb index f07cc07d..26b5acd9 100644 --- a/app/controllers/desktop/co_author_relations_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_author_relations_controller.rb @@ -1,4 +1,4 @@ -class Desktop::CoAuthorRelationsController < ApplicationController +class Panel::PersonalJournal::Desktop::CoAuthorRelationsController < ApplicationController def index @co_author_relations = CoAuthorRelation.all new diff --git a/app/controllers/desktop/co_authors_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_authors_controller.rb similarity index 94% rename from app/controllers/desktop/co_authors_controller.rb rename to vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_authors_controller.rb index 6d7b41d6..b9e1deaa 100644 --- a/app/controllers/desktop/co_authors_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_authors_controller.rb @@ -1,4 +1,4 @@ -class Desktop::CoAuthorsController < ApplicationController +class Panel::PersonalJournal::Desktop::CoAuthorsController < ApplicationController def index nils, not_nils = CoAuthor.where(name_id: current_user.id)\ .asc(:co_author).partition{|p| p.email.nil?} diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_p_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_p_controller.rb new file mode 100644 index 00000000..3526d6ff --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_p_controller.rb @@ -0,0 +1,5 @@ +class Panel::PersonalJournal::Desktop::JournalPController < ApplicationController + def journal_p + render panel_personal_journal_desktop_journal_p_path, :layout => false + end +end diff --git a/app/controllers/desktop/journal_pages_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb similarity index 81% rename from app/controllers/desktop/journal_pages_controller.rb rename to vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb index 8a2312b8..9599ce9a 100644 --- a/app/controllers/desktop/journal_pages_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb @@ -1,4 +1,4 @@ -class Desktop::JournalPagesController < ApplicationController +class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationController def index @writing_journal = WritingJournal.where(create_user_id: current_user.id) @level_types = JournalLevelType.all @@ -89,8 +89,8 @@ class Desktop::JournalPagesController < ApplicationController abstract: publication.abstract, coauthors: publication.authors, year: publication.year, - url_edit: edit_desktop_journal_page_path(publication), - url_delete: desktop_journal_page_path(publication), + url_edit: edit_panel_personal_journal_desktop_journal_page_path(publication), + url_delete: panel_personal_journal_desktop_journal_page_path(publication), files: publication.writing_journal_files.collect{|file| {title: file.title, url: file.file.url, icon: check_file_type(file.file.url)} } @@ -104,4 +104,20 @@ class Desktop::JournalPagesController < ApplicationController render json: JSON.pretty_generate(data) end + def journal_type + level_types = JournalLevelType.all + all_journal_lists = WritingJournal.where(create_user_id: current_user.id) + all_journal_lists = all_journal_lists.map do |j| + [ j.journal_title, + j.journal_level_type_ids.map do |type| + level_types.find(type).title + end] + end + + @journal_lists = all_journal_lists.uniq + + respond_to do |format| + format.html { render :layout => false} + end + end end diff --git a/app/models/user/co_author.rb b/vendor/built_in_modules/personal_journal/app/models/co_author.rb similarity index 100% rename from app/models/user/co_author.rb rename to vendor/built_in_modules/personal_journal/app/models/co_author.rb diff --git a/app/models/user/co_author_relation.rb b/vendor/built_in_modules/personal_journal/app/models/co_author_relation.rb similarity index 100% rename from app/models/user/co_author_relation.rb rename to vendor/built_in_modules/personal_journal/app/models/co_author_relation.rb diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/back_end/writing_journals/_clear_filters.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/back_end/writing_journals/_clear_filters.html.erb index 2966f827..cd9a6ab1 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/back_end/writing_journals/_clear_filters.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/back_end/writing_journals/_clear_filters.html.erb @@ -1,3 +1,3 @@
    - <%= link_to content_tag(:i, nil, :class => 'icons-brush-large') + t(:clear), panel_personal_journal_back_end_writing_journals_path(:filter => @filter, :sort => params[:sort], :direction => params[:direction], :clear => true, :type => type), :class => "btn js_history" %> + <%= link_to content_tag(:i, nil, :class => 'icons-cycle') + t(:clear), panel_personal_journal_back_end_writing_journals_path(:filter => @filter, :sort => params[:sort], :direction => params[:direction], :clear => true, :type => type), :class => "btn js_history" %>
    \ No newline at end of file diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/back_end/writing_journals/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/back_end/writing_journals/_form.html.erb index 6f767502..a232af26 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/back_end/writing_journals/_form.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/back_end/writing_journals/_form.html.erb @@ -7,8 +7,8 @@
    -
    - +
    +

    <%= f.label :abstract, t("personal_journal.abstract") %>

    @@ -17,8 +17,8 @@
    -
    - +
    +

    <%= f.label :abstract, t("personal_journal.note") %>

    @@ -28,8 +28,8 @@
    -
    - +
    +

    Tags

    diff --git a/app/views/desktop/co_author_relations/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_form.html.erb similarity index 100% rename from app/views/desktop/co_author_relations/_form.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_form.html.erb diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_new.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_new.html.erb new file mode 100644 index 00000000..68bf9ed6 --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_new.html.erb @@ -0,0 +1,3 @@ +<%= form_for(@co_author_relation, url: panel_personal_journal_desktop_co_author_relations_path, html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %> + <%= render partial: 'panel/personal_journal/desktop/co_author_relations/form' , locals: {:f => f}%> +<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_show_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_show_form.html.erb new file mode 100644 index 00000000..246f0413 --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_show_form.html.erb @@ -0,0 +1,17 @@ +<% @co_author_relations.each_with_index do |co_author_relation,i| %> + <% if ( i % 6 ) == 0 %> +
    +
      + <% end %> +
    • +
      <%= co_author_relation.relation %>
      +
      + <%= link_to 'Edit', edit_panel_personal_journal_desktop_co_author_relation_path(co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %> + <%= link_to 'Destroy', panel_personal_journal_desktop_co_author_relation_path(co_author_relation), "confirm-message"=>'Are you sure?', "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %> +
      +
    • + <% if ( i % 6 ) == 5 %> +
    +
    + <% end %> +<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/edit.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/edit.html.erb new file mode 100644 index 00000000..66fc1dff --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/edit.html.erb @@ -0,0 +1,3 @@ +<%= form_for(@co_author_relation, url: panel_personal_journal_desktop_co_author_relation_path(@co_author_relation), html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationEditForm"} ) do |f| %> + <%= render partial: 'panel/personal_journal/desktop/co_author_relations/form' , locals: {:f => f}%> +<% end %> diff --git a/app/views/desktop/co_author_relations/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/index.html.erb similarity index 100% rename from app/views/desktop/co_author_relations/index.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/index.html.erb diff --git a/app/views/desktop/co_authors/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/_form.html.erb similarity index 100% rename from app/views/desktop/co_authors/_form.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/_form.html.erb diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/edit.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/edit.html.erb new file mode 100644 index 00000000..a8250528 --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/edit.html.erb @@ -0,0 +1,3 @@ +<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: panel_personal_journal_desktop_co_author_path(@co_author) do |f| %> + <%= render partial: 'panel/personal_journal/desktop/co_authors/form', locals: {:f => f} %> +<% end %> diff --git a/app/views/desktop/co_authors/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/index.html.erb similarity index 61% rename from app/views/desktop/co_authors/index.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/index.html.erb index 4c8e297e..d216e33e 100644 --- a/app/views/desktop/co_authors/index.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/index.html.erb @@ -1,7 +1,7 @@
    - <%= link_to "New Co-Author", new_desktop_co_author_path, :class=>"bt-co-author fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %> - <%= link_to "New Type", desktop_co_author_relations_path, :class=>"bt-new-type fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %> + <%= link_to "New Co-Author", new_panel_personal_journal_desktop_co_author_path, :class=>"bt-co-author fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %> + <%= link_to "New Type", panel_personal_journal_desktop_co_author_relations_path, :class=>"bt-new-type fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %>
    @@ -20,8 +20,8 @@
  • <%= @co_author_relations.find(co_author.co_author_relations_id).relation unless co_author.co_author_relations_id.nil?%>
  • - <%= link_to 'Edit', edit_desktop_co_author_path(co_author), :class => "bt-edit admbg2 admtxt", "ajax-remote"=>"get" %> - <%= link_to 'Destroy', desktop_co_author_path(co_author), "ajax-remote"=>"delete", "confirm-message"=>'Are you sure?', "callback-method"=>"paperDelete", :class=>"bt-delete admbg2 admtxt" %> + <%= link_to 'Edit', edit_panel_personal_journal_desktop_co_author_path(co_author), :class => "bt-edit admbg2 admtxt", "ajax-remote"=>"get" %> + <%= link_to 'Destroy', panel_personal_journal_desktop_co_author_path(co_author), "ajax-remote"=>"delete", "confirm-message"=>'Are you sure?', "callback-method"=>"paperDelete", :class=>"bt-delete admbg2 admtxt" %>
    <% if ( i % 4 ) == 3 %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/new.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/new.html.erb new file mode 100644 index 00000000..ed12b132 --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/new.html.erb @@ -0,0 +1,3 @@ +<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: panel_personal_journal_desktop_co_authors_path do |f| %> + <%= render partial: 'panel/personal_journal/desktop/co_authors/form', locals: {:f => f} %> +<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/show.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/show.html.erb new file mode 100644 index 00000000..e69de29b diff --git a/app/views/desktop/journal_p.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_p.html.erb similarity index 59% rename from app/views/desktop/journal_p.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_p.html.erb index d5526450..87255b06 100644 --- a/app/views/desktop/journal_p.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_p.html.erb @@ -13,10 +13,10 @@
      -
    • List
    • -
    • Add/Edit
    • -
    • Journals
    • -
    • Co-Authors
    • +
    • List
    • +
    • Add/Edit
    • +
    • Journals
    • +
    • Co-Authors
    • Tags & Keywords
    • Analysis
    • Import
    • diff --git a/app/views/desktop/journal_pages/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb similarity index 71% rename from app/views/desktop/journal_pages/_form.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb index de144196..431fe8ce 100644 --- a/app/views/desktop/journal_pages/_form.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb @@ -6,23 +6,6 @@ <%= submit_tag "Cancel", :type => "button", class: "bt-cancel ini_input hp hh2 thmadm thmtxt" %> <% end %>
    -
    Share
    @@ -46,15 +29,28 @@
    • - <%= f.text_area :paper_title, size: "20x2", placeholder: "Paper Title", class: "s_grid_6 s_grid"%> + <%= f.fields_for :paper_title_translations do |f| %> + <%= f.text_area locale, + class: "s_grid_6 s_grid", + size: "20x2", + placeholder: t("personal_journal.paper_title"), + value: (@writing_journal.paper_title_translations[locale] rescue nil) %> + <% end %>
    • - <%= f.text_field :journal_title, size: "20", placeholder: "Journal Title", class: "s_grid_6 s_grid", "autocomplete-list" => "journal_title_autocomplete_list" %> + <%= f.fields_for :journal_title_translations do |f| %> + <%= f.text_field locale, + size: "20", + placeholder: t("personal_journal.journal_title"), + class: "s_grid_6 s_grid", + "autocomplete-list" => "journal_title_autocomplete_list", + value: (@writing_journal.journal_title_translations[locale] rescue nil) %> + <% end %>
    • - <%= label_tag("", "Journal Level") %> + <%= label_tag("", t("personal_journal.level_type")) %>
        <% @level_types.each_with_index do |level_type, i| %>
      • @@ -66,23 +62,19 @@
      • <% end %>
      -
    • - <%= label_tag("", "ISSN(ISBN)", class: "s_grid_2 s_grid") %><%= f.text_field :isbn, size: "20", placeholder: "829872987", class: "s_grid_4 s_grid"%> + <%= label_tag("", t("personal_journal.isbn"), class: "s_grid_2 s_grid") %><%= f.text_field :isbn, size: "20", placeholder: "829872987", class: "s_grid_4 s_grid"%>
    • - <%= label_tag("", "Volume No.", class: "s_grid_2 s_grid") %><%= f.text_field :vol_no, size: "20", placeholder: "829872987", class: "s_grid_4 s_grid"%> + <%= label_tag("", t("personal_journal.vol_no"), class: "s_grid_2 s_grid") %><%= f.text_field :vol_no, size: "20", placeholder: "829872987", class: "s_grid_4 s_grid"%>
    • - <%= label_tag("", "Issue No.", class: "s_grid_2 s_grid") %><%= f.text_field :issue_no, size: "20", placeholder:"829872987", class: "s_grid_4 s_grid"%> + <%= label_tag("", t("personal_journal.issue_no"), class: "s_grid_2 s_grid") %><%= f.text_field :issue_no, size: "20", placeholder:"829872987", class: "s_grid_4 s_grid"%>
    • @@ -90,20 +82,28 @@
    • - <%= label_tag("", "Pages", class: "s_grid_2 s_grid") %><%= label_tag("", "from", class: "s_grid_1 s_grid") %><%= f.text_field :form_to_start, size: "10", placeholder: "1", class: "s_grid_1 s_grid"%><%= label_tag("", "to", class: "s_grid_1 s_grid") %><%= f.text_field :form_to_end, size: "10", placeholder: "20", class: "s_grid_1 s_grid"%> + <%= label_tag("", t("personal_journal.total_pages"), class: "s_grid_2 s_grid") %><%= label_tag("", "from", class: "s_grid_1 s_grid") %><%= f.text_field :form_to_start, size: "10", placeholder: "1", class: "s_grid_1 s_grid"%><%= label_tag("", "to", class: "s_grid_1 s_grid") %><%= f.text_field :form_to_end, size: "10", placeholder: "20", class: "s_grid_1 s_grid"%>
    • - <%= f.text_area :authors, size: "20x2", placeholder: "Authors", class: "s_grid_6 s_grid", "autocomplete-list" => "coauthor_autocomplete_list"%> + <%= f.fields_for :authors_translations do |f| %> + <%= f.text_area locale, + class: "s_grid_6 s_grid", + size: "20x2", + placeholder: t("web_resource.authors"), + "autocomplete-list" => "coauthor_autocomplete_list", + value: (@writing_journal.authors_translations[locale] rescue nil) %> + <% end %>
    • <%= options_for_select( - @paper_types.map do |paper_type| - [paper_type.title, paper_type.id] - end - ) - %> + [t("personal_journal.level_type")] + + @paper_types.map do |paper_type| + [paper_type.title, paper_type.id] + end + ) + %>
    • - <%= label_tag("", "Date of Publication", class: "s_grid_3 s_grid") %> + <%= label_tag("", t("personal_journal.publication_date"), class: "s_grid_3 s_grid") %> <%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_1 s_grid'} %>
    • - <%= f.text_field :keywords, size: "20", value: @writing_journal.keywords ||= "Keywords", class: "s_grid_6 s_grid"%> + <%= f.text_field :keywords, size: "20", placeholder: t("personal_journal.keywords"), class: "s_grid_6 s_grid"%>
    • - <%= f.label :year ,:class => "s_grid_2 s_grid" %> + <%= f.label :year, t("personal_journal.year"), :class => "s_grid_2 s_grid" %> <%= select_year((@writing_journal.year ? @writing_journal.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_journal[year]', :class => "s_grid_4 s_grid"} ) %>
    • - <%= f.label :language ,:class => "s_grid_2 s_grid" %> -
    • @@ -214,8 +212,6 @@ orbitDesktop.prototype.initializeJournalPapers.coauthor_autocomplete_list = <%= @co_author_candidate.to_json.html_safe %>; - -<%= javascript_include_tag "archive_plugin_form" %>