diff --git a/app/assets/images/Thumbs.db b/app/assets/images/Thumbs.db deleted file mode 100644 index f9d32b5f..00000000 Binary files a/app/assets/images/Thumbs.db and /dev/null differ diff --git a/app/assets/images/note_success.png b/app/assets/images/note_success.png new file mode 100644 index 00000000..5d5ae2ad Binary files /dev/null and b/app/assets/images/note_success.png differ diff --git a/app/assets/javascripts/desktop.js b/app/assets/javascripts/desktop.js index af5e7b22..c1abfc29 100644 --- a/app/assets/javascripts/desktop.js +++ b/app/assets/javascripts/desktop.js @@ -10,5 +10,4 @@ //= require jquery.tinyscrollbar.min //= require bootstrap //= require orbitdesktopAPI -//= require orbitdesktop -//= require desktopload \ No newline at end of file +//= require orbitdesktop \ No newline at end of file diff --git a/app/assets/javascripts/desktopload.js.erb b/app/assets/javascripts/desktopload.js.erb index e48d13cf..c4e9d1e7 100644 --- a/app/assets/javascripts/desktopload.js.erb +++ b/app/assets/javascripts/desktopload.js.erb @@ -1,5 +1,6 @@ orbitDesktop.prototype.themefolder = "desktop_themes"; orbitDesktopAPI.prototype.notifyImgPath = "/assets/"; +alert("<%= @desktop.inspect %>") var od = new orbitDesktop("#ajax_container"); diff --git a/app/assets/javascripts/inc/permission-checkbox.js b/app/assets/javascripts/inc/permission-checkbox.js new file mode 100644 index 00000000..e314d2aa --- /dev/null +++ b/app/assets/javascripts/inc/permission-checkbox.js @@ -0,0 +1,14 @@ +$(document).ready(function() { + $('.check[checked="checked"]').parents(".checkbox").addClass("checked"); + $(".checkbox").click(function(){ + if($(this).children(".check").attr("checked")){ + // uncheck + $(this).children(".check").attr('checked', false); + $(this).removeClass("checked"); + }else{ + // check + $(this).children(".check").attr({checked: "checked"}); + $(this).addClass("checked"); + } + }); +}); \ No newline at end of file diff --git a/app/assets/javascripts/lib/date.format.js b/app/assets/javascripts/lib/date.format.js new file mode 100644 index 00000000..3eb3d1cc --- /dev/null +++ b/app/assets/javascripts/lib/date.format.js @@ -0,0 +1,126 @@ +/* + * Date Format 1.2.3 + * (c) 2007-2009 Steven Levithan + * MIT license + * + * Includes enhancements by Scott Trenda + * and Kris Kowal + * + * Accepts a date, a mask, or a date and a mask. + * Returns a formatted version of the given date. + * The date defaults to the current date/time. + * The mask defaults to dateFormat.masks.default. + */ + +var dateFormat = function () { + var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g, + timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, + timezoneClip = /[^-+\dA-Z]/g, + pad = function (val, len) { + val = String(val); + len = len || 2; + while (val.length < len) val = "0" + val; + return val; + }; + + // Regexes and supporting functions are cached through closure + return function (date, mask, utc) { + var dF = dateFormat; + + // You can't provide utc if you skip other args (use the "UTC:" mask prefix) + if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) { + mask = date; + date = undefined; + } + + // Passing date through Date applies Date.parse, if necessary + date = date ? new Date(date) : new Date; + if (isNaN(date)) throw SyntaxError("invalid date"); + + mask = String(dF.masks[mask] || mask || dF.masks["default"]); + + // Allow setting the utc argument via the mask + if (mask.slice(0, 4) == "UTC:") { + mask = mask.slice(4); + utc = true; + } + + var _ = utc ? "getUTC" : "get", + d = date[_ + "Date"](), + D = date[_ + "Day"](), + m = date[_ + "Month"](), + y = date[_ + "FullYear"](), + H = date[_ + "Hours"](), + M = date[_ + "Minutes"](), + s = date[_ + "Seconds"](), + L = date[_ + "Milliseconds"](), + o = utc ? 0 : date.getTimezoneOffset(), + flags = { + d: d, + dd: pad(d), + ddd: dF.i18n.dayNames[D], + dddd: dF.i18n.dayNames[D + 7], + m: m + 1, + mm: pad(m + 1), + mmm: dF.i18n.monthNames[m], + mmmm: dF.i18n.monthNames[m + 12], + yy: String(y).slice(2), + yyyy: y, + h: H % 12 || 12, + hh: pad(H % 12 || 12), + H: H, + HH: pad(H), + M: M, + MM: pad(M), + s: s, + ss: pad(s), + l: pad(L, 3), + L: pad(L > 99 ? Math.round(L / 10) : L), + t: H < 12 ? "a" : "p", + tt: H < 12 ? "am" : "pm", + T: H < 12 ? "A" : "P", + TT: H < 12 ? "AM" : "PM", + Z: utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""), + o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4), + S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10] + }; + + return mask.replace(token, function ($0) { + return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1); + }); + }; +}(); + +// Some common format strings +dateFormat.masks = { + "default": "ddd mmm dd yyyy HH:MM:ss", + shortDate: "m/d/yy", + mediumDate: "mmm d, yyyy", + longDate: "mmmm d, yyyy", + fullDate: "dddd, mmmm d, yyyy", + shortTime: "h:MM TT", + mediumTime: "h:MM:ss TT", + longTime: "h:MM:ss TT Z", + isoDate: "yyyy / mm / dd", + isoTime: "HH:MM:ss", + isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", + isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'" +}; + +// Internationalization strings +dateFormat.i18n = { + dayNames: [ + "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", + "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" + ], + monthNames: [ + "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", + "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" + ] +}; + +// For convenience... +Date.prototype.format = function (mask, utc) { + return dateFormat(this, mask, utc); +}; + diff --git a/app/assets/javascripts/lib/datepicker.js b/app/assets/javascripts/lib/datepicker.js new file mode 100644 index 00000000..7c8d4b03 --- /dev/null +++ b/app/assets/javascripts/lib/datepicker.js @@ -0,0 +1,891 @@ +/** + * + * Date picker + * Author: Stefan Petre www.eyecon.ro + * + * Dual licensed under the MIT and GPL licenses + * + */ +(function ($) { + var DatePicker = function () { + var ids = {}, + views = { + years: 'datepickerViewYears', + moths: 'datepickerViewMonths', + days: 'datepickerViewDays' + }, + tpl = { + wrapper: '
', + head: [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '
<%=prev%><%=next%>
<%=week%><%=day1%><%=day2%><%=day3%><%=day4%><%=day5%><%=day6%><%=day7%>
' + ], + space : '
', + days: [ + '', + '', + '<%=weeks[0].week%>', + '<%=weeks[0].days[0].text%>', + '<%=weeks[0].days[1].text%>', + '<%=weeks[0].days[2].text%>', + '<%=weeks[0].days[3].text%>', + '<%=weeks[0].days[4].text%>', + '<%=weeks[0].days[5].text%>', + '<%=weeks[0].days[6].text%>', + '', + '', + '<%=weeks[1].week%>', + '<%=weeks[1].days[0].text%>', + '<%=weeks[1].days[1].text%>', + '<%=weeks[1].days[2].text%>', + '<%=weeks[1].days[3].text%>', + '<%=weeks[1].days[4].text%>', + '<%=weeks[1].days[5].text%>', + '<%=weeks[1].days[6].text%>', + '', + '', + '<%=weeks[2].week%>', + '<%=weeks[2].days[0].text%>', + '<%=weeks[2].days[1].text%>', + '<%=weeks[2].days[2].text%>', + '<%=weeks[2].days[3].text%>', + '<%=weeks[2].days[4].text%>', + '<%=weeks[2].days[5].text%>', + '<%=weeks[2].days[6].text%>', + '', + '', + '<%=weeks[3].week%>', + '<%=weeks[3].days[0].text%>', + '<%=weeks[3].days[1].text%>', + '<%=weeks[3].days[2].text%>', + '<%=weeks[3].days[3].text%>', + '<%=weeks[3].days[4].text%>', + '<%=weeks[3].days[5].text%>', + '<%=weeks[3].days[6].text%>', + '', + '', + '<%=weeks[4].week%>', + '<%=weeks[4].days[0].text%>', + '<%=weeks[4].days[1].text%>', + '<%=weeks[4].days[2].text%>', + '<%=weeks[4].days[3].text%>', + '<%=weeks[4].days[4].text%>', + '<%=weeks[4].days[5].text%>', + '<%=weeks[4].days[6].text%>', + '', + '', + '<%=weeks[5].week%>', + '<%=weeks[5].days[0].text%>', + '<%=weeks[5].days[1].text%>', + '<%=weeks[5].days[2].text%>', + '<%=weeks[5].days[3].text%>', + '<%=weeks[5].days[4].text%>', + '<%=weeks[5].days[5].text%>', + '<%=weeks[5].days[6].text%>', + '', + '' + ], + months: [ + '', + '', + '<%=data[0]%>', + '<%=data[1]%>', + '<%=data[2]%>', + '<%=data[3]%>', + '', + '', + '<%=data[4]%>', + '<%=data[5]%>', + '<%=data[6]%>', + '<%=data[7]%>', + '', + '', + '<%=data[8]%>', + '<%=data[9]%>', + '<%=data[10]%>', + '<%=data[11]%>', + '', + '' + ] + }, + defaults = { + flat: false, + starts: 1, + prev: '◀', + next: '▶', + lastSel: false, + mode: 'single', + view: 'days', + calendars: 1, + format: 'Y-m-d', + position: 'bottom', + eventName: 'click', + onRender: function(){return {};}, + onChange: function(){return true;}, + onShow: function(){return true;}, + onBeforeShow: function(){return true;}, + onHide: function(){return true;}, + locale: { + 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"], + weekMin: 'wk' + } + }, + fill = function(el) { + var options = $(el).data('datepicker'); + var cal = $(el); + var currentCal = Math.floor(options.calendars/2), date, data, dow, month, cnt = 0, week, days, indic, indic2, html, tblCal; + cal.find('td>table tbody').remove(); + for (var i = 0; i < options.calendars; i++) { + date = new Date(options.current); + date.addMonths(-currentCal + i); + tblCal = cal.find('table').eq(i+1); + switch (tblCal[0].className) { + case 'datepickerViewDays': + dow = formatDate(date, 'B, Y'); + break; + case 'datepickerViewMonths': + dow = date.getFullYear(); + break; + case 'datepickerViewYears': + dow = (date.getFullYear()-6) + ' - ' + (date.getFullYear()+5); + break; + } + tblCal.find('thead tr:first th:eq(1) span').text(dow); + dow = date.getFullYear()-6; + data = { + data: [], + className: 'datepickerYears' + } + for ( var j = 0; j < 12; j++) { + data.data.push(dow + j); + } + html = tmpl(tpl.months.join(''), data); + date.setDate(1); + data = {weeks:[], test: 10}; + month = date.getMonth(); + var dow = (date.getDay() - options.starts) % 7; + date.addDays(-(dow + (dow < 0 ? 7 : 0))); + week = -1; + cnt = 0; + while (cnt < 42) { + indic = parseInt(cnt/7,10); + indic2 = cnt%7; + if (!data.weeks[indic]) { + week = date.getWeekNumber(); + data.weeks[indic] = { + week: week, + days: [] + }; + } + data.weeks[indic].days[indic2] = { + text: date.getDate(), + classname: [] + }; + if (month != date.getMonth()) { + data.weeks[indic].days[indic2].classname.push('datepickerNotInMonth'); + } + if (date.getDay() == 0) { + data.weeks[indic].days[indic2].classname.push('datepickerSunday'); + } + if (date.getDay() == 6) { + data.weeks[indic].days[indic2].classname.push('datepickerSaturday'); + } + var fromUser = options.onRender(date); + var val = date.valueOf(); + if (fromUser.selected || options.date == val || $.inArray(val, options.date) > -1 || (options.mode == 'range' && val >= options.date[0] && val <= options.date[1])) { + data.weeks[indic].days[indic2].classname.push('datepickerSelected'); + } + if (fromUser.disabled) { + data.weeks[indic].days[indic2].classname.push('datepickerDisabled'); + } + if (fromUser.className) { + data.weeks[indic].days[indic2].classname.push(fromUser.className); + } + data.weeks[indic].days[indic2].classname = data.weeks[indic].days[indic2].classname.join(' '); + cnt++; + date.addDays(1); + } + html = tmpl(tpl.days.join(''), data) + html; + data = { + data: options.locale.monthsShort, + className: 'datepickerMonths' + }; + html = tmpl(tpl.months.join(''), data) + html; + tblCal.append(html); + } + }, + parseDate = function (date, format) { + if (date.constructor == Date) { + return new Date(date); + } + var parts = date.split(/\W+/); + var against = format.split(/\W+/), d, m, y, h, min, now = new Date(); + for (var i = 0; i < parts.length; i++) { + switch (against[i]) { + case 'd': + case 'e': + d = parseInt(parts[i],10); + break; + case 'm': + m = parseInt(parts[i], 10)-1; + break; + case 'Y': + case 'y': + y = parseInt(parts[i], 10); + y += y > 100 ? 0 : (y < 29 ? 2000 : 1900); + break; + case 'H': + case 'I': + case 'k': + case 'l': + h = parseInt(parts[i], 10); + break; + case 'P': + case 'p': + if (/pm/i.test(parts[i]) && h < 12) { + h += 12; + } else if (/am/i.test(parts[i]) && h >= 12) { + h -= 12; + } + break; + case 'M': + min = parseInt(parts[i], 10); + break; + } + } + return new Date( + y === undefined ? now.getFullYear() : y, + m === undefined ? now.getMonth() : m, + d === undefined ? now.getDate() : d, + h === undefined ? now.getHours() : h, + min === undefined ? now.getMinutes() : min, + 0 + ); + }, + formatDate = function(date, format) { + var m = date.getMonth(); + var d = date.getDate(); + var y = date.getFullYear(); + var wn = date.getWeekNumber(); + var w = date.getDay(); + var s = {}; + var hr = date.getHours(); + var pm = (hr >= 12); + var ir = (pm) ? (hr - 12) : hr; + var dy = date.getDayOfYear(); + if (ir == 0) { + ir = 12; + } + var min = date.getMinutes(); + var sec = date.getSeconds(); + var parts = format.split(''), part; + for ( var i = 0; i < parts.length; i++ ) { + part = parts[i]; + switch (parts[i]) { + case 'a': + part = date.getDayName(); + break; + case 'A': + part = date.getDayName(true); + break; + case 'b': + part = date.getMonthName(); + break; + case 'B': + part = date.getMonthName(true); + break; + case 'C': + part = 1 + Math.floor(y / 100); + break; + case 'd': + part = (d < 10) ? ("0" + d) : d; + break; + case 'e': + part = d; + break; + case 'H': + part = (hr < 10) ? ("0" + hr) : hr; + break; + case 'I': + part = (ir < 10) ? ("0" + ir) : ir; + break; + case 'j': + part = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; + break; + case 'k': + part = hr; + break; + case 'l': + part = ir; + break; + case 'm': + part = (m < 9) ? ("0" + (1+m)) : (1+m); + break; + case 'M': + part = (min < 10) ? ("0" + min) : min; + break; + case 'p': + case 'P': + part = pm ? "PM" : "AM"; + break; + case 's': + part = Math.floor(date.getTime() / 1000); + break; + case 'S': + part = (sec < 10) ? ("0" + sec) : sec; + break; + case 'u': + part = w + 1; + break; + case 'w': + part = w; + break; + case 'y': + part = ('' + y).substr(2, 2); + break; + case 'Y': + part = y; + break; + } + parts[i] = part; + } + return parts.join(''); + }, + extendDate = function(options) { + if (Date.prototype.tempDate) { + return; + } + Date.prototype.tempDate = null; + Date.prototype.months = options.months; + Date.prototype.monthsShort = options.monthsShort; + Date.prototype.days = options.days; + Date.prototype.daysShort = options.daysShort; + Date.prototype.getMonthName = function(fullName) { + return this[fullName ? 'months' : 'monthsShort'][this.getMonth()]; + }; + Date.prototype.getDayName = function(fullName) { + return this[fullName ? 'days' : 'daysShort'][this.getDay()]; + }; + Date.prototype.addDays = function (n) { + this.setDate(this.getDate() + n); + this.tempDate = this.getDate(); + }; + Date.prototype.addMonths = function (n) { + if (this.tempDate == null) { + this.tempDate = this.getDate(); + } + this.setDate(1); + this.setMonth(this.getMonth() + n); + this.setDate(Math.min(this.tempDate, this.getMaxDays())); + }; + Date.prototype.addYears = function (n) { + if (this.tempDate == null) { + this.tempDate = this.getDate(); + } + this.setDate(1); + this.setFullYear(this.getFullYear() + n); + this.setDate(Math.min(this.tempDate, this.getMaxDays())); + }; + Date.prototype.getMaxDays = function() { + var tmpDate = new Date(Date.parse(this)), + d = 28, m; + m = tmpDate.getMonth(); + d = 28; + while (tmpDate.getMonth() == m) { + d ++; + tmpDate.setDate(d); + } + return d - 1; + }; + Date.prototype.getFirstDay = function() { + var tmpDate = new Date(Date.parse(this)); + tmpDate.setDate(1); + return tmpDate.getDay(); + }; + Date.prototype.getWeekNumber = function() { + var tempDate = new Date(this); + tempDate.setDate(tempDate.getDate() - (tempDate.getDay() + 6) % 7 + 3); + var dms = tempDate.valueOf(); + tempDate.setMonth(0); + tempDate.setDate(4); + return Math.round((dms - tempDate.valueOf()) / (604800000)) + 1; + }; + Date.prototype.getDayOfYear = function() { + var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); + var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0); + var time = now - then; + return Math.floor(time / 24*60*60*1000); + }; + }, + layout = function (el) { + var options = $(el).data('datepicker'); + var cal = $('#' + options.id); + if (!options.extraHeight) { + var divs = $(el).find('div'); + //options.extraHeight = divs.get(0).offsetHeight + divs.get(1).offsetHeight; + //options.extraWidth = divs.get(2).offsetWidth + divs.get(3).offsetWidth; + } + var tbl = cal.find('table:first').get(0); + var width = tbl.offsetWidth; + var height = tbl.offsetHeight; + cal.css({ + width: width + options.extraWidth + 'px', + height: height + options.extraHeight + 'px' + }).find('div.datepickerContainer').css({ + width: width + 'px', + height: height + 'px' + }); + }, + click = function(ev) { + if ($(ev.target).is('span')) { + ev.target = ev.target.parentNode; + } + var el = $(ev.target); + if (el.is('a')) { + ev.target.blur(); + if (el.hasClass('datepickerDisabled')) { + return false; + } + var options = $(this).data('datepicker'); + var parentEl = el.parent(); + var tblEl = parentEl.parent().parent().parent(); + var tblIndex = $('table', this).index(tblEl.get(0)) - 1; + var tmp = new Date(options.current); + var changed = false; + var fillIt = false; + if (parentEl.is('th')) { + if (parentEl.hasClass('datepickerWeek') && options.mode == 'range' && !parentEl.next().hasClass('datepickerDisabled')) { + var val = parseInt(parentEl.next().text(), 10); + tmp.addMonths(tblIndex - Math.floor(options.calendars/2)); + if (parentEl.next().hasClass('datepickerNotInMonth')) { + tmp.addMonths(val > 15 ? -1 : 1); + } + tmp.setDate(val); + options.date[0] = (tmp.setHours(0,0,0,0)).valueOf(); + tmp.setHours(23,59,59,0); + tmp.addDays(6); + options.date[1] = tmp.valueOf(); + fillIt = true; + changed = true; + options.lastSel = false; + } else if (parentEl.hasClass('datepickerMonth')) { + tmp.addMonths(tblIndex - Math.floor(options.calendars/2)); + switch (tblEl.get(0).className) { + case 'datepickerViewDays': + tblEl.get(0).className = 'datepickerViewMonths'; + el.find('span').text(tmp.getFullYear()); + break; + case 'datepickerViewMonths': + tblEl.get(0).className = 'datepickerViewYears'; + el.find('span').text((tmp.getFullYear()-6) + ' - ' + (tmp.getFullYear()+5)); + break; + case 'datepickerViewYears': + tblEl.get(0).className = 'datepickerViewDays'; + el.find('span').text(formatDate(tmp, 'B, Y')); + break; + } + } else if (parentEl.parent().parent().is('thead')) { + switch (tblEl.get(0).className) { + case 'datepickerViewDays': + options.current.addMonths(parentEl.hasClass('datepickerGoPrev') ? -1 : 1); + break; + case 'datepickerViewMonths': + options.current.addYears(parentEl.hasClass('datepickerGoPrev') ? -1 : 1); + break; + case 'datepickerViewYears': + options.current.addYears(parentEl.hasClass('datepickerGoPrev') ? -12 : 12); + break; + } + fillIt = true; + } + } else if (parentEl.is('td') && !parentEl.hasClass('datepickerDisabled')) { + switch (tblEl.get(0).className) { + case 'datepickerViewMonths': + options.current.setMonth(tblEl.find('tbody.datepickerMonths td').index(parentEl)); + options.current.setFullYear(parseInt(tblEl.find('thead th.datepickerMonth span').text(), 10)); + options.current.addMonths(Math.floor(options.calendars/2) - tblIndex); + tblEl.get(0).className = 'datepickerViewDays'; + break; + case 'datepickerViewYears': + options.current.setFullYear(parseInt(el.text(), 10)); + tblEl.get(0).className = 'datepickerViewMonths'; + break; + default: + var val = parseInt(el.text(), 10); + tmp.addMonths(tblIndex - Math.floor(options.calendars/2)); + if (parentEl.hasClass('datepickerNotInMonth')) { + tmp.addMonths(val > 15 ? -1 : 1); + } + tmp.setDate(val); + switch (options.mode) { + case 'multiple': + val = (tmp.setHours(0,0,0,0)).valueOf(); + if ($.inArray(val, options.date) > -1) { + $.each(options.date, function(nr, dat){ + if (dat == val) { + options.date.splice(nr,1); + return false; + } + }); + } else { + options.date.push(val); + } + break; + case 'range': + if (!options.lastSel) { + options.date[0] = (tmp.setHours(0,0,0,0)).valueOf(); + } + val = (tmp.setHours(23,59,59,0)).valueOf(); + if (val < options.date[0]) { + options.date[1] = options.date[0] + 86399000; + options.date[0] = val - 86399000; + } else { + options.date[1] = val; + } + options.lastSel = !options.lastSel; + break; + default: + options.date = tmp.valueOf(); + break; + } + break; + } + fillIt = true; + changed = true; + } + if (fillIt) { + fill(this); + } + if (changed) { + options.onChange.apply(this, prepareDate(options)); + } + } + return false; + }, + prepareDate = function (options) { + var tmp; + if (options.mode == 'single') { + tmp = new Date(options.date); + return [formatDate(tmp, options.format), tmp, options.el]; + } else { + tmp = [[],[], options.el]; + $.each(options.date, function(nr, val){ + var date = new Date(val); + tmp[0].push(formatDate(date, options.format)); + tmp[1].push(date); + }); + return tmp; + } + }, + getViewport = function () { + var m = document.compatMode == 'CSS1Compat'; + return { + l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft), + t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop), + w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth), + h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight) + }; + }, + isChildOf = function(parentEl, el, container) { + if (parentEl == el) { + return true; + } + if (parentEl.contains) { + return parentEl.contains(el); + } + if ( parentEl.compareDocumentPosition ) { + return !!(parentEl.compareDocumentPosition(el) & 16); + } + var prEl = el.parentNode; + while(prEl && prEl != container) { + if (prEl == parentEl) + return true; + prEl = prEl.parentNode; + } + return false; + }, + show = function (ev) { + var cal = $('#' + $(this).data('datepickerId')); + if (!cal.is(':visible')) { + var calEl = cal.get(0); + fill(calEl); + var options = cal.data('datepicker'); + options.onBeforeShow.apply(this, [cal.get(0)]); + var pos = $(this).offset(); + var viewPort = getViewport(); + var top = pos.top; + var left = pos.left; + var oldDisplay = $.curCSS(calEl, 'display'); + cal.css({ + visibility: 'hidden', + display: 'block' + }); + layout(calEl); + switch (options.position){ + case 'top': + top -= calEl.offsetHeight; + break; + case 'left': + left -= calEl.offsetWidth; + break; + case 'right': + left += this.offsetWidth; + break; + case 'bottom': + top += this.offsetHeight; + break; + } + if (top + calEl.offsetHeight > viewPort.t + viewPort.h) { + top = pos.top - calEl.offsetHeight; + } + if (top < viewPort.t) { + top = pos.top + this.offsetHeight + calEl.offsetHeight; + } + if (left + calEl.offsetWidth > viewPort.l + viewPort.w) { + left = pos.left - calEl.offsetWidth; + } + if (left < viewPort.l) { + left = pos.left + this.offsetWidth + } + cal.css({ + visibility: 'visible', + display: 'block', + top: top + 'px', + left: left + 'px' + }); + if (options.onShow.apply(this, [cal.get(0)]) != false) { + cal.show(); + } + $(document).bind('mousedown', {cal: cal, trigger: this}, hide); + } + return false; + }, + hide = function (ev) { + if (ev.target != ev.data.trigger && !isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) { + if (ev.data.cal.data('datepicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) { + ev.data.cal.hide(); + } + $(document).unbind('mousedown', hide); + } + }; + return { + init: function(options){ + options = $.extend({}, defaults, options||{}); + extendDate(options.locale); + options.calendars = Math.max(1, parseInt(options.calendars,10)||1); + options.mode = /single|multiple|range/.test(options.mode) ? options.mode : 'single'; + return this.each(function(){ + if (!$(this).data('datepicker')) { + options.el = this; + if (options.date.constructor == String) { + options.date = parseDate(options.date, options.format); + options.date.setHours(0,0,0,0); + } + if (options.mode != 'single') { + if (options.date.constructor != Array) { + options.date = [options.date.valueOf()]; + if (options.mode == 'range') { + options.date.push(((new Date(options.date[0])).setHours(23,59,59,0)).valueOf()); + } + } else { + for (var i = 0; i < options.date.length; i++) { + options.date[i] = (parseDate(options.date[i], options.format).setHours(0,0,0,0)).valueOf(); + } + if (options.mode == 'range') { + options.date[1] = ((new Date(options.date[1])).setHours(23,59,59,0)).valueOf(); + } + } + } else { + options.date = options.date.valueOf(); + } + if (!options.current) { + options.current = new Date(); + } else { + options.current = parseDate(options.current, options.format); + } + options.current.setDate(1); + options.current.setHours(0,0,0,0); + var id = 'datepicker_' + parseInt(Math.random() * 1000), cnt; + options.id = id; + $(this).data('datepickerId', options.id); + var cal = $(tpl.wrapper).attr('id', id).bind('click', click).data('datepicker', options); + if (options.className) { + cal.addClass(options.className); + } + var html = ''; + for (var i = 0; i < options.calendars; i++) { + cnt = options.starts; + if (i > 0) { + html += tpl.space; + } + html += tmpl(tpl.head.join(''), { + week: options.locale.weekMin, + prev: options.prev, + next: options.next, + day1: options.locale.daysMin[(cnt++)%7], + day2: options.locale.daysMin[(cnt++)%7], + day3: options.locale.daysMin[(cnt++)%7], + day4: options.locale.daysMin[(cnt++)%7], + day5: options.locale.daysMin[(cnt++)%7], + day6: options.locale.daysMin[(cnt++)%7], + day7: options.locale.daysMin[(cnt++)%7] + }); + } + cal + .find('tr:first').append(html) + .find('table').addClass(views[options.view]); + fill(cal.get(0)); + if (options.flat) { + cal.appendTo(this).show().css('position', 'relative'); + layout(cal.get(0)); + } else { + cal.appendTo(document.body); + $(this).bind(options.eventName, show); + } + } + }); + }, + showPicker: function() { + return this.each( function () { + if ($(this).data('datepickerId')) { + show.apply(this); + } + }); + }, + hidePicker: function() { + return this.each( function () { + if ($(this).data('datepickerId')) { + $('#' + $(this).data('datepickerId')).hide(); + } + }); + }, + setDate: function(date, shiftTo){ + return this.each(function(){ + if ($(this).data('datepickerId')) { + var cal = $('#' + $(this).data('datepickerId')); + var options = cal.data('datepicker'); + options.date = date; + if (options.date.constructor == String) { + options.date = parseDate(options.date, options.format); + options.date.setHours(0,0,0,0); + } + if (options.mode != 'single') { + if (options.date.constructor != Array) { + options.date = [options.date.valueOf()]; + if (options.mode == 'range') { + options.date.push(((new Date(options.date[0])).setHours(23,59,59,0)).valueOf()); + } + } else { + for (var i = 0; i < options.date.length; i++) { + options.date[i] = (parseDate(options.date[i], options.format).setHours(0,0,0,0)).valueOf(); + } + if (options.mode == 'range') { + options.date[1] = ((new Date(options.date[1])).setHours(23,59,59,0)).valueOf(); + } + } + } else { + options.date = options.date.valueOf(); + } + if (shiftTo) { + options.current = new Date (options.mode != 'single' ? options.date[0] : options.date); + } + fill(cal.get(0)); + } + }); + }, + getDate: function(formated) { + if (this.size() > 0) { + return prepareDate($('#' + $(this).data('datepickerId')).data('datepicker'))[formated ? 0 : 1]; + } + }, + clear: function(){ + return this.each(function(){ + if ($(this).data('datepickerId')) { + var cal = $('#' + $(this).data('datepickerId')); + var options = cal.data('datepicker'); + if (options.mode != 'single') { + options.date = []; + fill(cal.get(0)); + } + } + }); + }, + fixLayout: function(){ + return this.each(function(){ + if ($(this).data('datepickerId')) { + var cal = $('#' + $(this).data('datepickerId')); + var options = cal.data('datepicker'); + if (options.flat) { + layout(cal.get(0)); + } + } + }); + } + }; + }(); + $.fn.extend({ + DatePicker: DatePicker.init, + DatePickerHide: DatePicker.hidePicker, + DatePickerShow: DatePicker.showPicker, + DatePickerSetDate: DatePicker.setDate, + DatePickerGetDate: DatePicker.getDate, + DatePickerClear: DatePicker.clear, + DatePickerLayout: DatePicker.fixLayout + }); +})(jQuery); + +(function(){ + var cache = {}; + + this.tmpl = function tmpl(str, data){ + // Figure out if we're getting a template, or if we need to + // load the template - and be sure to cache the result. + var fn = !/\W/.test(str) ? + cache[str] = cache[str] || + tmpl(document.getElementById(str).innerHTML) : + + // Generate a reusable function that will serve as a template + // generator (and which will be cached). + new Function("obj", + "var p=[],print=function(){p.push.apply(p,arguments);};" + + + // Introduce the data as local variables using with(){} + "with(obj){p.push('" + + + // Convert the template into pure JavaScript + str + .replace(/[\r\t\n]/g, " ") + .split("<%").join("\t") + .replace(/((^|%>)[^\t]*)'/g, "$1\r") + .replace(/\t=(.*?)%>/g, "',$1,'") + .split("\t").join("');") + .split("%>").join("p.push('") + .split("\r").join("\\'") + + "');}return p.join('');"); + + // Provide some basic currying to the user + return data ? fn( data ) : fn; + }; +})(); \ No newline at end of file diff --git a/app/assets/javascripts/new_admin.js b/app/assets/javascripts/new_admin.js index 3ec6f22f..5741437c 100644 --- a/app/assets/javascripts/new_admin.js +++ b/app/assets/javascripts/new_admin.js @@ -11,4 +11,5 @@ //= require jquery.tinyscrollbar.min //= require orbit-1.0 //= require tinymce-jquery -//= require tinymce_orbit \ No newline at end of file +//= require tinymce_orbit +//= require orbit-bar-search \ No newline at end of file diff --git a/app/assets/javascripts/orbit-1.0.js b/app/assets/javascripts/orbit-1.0.js index cbb6e0b8..e83c69f6 100644 --- a/app/assets/javascripts/orbit-1.0.js +++ b/app/assets/javascripts/orbit-1.0.js @@ -9,27 +9,14 @@ function resize() { } } $(document).ready(function(){ - $(document).on('click', '.orbit-bar-member', function(){ - $(this).hasClass('open') ? $(this).removeClass('open') : $(this).addClass('open'); - $('.bar-login .dropdown-menu').toggle(); - return false; - }); - - $(document).click(function() { - $('.orbit-bar-member').removeClass("open"); - $('.bar-login .dropdown-menu').hide(); - }); - - $(document).on('click', '.bar-login .dropdown-menu', function(e) { - e.stopPropagation(); - $('.bar-login .dropdown-menu').show(); - }); $('.tip').tooltip({ placement: "left" }); $(document).on('click', '.privacy', function() { + + console.log($(this).val()); switch ($(this).val()) { case 'true': $(this).parents('.controls').children('.select-role').slideUp(300); @@ -39,11 +26,6 @@ $(document).ready(function(){ break; } }); - - $(document).on('click', '.sort-header > .sort', function() { - $.getScript($(this).attr('rel')); - }); - var $role = $('.select-role'); var method =$('.privacy:eq(1)').attr('checked'); @@ -73,7 +55,7 @@ $(document).ready(function(){ $('#main-sidebar').tinyscrollbar(); $('.detal-list').tinyscrollbar(); $('#main-sidebar').tinyscrollbar({size:(viewportheight-34)}); - mainTablePosition() + mainTablePosition(); /*isotope*/ var $container = $('#isotope'); @@ -92,16 +74,26 @@ $(window).resize(function(){ $('.post-title').css("width", viewportwidth-495); $('#main-wrap > .subnav').css("width", viewportwidth-$mainWrapMarginLeft) $('#main-sidebar').tinyscrollbar({size:(viewportheight-34)}); - mainTablePosition() + mainTablePosition(); }); /*main-table position*/ function mainTablePosition() { - var $height = $('#main-wrap > .subnav').height() - var $table = $('#main-wrap > .table') - //alert ($table.height()) - $table.stop().animate({marginTop:$height-17},500) - //$table.css({marginTop : $height}) -} + var $height = $('#main-wrap .subnav').length && $('#main-wrap .subnav').height(); + var $table = $('#main-wrap > table').length && $('#main-wrap > table'); + if($table && $table==0){ + $table.css({marginTop:$height}); + } + else if($table){ + if($height>0){ + $height = $height-17; + } + $table.stop().animate({marginTop:$height},500); + } + else if($('#main-wrap .subnav')){ + var $object = $('#main-wrap .subnav').next(); + $object.css({marginTop:$height}); + }; +}; $(window).scroll(function () { //var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-1; //var $subnavWidth = parseInt($('#main-wrap > .subnav').css("width")); diff --git a/app/assets/javascripts/orbit-bar-member.js b/app/assets/javascripts/orbit-bar-member.js new file mode 100644 index 00000000..5e65d4a3 --- /dev/null +++ b/app/assets/javascripts/orbit-bar-member.js @@ -0,0 +1,15 @@ +$(document).on('click', '.orbit-bar-member', function(){ + $(this).hasClass('open') ? $(this).removeClass('open') : $(this).addClass('open'); + $('.bar-login .dropdown-menu').toggle(); + return false; +}); + +$(document).click(function() { + $('.orbit-bar-member').removeClass("open"); + $('.bar-login .dropdown-menu').hide(); +}); + +$(document).on('click', '.bar-login .dropdown-menu', function(e) { + e.stopPropagation(); + $('.bar-login .dropdown-menu').show(); +}); \ No newline at end of file diff --git a/app/assets/javascripts/orbit-bar-search.js b/app/assets/javascripts/orbit-bar-search.js new file mode 100644 index 00000000..26f44d84 --- /dev/null +++ b/app/assets/javascripts/orbit-bar-search.js @@ -0,0 +1,20 @@ +$(document).on('click', '.orbit-bar-search', function (){ + if ($(this).parents('.search').hasClass('visible')){ + $(this).parents('.search').stop().animate({ + 'width':'28px', + }); + $(this).parents('.search').css({ + 'background-color': 'transparent', + }); + $(this).parents('.search').removeClass('visible'); + } + else{ + $(this).parents('.search').stop().animate({ + 'width':'265px', + }); + $(this).parents('.search').css({ + 'background-color': 'rgba(0, 0, 0, 0.5)', + }); + $(this).parents('.search').addClass('visible'); + } +}); \ No newline at end of file diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 339c24b0..f6346951 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -13,13 +13,21 @@ var orbitDesktop = function(dom){ this.desktopData = {"home":"","settings":"","work":"","favorite":"","apps_manager":"","sections":""}; this.tp = ""; this.initialize = function(){ - var theme = o.theme; - $.getJSON("/"+o.themefolder+"/"+theme+"/settings/"+theme+".json",function(ts){ - o.themesettings = eval(ts); - $('head').append( $('').attr('href', "/"+o.themefolder+"/"+theme+"/css/"+ts.css)); - $(document).ready(function(){o.loadWallpaper();o.bindDesktopEvents();o.loadIconCache();o.initializeDesktop();}); + var theme = o.theme; + $.getJSON("/desktop/get_desktop_settings",{id:o.desktopId},function(desktopSettings){ + if(desktopSettings){ + theme = desktopSettings.theme; + o.theme = theme; + loadTheme(); + }else{loadTheme();} }) - + var loadTheme = function(){ + $.getJSON("/"+o.themefolder+"/"+theme+"/settings/"+theme+".json",function(ts){ + o.themesettings = eval(ts); + $('head').append( $('').attr('href', "/"+o.themefolder+"/"+theme+"/css/"+ts.css)); + $(document).ready(function(){o.loadWallpaper();o.bindDesktopEvents();o.loadIconCache();o.initializeDesktop();}); + }) + } }; this.changeTheme = function(theme){ o.theme = theme; @@ -69,12 +77,9 @@ var orbitDesktop = function(dom){ }); } }); - $("select#change_theme").change(function(){ - o.changeTheme($(this).val()); - }) $(window).resize(function(){ var ww = $(window).width(); - $("img#thmbackground").attr({"width":ww}) + $("img#thmbackground").attr({"width":ww}); }); $(o.contentHolder).mousemove(function(event){ /*if(($(window).width()-50)<=event.pageX){ @@ -84,6 +89,15 @@ var orbitDesktop = function(dom){ $("#holder").animate({scrollLeft:0},1000); }*/ }); + var $widget_fn = $('.widget_fn'),$fn_des = $('.fn_des'); + $widget_fn.hover(function(){ + var fn_name = $(this).find('img').attr('alt'),nth = $(this).parents('.d_cate').index(),des_left = $('.dock_child').eq(nth).width(); + $(this).addClass('thmc1'); + $fn_des.text(fn_name).css({'top':nth * 60,'left': des_left + 60}).stop(true, true).fadeIn(); + },function(){ + $(this).removeClass('thmc1'); + $fn_des.stop(true, true).fadeOut(); + }); }; this.initializeDesktop = function(target){ if(!target)target = "desktop"; @@ -132,19 +146,39 @@ var orbitDesktop = function(dom){ }); $('#holder').tinyscrollbar({ axis: 'x'}); - sdm(); + $("div.scrollbar").hover(function(){ + $(this).removeClass('op01'); + }, function(){ + $(this).addClass('op01'); + }); + var $sdm = $('.sdm'); + + if( !$sdm.children('.sdm_o') ){ + return; + } else { + $sdm.hover(function(){ + $(this).addClass('thmc2'); + }, function(){ + $(this).removeClass('thmc2'); + }); + } } if(!o.desktopData[o.currentface]){ $(o.contentHolder).empty().load("/desktop/"+target,function(){ bindHandlers(); + o.initializeWidgets(); }); }else{ $(o.contentHolder).html(o.desktopData[o.currentface]); bindHandlers(); + o.initializeWidgets(); } }; this.tempFunc = function(){ - o.notify("This is test notification!!","alert",2) + //o.notify("This is test notification!!","alert",2) + $.post("/desktop/save_desktop_settings",{"id":o.desktopId,"theme":$("#change_theme").val()},function(){ + o.notify("Settings Saved!!","success"); + }) } this.initializeAppSearch = function(target){ o.currenthtml = target; @@ -190,10 +224,11 @@ var orbitDesktop = function(dom){ if(!o.desktopData[o.currentface]){ $(o.contentHolder).empty().load("/desktop/"+target,function(){ bindHandlers(); + }); }else{ $(o.contentHolder).html(o.desktopData[o.currentface]); - bindHandlers(); + bindHandlers(); } }; this.initializeSectionsManager = function(target){ @@ -220,15 +255,25 @@ var orbitDesktop = function(dom){ } else $("#"+$(this).attr("data-category")).append(element); + },over:function(){ + $(this).find('span.tile').removeClass('op06'); }, - over:function(){ - $(this).find('span.tile').removeClass('op06'); - }, - out:function(){ + out:function(){ $(this).find('span.tile').addClass('op06'); - } - }); + } + }); $('#holder').tinyscrollbar({ axis: 'x'}); + var $sdm = $('.sdm'); + + if( !$sdm.children('.sdm_o') ){ + return; + } else { + $sdm.hover(function(){ + $(this).addClass('thmc2'); + }, function(){ + $(this).removeClass('thmc2'); + }); + } }; if(!o.desktopData[o.currentface]){ $(o.contentHolder).empty().load("/desktop/"+target,function(){ @@ -240,6 +285,23 @@ var orbitDesktop = function(dom){ } }; + this.initializeSettings = function(target){ + o.currenthtml = target; + o.currentface = "settings"; + var bindHandlers = function(){ + $("select#change_theme").change(function(){ + o.changeTheme($(this).val()); + }) + } + if(!o.desktopData[o.currentface]){ + $(o.contentHolder).empty().load("/desktop/"+target,function(){ + bindHandlers(); + }); + }else{ + $(o.contentHolder).html(o.desktopData[o.currentface]); + bindHandlers(); + } + }; this.loadWallpaper = function(wallpaper){ if(!wallpaper)wallpaper = o.themesettings.background; var ww = $(window).width(); @@ -252,97 +314,33 @@ var orbitDesktop = function(dom){ $("div#bgover").css({"position":"fixed","top":"0px","left":"0px","z-index":"-1","width":ww,"height":wh}); }; this.loadIconCache = function(){ - $("#home_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.home); - $("#app_manager_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.app_manager); - $("#sections_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.sections); - $("#settings_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.settings); - $("#publication_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.publication); - $("#journal_p_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.journal_p); - $("#seminar_p_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.seminar_p); - $("#books_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.books); - $("#research_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.research); - $("#research_d_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.research_d); - $("#research_p_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.research_p); - $("#patents_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.patents); - $("#labs_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.labs); - $("#experience_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.experience); - $("#working_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.working); - $("#education_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.education); - $("#honors_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.honors); - $("#activities_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.activities); - $("#clubs_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.clubs); - $("#landt_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.landt); - $("#courses_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.courses); - $("#homework_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.homework); - $("#certification_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.certification); - $("#personal_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.personal); - $("#mypage_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.mypage); - $("#blog_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.blog); - $("#album_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.album); - $("#calendar_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.calendar); - $("#files_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.files); - $("#orbit_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.orbit); - $("#connection_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.connection); - $("#appstore_icon").attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons.appstore); - }; - this.initializeSettings = function(target){ - o.currenthtml = target; - o.currentface = "settings"; - if(!o.desktopData[o.currentface]){ - $(o.contentHolder).empty().load("/desktop/"+target,function(){ - // bindHandlers(); - }); - }else{ - $(o.contentHolder).html(o.desktopData[o.currentface]); - // bindHandlers(); - } + var imgs = $("ul.docklist img"); + $.each(imgs,function(){ + var setting_name = $(this).attr("id").replace("_icon",""); + $(this).attr("src","/"+o.themefolder+"/"+o.theme+"/images/"+o.themesettings.icons[setting_name]) + }) }; + this.initializeWidgets = function(){ + var elements = $("#group_wrapper li.element"); + $.each(elements,function(){ + var widget = $(this); + if(widget.attr("data-category")=="widget"){ + var widgename =widget.attr("data-content"); + $.getScript("/desktop_widgets/"+widgename+"/"+widgename+".js",function(){ + widget.find("div.appholder").load("/desktop_widgets/"+widgename+"/index.html.erb"); + }); + // $(this).find("div.appholder").append( $('').attr('href', "/desktop_widgets/"+widgename+"/css/"+widgename+".css")); + } + + }) + } o.initialize(); } orbitDesktop.prototype.themefolder = "themes"; +orbitDesktop.prototype.widgetfolder = "desktop_widgets"; +orbitDesktop.prototype.desktopId = "1"; +orbitDesktop.prototype.notifyImgPath = "temp"; // devin -(function(){ - $(document).ready(function(){ - // dock effect - var $widget_fn = $('.widget_fn'), - $fn_des = $('.fn_des'); - $widget_fn.hover(function(){ - var fn_name = $(this).find('img').attr('alt'), - nth = $(this).parents('.d_cate').index(), - des_left = $('.dock_child').eq(nth).width(); - - - $(this).addClass('thmc1'); - $fn_des - .text(fn_name) - .css({ - 'top':nth * 60, - 'left': des_left + 60 - }) - .stop(true, true) - .fadeIn(); - }, function(){ - $(this).removeClass('thmc1'); - $fn_des.stop(true, true).fadeOut(); - }); - - }); -}()); - -// Simple Dropdown Menu -function sdm(){ - var $sdm = $('.sdm'); - - if( !$sdm.children('.sdm_o') ){ - return; - } else { - $sdm.hover(function(){ - $(this).addClass('thmc2'); - }, function(){ - $(this).removeClass('thmc2'); - }); - } -} \ No newline at end of file diff --git a/app/assets/javascripts/orbitdesktopAPI.js b/app/assets/javascripts/orbitdesktopAPI.js index f2db7114..6505f2f3 100644 --- a/app/assets/javascripts/orbitdesktopAPI.js +++ b/app/assets/javascripts/orbitdesktopAPI.js @@ -33,7 +33,7 @@ var orbitDesktopAPI = function(){ img = "note_alert.png"; break; } - $notify.find("img#note_img").attr("src","/assets/"+img); + $notify.find("img#note_img").attr("src",o.notifyImgPath+img); $notify.find(".note_message").text(msg); n_height = $notify.outerHeight(); if(!time)time=5000; else time=time*1000; @@ -44,5 +44,3 @@ var orbitDesktopAPI = function(){ .animate({top:-n_height,opacity:0},200); }; }; - -orbitDesktopAPI.prototype.notifyImgPath = ""; \ No newline at end of file diff --git a/app/assets/javascripts/tinymce_orbit.js b/app/assets/javascripts/tinymce_orbit.js index 89fb9390..60492914 100644 --- a/app/assets/javascripts/tinymce_orbit.js +++ b/app/assets/javascripts/tinymce_orbit.js @@ -4,14 +4,13 @@ $(function() { plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template", // Theme options - theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect", - theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", - theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen", - theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage", + theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,formatselect,fontselect,fontsizeselect", + theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,bullist,numlist,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,forecolor,backcolor", + theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,fullscreen", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_statusbar_location : "bottom", - theme_advanced_resizing : false, + theme_advanced_resizing : true, // Skin options skin : "o2k7", diff --git a/app/assets/stylesheets/desktopmain.css b/app/assets/stylesheets/desktopmain.css index f9930737..de18a161 100644 --- a/app/assets/stylesheets/desktopmain.css +++ b/app/assets/stylesheets/desktopmain.css @@ -180,8 +180,8 @@ a, a:hover { text-decoration: none; } width: 100%; height: 100%; padding: 0; - left: 0; - top: 0; +/* left: 0; + top: 0; */ } .dtitle { font-size: 30px; diff --git a/app/assets/stylesheets/inc/permission-checkbox.css b/app/assets/stylesheets/inc/permission-checkbox.css new file mode 100644 index 00000000..9d7beb5e --- /dev/null +++ b/app/assets/stylesheets/inc/permission-checkbox.css @@ -0,0 +1,53 @@ +.checkblock { + display: inline-block; + float: left; + width: 200px; +} +.check[type="checkbox"]{ + display:none; +} +.checkbox{ + padding:5px; + margin:5px; + display: inline-block; + color:#777777; + text-shadow: 0 1px 0px rgba(255,255,255,.4); + border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + height: 30px; + position: relative; + cursor: pointer; + background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) ); + background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% ); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf'); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} +.checkbox .check-icon { + display: none; + position: absolute; + width: 22px; + height: 22px; + border-radius: 11px; + background-color: #d0f311; + right: -5px; + top: -5px; + box-shadow: 0px 0px 5px rgba(0,0,0,.05); +} +.checkbox .check-icon i { + margin: 1px 0 0 3px; +} +.checkbox .member-name { + line-height: 30px; + padding: 0 10px; +} +img.member-img { + display: inline-block; + float: left; + max-width: 30px; +} +.checked .check-icon { + display: block; +} \ No newline at end of file diff --git a/app/assets/stylesheets/lib/datepicker.css b/app/assets/stylesheets/lib/datepicker.css new file mode 100644 index 00000000..2487c921 --- /dev/null +++ b/app/assets/stylesheets/lib/datepicker.css @@ -0,0 +1,205 @@ +div.datepicker { + position: relative; + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + height: 147px; + cursor: default; + display: none; +} +.datepickerContainer { + padding: 10px; + margin: 0 auto; +} +/* +.datepickerBorderT { + position: absolute; + left: 10px; + top: 0; + right: 10px; + height: 10px; + background: url(../images/datepicker_t.png); +} +.datepickerBorderB { + position: absolute; + left: 10px; + bottom: 0; + right: 10px; + height: 10px; + background: url(../images/datepicker_b.png); +} +.datepickerBorderL { + position: absolute; + left: 0; + bottom: 10px; + top: 10px; + width: 10px; + background: url(../images/datepicker_l.png); +} +.datepickerBorderR { + position: absolute; + right: 0; + bottom: 10px; + top: 10px; + width: 10px; + background: url(../images/datepicker_r.png); +} +.datepickerBorderTL { + position: absolute; + top: 0; + left: 0; + width: 10px; + height: 10px; + background: url(../images/datepicker_tl.png); +} +.datepickerBorderTR { + position: absolute; + top: 0; + right: 0; + width: 10px; + height: 10px; + background: url(../images/datepicker_tr.png); +} +.datepickerBorderBL { + position: absolute; + bottom: 0; + left: 0; + width: 10px; + height: 10px; + background: url(../images/datepicker_bl.png); +} +.datepickerBorderBR { + position: absolute; + bottom: 0; + right: 0; + width: 10px; + height: 10px; + background: url(../images/datepicker_br.png); +} +*/ +.datepickerHidden { + display: none; +} +div.datepicker table { + width: 260px; + border-collapse:collapse; +} +div.datepicker a { + text-decoration: none; + cursor: default; + outline: none; +} +div.datepicker table td { + text-align: right; + padding: 0; + margin: 0; +} +div.datepicker th { + text-align: center; + color: #999; + font-weight: normal; +} +div.datepicker tbody th { + /*text-align: left;*/ +} +div.datepicker tbody a { + display: block; + width: 100%; + text-align: center; +} +.datepickerWeek a { + color: #F60; +} +.datepickerWeek a:hover { + color: #FC0 !important; +} +.datepickerDays a { + width: 20px; + line-height: 16px; + height: 16px; + padding-right: 2px; +} +.datepickerYears a, +.datepickerMonths a{ + width: 44px; + line-height: 36px; + height: 36px; + text-align: center; +} +td.datepickerNotInMonth a { + color: #666; +} +tbody.datepickerDays td.datepickerSelected{ + background: #0088CC; +} +tbody.datepickerDays td.datepickerSelected a{ + color: #FFF; +} +tbody.datepickerDays td.datepickerNotInMonth.datepickerSelected { + background: #17384d; +} +tbody.datepickerYears td.datepickerSelected, +tbody.datepickerMonths td.datepickerSelected{ + background: #17384d; +} +div.datepicker a:hover, +div.datepicker a:hover { + color: #88c5eb; +} +div.datepicker td.datepickerNotInMonth a:hover { + color: #999; +} +div.datepicker tbody th { + /*text-align: left;*/ +} +.datepickerSpace div { + width: 20px; +} +.datepickerGoNext a, +.datepickerGoPrev a, +.datepickerMonth a { + text-align: center; + height: 20px; + line-height: 20px; +} +.datepickerGoNext a { + float: right; + width: 20px; +} +.datepickerGoPrev a { + float: left; + width: 20px; +} +table.datepickerViewDays tbody.datepickerMonths, +table.datepickerViewDays tbody.datepickerYears { + display: none; +} +table.datepickerViewMonths tbody.datepickerDays, +table.datepickerViewMonths tbody.datepickerYears, +table.datepickerViewMonths tr.datepickerDoW { + display: none; +} +table.datepickerViewYears tbody.datepickerDays, +table.datepickerViewYears tbody.datepickerMonths, +table.datepickerViewYears tr.datepickerDoW { + display: none; +} +td.datepickerDisabled a, +td.datepickerDisabled.datepickerNotInMonth a{ + color: #333; +} +td.datepickerDisabled a:hover { + color: #333; +} +td.datepickerSpecial a { + background: #700; +} +td.datepickerSpecial.datepickerSelected a { + background: #a00; +} + +/*Layout*/ +#widgetCalendar { + height: 0; + overflow: hidden; + position: relative; +} \ No newline at end of file diff --git a/app/assets/stylesheets/list.css b/app/assets/stylesheets/list.css index b4becb42..11f17a55 100644 --- a/app/assets/stylesheets/list.css +++ b/app/assets/stylesheets/list.css @@ -39,8 +39,8 @@ left: -8px; } .main-list td { - background-color: #FFFFFF; - border-bottom: 1px solid #DDDDDD; + background-color: #FFFFFF; + border-bottom: 1px solid #DDDDDD; border-top: medium none; } .main-list .nav { @@ -77,15 +77,15 @@ -webkit-border-radius: 3px; -moz-border-radius: 3px; z-index: 5; -} -.table-label { - background-color: #F2F2F2; - position: relative; -} -.table-label .main-list thead th { - background-color: #F2F2F2; - border-right: 1px solid #DDDDDD; - border-top: 1px solid #DDDDDD !important; +} +.table-label { + background-color: #F2F2F2; + position: relative; +} +.table-label .main-list thead th { + background-color: #F2F2F2; + border-right: 1px solid #DDDDDD; + border-top: 1px solid #DDDDDD !important; } .route-group .route { padding: 0; @@ -120,9 +120,9 @@ legend { -webkit-border-radius: 0; border-radius: 0; border-left: none; - border-right: none; - position: fixed; - top: 30px; + border-right: none; + position: fixed; + top: 30px; z-index: 50; } .subnav .nav > li:first-child > a, .subnav .nav > li:first-child > a:hover { diff --git a/app/assets/stylesheets/style.css.erb b/app/assets/stylesheets/style.css.erb index 8d514425..d2e33b04 100644 --- a/app/assets/stylesheets/style.css.erb +++ b/app/assets/stylesheets/style.css.erb @@ -1,829 +1,873 @@ -@import url(http://fonts.googleapis.com/css?family=Cuprum); -@font-face{ - font-family: 'WebSymbolsRegular'; - src: url(<%= asset_path 'websymbols-regular-webfont.eot' %>); - src: url(<%= asset_path 'websymbols-regular-webfont.eot?#iefix' %>) format('embedded-opentype'), - url(<%= asset_path 'websymbols-regular-webfont.woff' %>) format('woff'), - url(<%= asset_path 'websymbols-regular-webfont.ttf' %>) format('truetype'), - url(<%= asset_path 'websymbols-regular-webfont.svg#WebSymbolsRegular' %>) format('svg'); -} -.login-logo { - text-indent: -9999px; - background: url(<%= asset_path 'sign-in-logo.png' %>) no-repeat center 40px; - padding-top: 40px; - height: 160px; -} -#orbit-bar { - margin-bottom: 0; - position:fixed; - width:100%; - z-index: 99; - top: 0; - left: 0; -} -#orbit-bar .navbar-inner { - height: 28px; - -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, #5282A6, #133757); - background-image: -ms-linear-gradient(top, #5282A6, #133757); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5282A6), to(#133757)); - background-image: -webkit-linear-gradient(top, #5282A6, #133757); - background-image: -o-linear-gradient(top, #5282A6, #133757); - background-image: linear-gradient(top, #5282A6, #133757); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5282A6', endColorstr='#133757', GradientType=0); - /* - 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); - */ -} -#orbit-bar .navbar-search { - float: none; - margin: 0 auto; - text-align: center; -} -#orbit-bar .nav.pull-right { - margin-right: -20px; -} -#orbit-bar .search-query { - background-image: url(<%= asset_path 'main-search.png' %>); - background-repeat: no-repeat; - background-position: 5px 6px; - padding-left: 25px; - /*background-color: rgba(255, 255, 255, 0.8); - color: #333; - text-shadow: 0px 1px 0px #FFF;*/ - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3) inset, 0 1px 0 rgba(255, 255, 255, 0.15); -} -#orbit-bar .search-query:focus { - /*background-color: rgba(255, 255, 255, 0.9); - text-shadow: 0px 1px 0px #FFF;*/ - background-position: 6px 7px; -} -#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 'nccu_logo.png' %>) no-repeat 6px 0px; - text-indent:-9999px; - padding: 5px 20px 4px; -} -#orbit-bar .orbit-logo .brand:hover { - background-color: rgba(0,157,220,1); -} -#orbit-bar .orbit-logo.open .brand { - background-color: rgba(0,157,220,1); -} -#orbit-bar .orbit-logo .dropdown-menu { - 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: 16px; - height: 16px; - text-indent: -9999px; - padding:6px; -} -#orbit-bar .nav > li > a.orbit-bar-home { - background-position: -10px -10px; -} -#orbit-bar .nav > li > a.orbit-bar-desktop { - background-position: -100px -4px; -} -#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; -} -.language-menu .active { - 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; -} -#orbit-bar .nav span.member-name { - display: inline-block; - line-height: 22px; - padding: 0 10px; -} -#orbit-bar .nav img.member-img { - display: inline-block; - float: left; - max-width: 22px; -} -#orbit-bar .account-menu { - right: 5px; -} -#orbit-bar .bar-login { - -} -#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; -} -#orbit-bar .bar-login .dropdown-menu .log { - 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; -} -#orbit-bar .bar-login .dropdown-menu .log form { - margin: 0 0 8px; -} -#orbit-bar .bar-login .dropdown-menu .log input { - display: inline-block; - margin: 0; -} -#orbit-bar .bar-login .dropdown-menu .log .span2 { - width: 183px; -} -#orbit-bar .bar-login .dropdown-menu .log .forgot { - 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; -} -#orbit-bar .bar-login .dropdown-menu .log .remember { - 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; -} -#orbit-bar .bar-login .dropdown-menu .log .btn { - width: 220px; -} -#orbit-bar .bar-login .dropdown-menu .log .divider { - position:relative; - 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:16px; - text-align: center; -} -#orbit-bar .bar-login .dropdown-menu .register { - color: #FFFFFF; - margin: 0 15px; - width: 188px; -} -#main-sidebar { - background: url(<%= asset_path 'background.jpg' %>) repeat left top; - width: 155px; - padding-right: 4px; - border-right: 1px solid rgba(0,0,0,.2); - position:fixed; - top: 32px; - z-index: 88; -} -#main-sidebar .nav { - padding-top: 5px; -} -#main-sidebar .nav > li.active > a [class^="icons-"] { - background-image: url(<%= asset_path 'icons_pack_white.png' %>); -} -#main-sidebar .nav > li > .nav { - margin-left: -14px; - margin-bottom: 5px; - width: 155px; - padding: 0; - background-color: #FFF; - /*border-radius: 0px 0px 8px 0px; - -webkit-border-radius: 0px 0px 8px 0px; - -moz-border-radius: 0px 0px 8px 0px;*/ - box-shadow: 0px 2px 1px rgba(0,0,0,0.1); - -moz-box-shadow: 0px 2px 1px rgba(0,0,0,0.1); - -webkit-box-shadow: 0px 2px 1px rgba(0,0,0,0.1); -} -#main-sidebar .nav > li > .nav > li > a { - margin-left: 0; - padding-left: 19px; - color: #999; -} -#main-sidebar .nav > li > .nav > li > a:hover { - color: #000; - background-color: #d7eeff; -} -#main-sidebar .nav > li > .nav > li.active > a { - background-color: #b7b7b7; - color: #fff; -} -#main-wrap { - background-color: #FFF; - margin-left:160px; - padding-top: 32px; - padding-bottom: 18px; - position: relative; - min-height: 100%; -} -#main-wrap > .form-actions { - background-color: #FFF; - text-align: center; - padding: 17px 20px 0; - margin: 0; - border-top: none; -} -#main-wrap .subnav { - height: auto; - min-height: 36px; -} -#main-wrap .pagination { - margin: 18px 0 0; - text-align: center; -} -.main-list .route-group td { - border: none; -} -#main-wrap .route-group .breadcrumb { - background-image: none; - border-radius: 0; - -moz-border-radius: 0; - -webkit-border-radius: 0; - border-width: 0 0 1px 0; - box-shadow: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - margin-bottom: 0px; - padding: 7px 8px 5px; -} -#main-wrap .breadcrumb li { - font-size: 12px; - color: #999; -} -#sub-wiget { - clear: right; - float: right; - padding-right: 10px; - padding-top: 8px; - position: relative; - margin-bottom: 13px; - width: 304px; -} -.main-wiget .widget-box { - margin: 5px 0; - width: 100%; -} -#poststuff .form-actions { - background-color: transparent; - text-align: right; - padding-left: 10px; - padding-right: 10px; - margin-bottom: 0; - clear: both; -} -#poststuff form { - margin-bottom: 0; -} -#post-body { - float: left; - clear: left; - width: 100%; - margin-right: -340px; -} -#post-body .title input[type=text] { - margin-bottom: 0; - width: 100%; - height: 30px; -} -#post-body .btn-group { - margin-left: 5px; -} -#post-body .well { - margin: 0; - border-radius: 0px; - -moz-border-radius: 0px; - box-shadow: none; - -moz-box-shadow: none; - -webkit-box-shadow: none; - border-top: none; -} -#post-body .editor { - margin: 8px 0; - width: 100%; -} -#post-body-content { - margin-right: 320px; - padding: 8px 0 8px 6px; -} -.filter .accordion-heading > a:hover { - text-decoration: none; -} -.filter .accordion-group { - border-bottom: none; - border-top: none; - border-left: 1px solid rgba(0,0,0,0.07); - border-right: none; - -moz-border-radius: 0; - -webkit-border-radius: 0; - border-radius: 0; - margin-bottom: -1px; - position: relative; - left: 0; - top: 0; -} -.filter .accordion-group:last-child { - border-right: 1px solid rgba(0,0,0,0.07); -} -.filter .accordion-heading .accordion-toggle { - padding: 9px 15px; -} -.accordion-group .accordion-toggle .caret { - border-top-color: #0088CC; - margin-top: 6px; -} -.filter .active { - background-color: #0088CC; -} -.filter .active a { - color: #FFF; -} -.filters { - background-color: rgba(0,0,0,0.075); - -webkit-box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2); - -moz-box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2); - box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2); -} -.filters > div { - background-color: #dadada; -} -.filters .btn { - margin-bottom: 5px; -} -.filters .accordion-inner { - border-top: none; - padding: 9px 15px 4px; -} -.filters .filter-clear { - padding: 5px 5px 0; - border-top: 1px solid rgba(0,0,0,0.1); - text-align: right; - margin: 0 5px; - -webkit-box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.5); - -moz-box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.5); - box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.5); -} -.filters .in { - /*border-bottom: 1px solid rgba(0,0,0,0.07)*/ -} -.sign-in { - width: 360px; - margin: 0 auto 70px; - background-color: #FFF; - -moz-border-radius: 0 0 5px 5px; - -webkit-border-radius: 0 0 5px 5px; - border-radius: 0 0 5px 5px; - -moz-box-shadow: 0 2px 2px rgba(143, 143, 143, 0.38); - -webkit-box-shadow: 0 2px 2px rgba(143, 143, 143, 0.38); - box-shadow: 0 2px 2px rgba(143, 143, 143, 0.38); - border-width: 0px 1px 1px 1px; - border-style: none solid solid solid; - border-color: transparent #c6c6c6 #c6c6c6 #c6c6c6; -} -#signin-header { - width: 340px; - margin: 30px auto 0; - line-height: 25px; - padding: 5px 10px; - border-width: 1px 1px 0px 1px; - border-style: solid solid none solid; - border-color: #c6c6c6 #c6c6c6 transparent #c6c6c6; - background-color: #006dcc; - background-image: -moz-linear-gradient(top, #dadada, #c0c0c0); - background-image: -ms-linear-gradient(top, #dadada, #c0c0c0); - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#dadada), to(#c0c0c0)); - background-image: -webkit-linear-gradient(top, #dadada, #c0c0c0); - background-image: -o-linear-gradient(top, #dadada, #c0c0c0); - background-image: linear-gradient(top, #dadada, #c0c0c0); - -moz-border-radius: 5px 5px 0px 0px ; - -webkit-border-radius: 5px 5px 0px 0px; - border-radius: 5px 5px 0px 0px; - -moz-box-shadow: 0 1px 0px rgba(20, 20, 20, 0.3); - -webkit-box-shadow: 0 1px 0px rgba(20, 20, 20, 0.3); - box-shadow: 0 1px 0px rgba(20, 20, 20, 0.3); -} -#signin-header h3 { - color: #848484; - text-shadow: 0 1px 0 #e9e9e9; -} -#sign-footer { - width: 100%; - position:fixed; - bottom: 0; - height: 40px; - background-color: #dadada; - color: #7a7a7a; - box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3); - -moz-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3); - -webkit-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3); -} -#sign-footer p { - line-height: 40px; - padding: 0 10px; - text-align: right; -} -.sign-in .control-group label { - text-align: left; - width: auto; - font-size: 15px; -} -.sign-in .forgot { - padding-top: 5px; -} -.sign-in .content { - padding: 10px; -} -.sign-in .form-actions { - padding: 17px 10px 18px; - margin: 0; - -moz-border-radius: 0px 0px 5px 5px; - -webkit-border-radius: 0px 0px 5px 5px; - border-radius: 0px 0px 5px 5px; -} -.sign-in form { - margin: 0; -} -.sign-in .control-group .help-inline { - display:none; -} -.sign-in .error .help-inline { - display:inline-block; -} -.web-symbol:after { - font-family: 'WebSymbolsRegular'; - content: "{"; - margin-left: 2px; - margin-top: 8px; -} -.active .web-symbol:after { - content: "}"; -} -/*icons*/ -.the-icons i:after { - content: attr(class); - display: block; - font-style: normal; - margin-left: 20px; - width: 140px; -} -.the-icons i { - display: block; - margin-bottom: 5px; -} -[class^="text-"] { - font-size: 15px !important; -} -.text-blue { - color: #0088CC !important; -} -.text-red { - color: #CC3300 !important; -} -.text-yellow { - color: #ffcc00 !important; -} -.text-orange { - color: #f7941d !important; -} -.text-purple { - color: #a864a8 !important; -} -.text-palm { - color: #a67c52 !important; -} -.text-green { - color: #39b54a !important; -} -[class^="icons-"] { - display: inline-block; - width: 16px; - height: 16px; - vertical-align: text-top; - background-image: url(<%= asset_path 'icons_pack.png' %>); - background-position: 16px 16px; - background-repeat: no-repeat; - *margin-right: .3em; - margin-right:10px; -} -[class^="icons-"]:last-child { - *margin-left: 0; -} -.icons-white { - background-image: url(<%= asset_path 'icons_pack_white.png' %>); -} -/*1*/ -.icons-pencil { - background-position: 0 0; -} -.icons-brush { - background-position: -32px 0; -} -.icons-pen { - background-position: -64px 0; -} -.icons-brush-large { - background-position: -128px 0; -} -.icons-pen-small { - background-position: -96px 0; -} -.icons-bucket { - background-position: -160px 0; -} -.icons-eye { - background-position: -192px 0; -} -.icons-ban { - background-position: -224px 0; -} -.icons-trash { - background-position: -256px 0; -} -.icons-zoom { - background-position: -288px 0; -} -.icons-zoom-out { - background-position: -320px 0; -} -.icons-zoom-in { - background-position: -352px 0; -} -.icons-magic { - background-position: -384px 0; -} -.icons-aim { - background-position: -416px 0; -} -/*2*/ -.icons-flag { - background-position: 0 -32px; -} -.icons-paperclip { - background-position: -32px -32px; -} -.icons-share { - background-position: -64px -32px; -} -.icons-link { - background-position: -96px -32px; -} -.icons-tag { - background-position: -128px -32px; -} -.icons-lock { - background-position: -160px -32px; -} -.icons-unlock { - background-position: -192px -32px; -} -/*3*/ -.icons-content { - background-position: -160px -66px; -} -.icons-announcement { - background-position: -576px -64px; -} -/*4*/ -.icons-contact { - background-position: 0 -96px; -} -.icons-roll { - background-position: -32px -96px; -} -.icons-member { - background-position: -288px -96px; -} -.icons-member-user { - background-position: -64px -96px; -} -.icons-member-admin { - background-position: -96px -96px; -} -.icons-member-manager{ - background-position: -128px -96px; -} -.icons-member-plus{ - background-position: -160px -96px; -} -.icons-member-minus{ - background-position: -192px -96px; -} -.icons-member-blockade{ - background-position: -224px -96px; -} -.icons-carte { - background-position: -256px -96px; -} -.icons-building { - background-position: -320px -96px; -} -.icons-calendar { - background-position: -352px -96px; -} -.icons-calendars { - background-position: -384px -96px; -} -.icons-out { - background-position: -416px -96px; -} -.icons-desktop { - background-position: -448px -96px; -} -/*5*/ -.icons-page-blank { - background-position: 0px -128px; -} -.icons-page { - background-position: -32px -128px; -} -.icons-page-copy { - background-position: -64px -128px; -} -.icons- { - background-position: -0px -128px; -} -/*6*/ -.icons-globe { - background-position: -96px -160px; -} -.icons-structure { - background-position: -352px -160px; -} -/*7*/ -.icons-purchase { - background-position: -64px -192px; -} -/*8*/ -.icons-dashboard { - background-position: 0 -224px; -} -.icons-cog { - background-position: -32px -224px; -} -.icons-cogs { - background-position: -64px -224px; -} -.icons-tool { - background-position: -96px -224px; -} -.icons-screwdriver { - background-position: -128px -224px; -} -.icons-wrench { - background-position: -160px -224px; -} -.icons-toolbox { - background-position: -192px -224px; -} -.icons-switch { - background-position: -224px -224px; -} -.icons-valve { - background-position: -256px -224px; -} -/*9*/ -.icons-picture { - background-position: -256px -256px; -} -.icons-asset { - background-position: -384px -256px; -} -.icons-asset-upload { - background-position: -448px -256px; -} -.icons-asset-download { - background-position: -416px -256px; -} -/*10*/ -.icons- { - background-position: -0px -288px; -} -/*11*/ -.icons-pie { - background-position: 0px -320px; -} -.icons-histogram { - background-position: -32px -320px; -} -.icons-window { - background-position: -64px -320px; -} -.icons-window-line{ - background-position: -96px -320px; -} -.icons-window-command{ - background-position: -128px -320px; -} -.icons-window-list{ - background-position: -160px -320px; -} -.icons-window-block{ - background-position: -192px -320px; -} -.icons-terminal{ - background-position: -224px -320px; -} -/*12*/ -.icons-star-thin { - background-position: -416px -352px; -} -.icons- { - background-position: -0px -352px; -} -/*13*/ -.icons- { - background-position: -0px -384px; -} -/*14*/ -.icons- { - background-position: -0px -416px; -} -/*15*/ -.icons- { - background-position: -0px -448px; -} -/*16*/ -.icons- { - background-position: -0px -480px; -} -/*17*/ -.icons- { - background-position: -0px -512px; -} -/*18*/ -.icons-help { - background-position: -160px -544px; -} -.icons- { - background-position: -0px -544px; -} -/*19*/ -.icons-plus-cube { - background-position: -192px -576px; -} -.icons-plus { - background-position: -288px -576px; -} -.icons-power { - background-position: -0px -608px; -} -/*20*/ -.icons- { - background-position: -0px -608px; -} -/*21*/ -.icons- { - background-position: -0px -640px; +@font-face{ + font-family: 'WebSymbolsRegular'; + src: url(<%= asset_path 'websymbols-regular-webfont.eot' %>); + src: url(<%= asset_path 'websymbols-regular-webfont.eot?#iefix' %>) format('embedded-opentype'), + url(<%= asset_path 'websymbols-regular-webfont.woff' %>) format('woff'), + url(<%= asset_path 'websymbols-regular-webfont.ttf' %>) format('truetype'), + url(<%= asset_path 'websymbols-regular-webfont.svg#WebSymbolsRegular' %>) format('svg'); +} +.login-logo { + text-indent: -9999px; + background: url(<%= asset_path 'sign-in-logo.png' %>) no-repeat center 40px; + padding-top: 40px; + height: 160px; +} +#orbit-bar { + margin-bottom: 0; + position:fixed; + width:100%; + z-index: 99; + top: 0; + left: 0; +} +#orbit-bar .navbar-inner { + height: 28px; + -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, #5282A6, #133757); + background-image: -ms-linear-gradient(top, #5282A6, #133757); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5282A6), to(#133757)); + background-image: -webkit-linear-gradient(top, #5282A6, #133757); + background-image: -o-linear-gradient(top, #5282A6, #133757); + background-image: linear-gradient(top, #5282A6, #133757); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5282A6', endColorstr='#133757', GradientType=0); + /* + 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); + */ +} +#orbit-bar .navbar-search { + left: 28px; + margin: 0; + position: absolute; + text-align: right; + top: -1px; +} +#orbit-bar .nav.pull-right { + margin-right: -20px; +} +#orbit-bar .search-query { + padding: 4px 9px; + height: 12px; + margin-top: 3px; + border: 1px solid #333333; + font-size: 11px; + /*background-color: rgba(255, 255, 255, 0.8); + color: #333; + text-shadow: 0px 1px 0px #FFF;*/ + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3) inset, 0 1px 0 rgba(255, 255, 255, 0.15); +} +#orbit-bar .search-query:focus { + /*background-color: rgba(255, 255, 255, 0.9); + text-shadow: 0px 1px 0px #FFF;*/ + 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 'nccu_logo.png' %>) no-repeat 6px 0px; + text-indent:-9999px; + padding: 5px 20px 4px; +} +#orbit-bar .orbit-logo .brand:hover { + background-color: rgba(0,157,220,1); +} +#orbit-bar .orbit-logo.open .brand { + background-color: rgba(0,157,220,1); +} +#orbit-bar .orbit-logo .dropdown-menu { + 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: 16px; + height: 16px; + text-indent: -9999px; + padding:6px; +} +#orbit-bar .nav > li.search { + overflow: hidden; + width: 28px; + position: relative; +} +#orbit-bar .nav > li > a.orbit-bar-home { + background-position: -10px -10px; +} +#orbit-bar .nav > li > a.orbit-bar-desktop { + background-position: -106px -9px; +} +#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; +} +.language-menu .active { + 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; +} +#orbit-bar .nav span.member-name { + display: inline-block; + line-height: 22px; + padding: 0 10px; +} +#orbit-bar .nav img.member-img { + display: inline-block; + float: left; + max-width: 22px; +} +#orbit-bar .clear { + clear: none; +} +#orbit-bar .account-menu { + right: 5px; +} +#orbit-bar .bar-login { + +} +#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; +} +#orbit-bar .bar-login .dropdown-menu .log { + 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; +} +#orbit-bar .bar-login .dropdown-menu .log form { + margin: 0 0 8px; +} +#orbit-bar .bar-login .dropdown-menu .log input { + display: inline-block; + margin: 0; +} +#orbit-bar .bar-login .dropdown-menu .log .span2 { + width: 183px; +} +#orbit-bar .bar-login .dropdown-menu .log .forgot { + 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; +} +#orbit-bar .bar-login .dropdown-menu .log .remember { + 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; +} +#orbit-bar .bar-login .dropdown-menu .log .btn { + width: 220px; +} +#orbit-bar .bar-login .dropdown-menu .log .divider { + position:relative; + 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:16px; + text-align: center; +} +#orbit-bar .bar-login .dropdown-menu .register { + color: #FFFFFF; + margin: 0 15px; + width: 188px; +} +#main-sidebar { + background: url(<%= asset_path 'background.jpg' %>) repeat left top; + width: 155px; + padding-right: 4px; + border-right: 1px solid rgba(0,0,0,.2); + position:fixed; + top: 32px; + z-index: 88; +} +#main-sidebar .nav { + padding-top: 5px; +} +#main-sidebar .nav > li.active > a [class^="icons-"] { + background-image: url(<%= asset_path 'icons_pack_white.png' %>); +} +#main-sidebar .nav > li > .nav { + margin-left: -14px; + margin-bottom: 5px; + width: 155px; + padding: 0; + background-color: #FFF; + /*border-radius: 0px 0px 8px 0px; + -webkit-border-radius: 0px 0px 8px 0px; + -moz-border-radius: 0px 0px 8px 0px;*/ + box-shadow: 0px 2px 1px rgba(0,0,0,0.1); + -moz-box-shadow: 0px 2px 1px rgba(0,0,0,0.1); + -webkit-box-shadow: 0px 2px 1px rgba(0,0,0,0.1); +} +#main-sidebar .nav > li > .nav > li > a { + margin-left: 0; + padding-left: 19px; + color: #999; +} +#main-sidebar .nav > li > .nav > li > a:hover { + color: #000; + background-color: #d7eeff; +} +#main-sidebar .nav > li > .nav > li.active > a { + background-color: #b7b7b7; + color: #fff; +} +#main-wrap { + background-color: #FFF; + margin-left:160px; + padding-top: 32px; + padding-bottom: 18px; + position: relative; + min-height: 100%; +} +#main-wrap > .form-actions { + background-color: #FFF; + text-align: center; + padding: 17px 20px 0; + margin: 0; + border-top: none; +} +#main-wrap .subnav { + height: auto; + min-height: 36px; +} +#main-wrap .pagination { + margin: 18px 0 0; + text-align: center; +} +.main-list .route-group td { + border: none; +} +#main-wrap .route-group .breadcrumb { + background-image: none; + border-radius: 0; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-width: 0 0 1px 0; + box-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + margin-bottom: 0px; + padding: 7px 8px 5px; +} +#main-wrap .breadcrumb li { + font-size: 12px; + color: #999; +} +#sub-wiget { + clear: right; + float: right; + padding-right: 10px; + padding-top: 8px; + position: relative; + margin-bottom: 13px; + width: 304px; +} +.main-wiget .widget-box { + margin: 5px 0; + width: 100%; +} +#poststuff .form-actions { + background-color: transparent; + text-align: right; + padding-left: 10px; + padding-right: 10px; + margin-bottom: 0; + clear: both; +} +#poststuff form { + margin-bottom: 0; +} +#post-body { + float: left; + clear: left; + width: 100%; + margin-right: -340px; +} +#post-body .title input[type=text] { + margin-bottom: 0; + width: 100%; + height: 30px; +} +#post-body .btn-group { + margin-left: 5px; +} +#post-body .well { + margin: 0; + border-radius: 0px; + -moz-border-radius: 0px; + box-shadow: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + border-top: none; +} +#post-body .editor { +} +#post-body-content { + margin-right: 320px; + padding: 8px 0 8px 6px; +} +.filter .accordion-heading > a:hover { + text-decoration: none; +} +.filter .accordion-group { + border-bottom: none; + border-top: none; + border-left: 1px solid rgba(0,0,0,0.07); + border-right: none; + -moz-border-radius: 0; + -webkit-border-radius: 0; + border-radius: 0; + margin-bottom: -1px; + position: relative; + left: 0; + top: 0; +} +.filter .accordion-group:last-child { + border-right: 1px solid rgba(0,0,0,0.07); +} +.filter .accordion-heading .accordion-toggle { + padding: 9px 15px; +} +.accordion-group .accordion-toggle .caret { + border-top-color: #0088CC; + margin-top: 6px; +} +.filter .active { + background-color: #0088CC; +} +.filter .active a { + color: #FFF; +} +.filter form { + margin: 5px 10px; +} +.filters { + background-color: rgba(0,0,0,0.075); + -webkit-box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2); + -moz-box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2); + box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2); +} +.filters > div { + background-color: #dadada; +} +.filters .btn { + margin-bottom: 5px; +} +.filters .accordion-inner { + border-top: none; + padding: 9px 15px 4px; +} +.filters .filter-clear { + padding: 5px 5px 0; + border-top: 1px solid rgba(0,0,0,0.1); + text-align: right; + margin: 0 5px; + -webkit-box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.5); + -moz-box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.5); + box-shadow: inset 0 1px 0px rgba(255, 255, 255, 0.5); +} +.filters .in { + /*border-bottom: 1px solid rgba(0,0,0,0.07)*/ +} +.sign-in { + width: 360px; + margin: 0 auto 70px; + background-color: #FFF; + -moz-border-radius: 0 0 5px 5px; + -webkit-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; + -moz-box-shadow: 0 2px 2px rgba(143, 143, 143, 0.38); + -webkit-box-shadow: 0 2px 2px rgba(143, 143, 143, 0.38); + box-shadow: 0 2px 2px rgba(143, 143, 143, 0.38); + border-width: 0px 1px 1px 1px; + border-style: none solid solid solid; + border-color: transparent #c6c6c6 #c6c6c6 #c6c6c6; +} +#signin-header { + width: 340px; + margin: 30px auto 0; + line-height: 25px; + padding: 5px 10px; + border-width: 1px 1px 0px 1px; + border-style: solid solid none solid; + border-color: #c6c6c6 #c6c6c6 transparent #c6c6c6; + background-color: #006dcc; + background-image: -moz-linear-gradient(top, #dadada, #c0c0c0); + background-image: -ms-linear-gradient(top, #dadada, #c0c0c0); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#dadada), to(#c0c0c0)); + background-image: -webkit-linear-gradient(top, #dadada, #c0c0c0); + background-image: -o-linear-gradient(top, #dadada, #c0c0c0); + background-image: linear-gradient(top, #dadada, #c0c0c0); + -moz-border-radius: 5px 5px 0px 0px ; + -webkit-border-radius: 5px 5px 0px 0px; + border-radius: 5px 5px 0px 0px; + -moz-box-shadow: 0 1px 0px rgba(20, 20, 20, 0.3); + -webkit-box-shadow: 0 1px 0px rgba(20, 20, 20, 0.3); + box-shadow: 0 1px 0px rgba(20, 20, 20, 0.3); +} +#signin-header h3 { + color: #848484; + text-shadow: 0 1px 0 #e9e9e9; +} +#sign-footer { + width: 100%; + position:fixed; + bottom: 0; + height: 40px; + background-color: #dadada; + color: #7a7a7a; + box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3); + -webkit-box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.3); +} +#sign-footer p { + line-height: 40px; + padding: 0 10px; + text-align: right; +} +.sign-in .control-group label { + text-align: left; + width: auto; + font-size: 15px; +} +.sign-in .forgot { + padding-top: 5px; +} +.sign-in .content { + padding: 10px; +} +.sign-in .form-actions { + padding: 17px 10px 18px; + margin: 0; + -moz-border-radius: 0px 0px 5px 5px; + -webkit-border-radius: 0px 0px 5px 5px; + border-radius: 0px 0px 5px 5px; +} +.sign-in form { + margin: 0; +} +.sign-in .control-group .help-inline { + display:none; +} +.sign-in .error .help-inline { + display:inline-block; +} +.web-symbol:after { + font-family: 'WebSymbolsRegular'; + content: "{"; + margin-left: 2px; + margin-top: 8px; +} +.active .web-symbol:after { + content: "}"; +} +.img-peview { + margin-left: 12px; +} +.popover img { + max-height: 120px; + max-width: 100%; +} +.popover-inner { + width: auto; +} +.popover-title { + padding: 5px; +} +.popover-content { + border-radius: 3px; + padding: 5px; +} +.popover-title { + display: none; +} +/*icons*/ +.the-icons i:after { + content: attr(class); + display: block; + font-style: normal; + margin-left: 20px; + width: 140px; +} +.the-icons i { + display: block; + margin-bottom: 5px; +} +[class^="text-"] { + font-size: 15px !important; +} +.text-blue { + color: #0088CC !important; +} +.text-red { + color: #CC3300 !important; +} +.text-yellow { + color: #ffcc00 !important; +} +.text-orange { + color: #f7941d !important; +} +.text-purple { + color: #a864a8 !important; +} +.text-palm { + color: #a67c52 !important; +} +.text-green { + color: #39b54a !important; +} +[class^="icons-"] { + display: inline-block; + width: 16px; + height: 16px; + vertical-align: text-top; + background-image: url(<%= asset_path 'icons_pack.png' %>); + background-position: 16px 16px; + background-repeat: no-repeat; + *margin-right: .3em; + margin-right:10px; +} +[class^="icons-"]:last-child { + *margin-left: 0; +} +.icons-white { + background-image: url(<%= asset_path 'icons_pack_white.png' %>); +} +/*1*/ +.icons-pencil { + background-position: 0 0; +} +.icons-brush { + background-position: -32px 0; +} +.icons-pen { + background-position: -64px 0; +} +.icons-brush-large { + background-position: -128px 0; +} +.icons-pen-small { + background-position: -96px 0; +} +.icons-bucket { + background-position: -160px 0; +} +.icons-eye { + background-position: -192px 0; +} +.icons-ban { + background-position: -224px 0; +} +.icons-trash { + background-position: -256px 0; +} +.icons-zoom { + background-position: -288px 0; +} +.icons-zoom-out { + background-position: -320px 0; +} +.icons-zoom-in { + background-position: -352px 0; +} +.icons-magic { + background-position: -384px 0; +} +.icons-aim { + background-position: -416px 0; +} +/*2*/ +.icons-flag { + background-position: 0 -32px; +} +.icons-paperclip { + background-position: -32px -32px; +} +.icons-share { + background-position: -64px -32px; +} +.icons-link { + background-position: -96px -32px; +} +.icons-tag { + background-position: -128px -32px; +} +.icons-lock { + background-position: -160px -32px; +} +.icons-unlock { + background-position: -192px -32px; +} +.icons-time { + background-position: -448px -32px; +} +.icons-banner { + background-position: -608px -32px; +} +/*3*/ +.icons-content { + background-position: -160px -66px; +} +.icons-announcement { + background-position: -576px -64px; +} +/*4*/ +.icons-contact { + background-position: 0 -96px; +} +.icons-roll { + background-position: -32px -96px; +} +.icons-member { + background-position: -288px -96px; +} +.icons-member-user { + background-position: -64px -96px; +} +.icons-member-admin { + background-position: -96px -96px; +} +.icons-member-manager{ + background-position: -128px -96px; +} +.icons-member-plus{ + background-position: -160px -96px; +} +.icons-member-minus{ + background-position: -192px -96px; +} +.icons-member-blockade{ + background-position: -224px -96px; +} +.icons-carte { + background-position: -256px -96px; +} +.icons-building { + background-position: -320px -96px; +} +.icons-calendar { + background-position: -352px -96px; +} +.icons-calendars { + background-position: -384px -96px; +} +.icons-out { + background-position: -416px -96px; +} +.icons-desktop { + background-position: -448px -96px; +} +/*5*/ +.icons-page-blank { + background-position: 0px -128px; +} +.icons-page { + background-position: -32px -128px; +} +.icons-page-copy { + background-position: -64px -128px; +} +.icons- { + background-position: -0px -128px; +} +/*6*/ +.icons-globe { + background-position: -96px -160px; +} +.icons-structure { + background-position: -352px -160px; +} +/*7*/ +.icons-purchase { + background-position: -64px -192px; +} +/*8*/ +.icons-dashboard { + background-position: 0 -224px; +} +.icons-cog { + background-position: -32px -224px; +} +.icons-cogs { + background-position: -64px -224px; +} +.icons-tool { + background-position: -96px -224px; +} +.icons-screwdriver { + background-position: -128px -224px; +} +.icons-wrench { + background-position: -160px -224px; +} +.icons-toolbox { + background-position: -192px -224px; +} +.icons-switch { + background-position: -224px -224px; +} +.icons-valve { + background-position: -256px -224px; +} +/*9*/ +.icons-picture { + background-position: -256px -256px; +} +.icons-asset { + background-position: -384px -256px; +} +.icons-asset-upload { + background-position: -448px -256px; +} +.icons-asset-download { + background-position: -416px -256px; +} +/*10*/ +.icons- { + background-position: -0px -288px; +} +/*11*/ +.icons-pie { + background-position: 0px -320px; +} +.icons-histogram { + background-position: -32px -320px; +} +.icons-window { + background-position: -64px -320px; +} +.icons-window-line{ + background-position: -96px -320px; +} +.icons-window-command{ + background-position: -128px -320px; +} +.icons-window-list{ + background-position: -160px -320px; +} +.icons-window-block{ + background-position: -192px -320px; +} +.icons-terminal{ + background-position: -224px -320px; +} +/*12*/ +.icons-check-2 { + background-position: -288px -352px; +} +.icons-star-thin { + background-position: -416px -352px; +} +.icons- { + background-position: -0px -352px; +} +/*13*/ +.icons- { + background-position: -0px -384px; +} +/*14*/ +.icons- { + background-position: -0px -416px; +} +/*15*/ +.icons- { + background-position: -0px -448px; +} +/*16*/ +.icons- { + background-position: -0px -480px; +} +/*17*/ +.icons- { + background-position: -0px -512px; +} +/*18*/ +.icons-help { + background-position: -160px -544px; +} +.icons- { + background-position: -0px -544px; +} +/*19*/ +.icons-plus-cube { + background-position: -192px -576px; +} +.icons-plus { + background-position: -288px -576px; +} +.icons-power { + background-position: -0px -608px; +} +/*20*/ +.icons- { + background-position: -0px -608px; +} +/*21*/ +.icons- { + background-position: -0px -640px; } \ No newline at end of file diff --git a/app/assets/stylesheets/widget.css b/app/assets/stylesheets/widget.css index b0e3568d..f1c4d615 100644 --- a/app/assets/stylesheets/widget.css +++ b/app/assets/stylesheets/widget.css @@ -63,28 +63,86 @@ } .file-upload { position:relative; + overflow: hidden; } .file-upload .file-name { - display: inline-block; - margin: 0 0 5px 5px; white-space: nowrap; - width: 140px; + 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: 182px; } .file-upload .upload { margin:0; padding:0; position:absolute; - top:0; + top: 0; left:0; opacity:.0; - filter: alpha(opacity=100); + font-size: 60px; + left: -595px/9; + filter: alpha(opacity: 0); + outline: none; } .file-upload .upload:focus { position:absolute; } .upload-picture { - margin-right: 5px; + 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; +} +.file-upload .input-medium { + border-radius: 3px 3px 3px 3px !important; + width: 267px; + position: relative; + z-index: 5; } #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/ad_banners_controller.rb b/app/controllers/admin/ad_banners_controller.rb index 19d81057..95ce7e7c 100644 --- a/app/controllers/admin/ad_banners_controller.rb +++ b/app/controllers/admin/ad_banners_controller.rb @@ -1,5 +1,5 @@ class Admin::AdBannersController < ApplicationController - layout "admin" + layout "new_admin" before_filter :authenticate_user! before_filter :is_admin? @@ -10,11 +10,14 @@ class Admin::AdBannersController < ApplicationController end def show - @ad_banner = AdBanner.find(params[:id]) + @ad_banners = AdBanner.all + @active = AdBanner.find(params[:id]) + render :action => 'index' end def new - @ad_banner = AdBanner.new + @ad_banners = AdBanner.all + render :action => 'index',:params => 'new' end def create @@ -36,8 +39,13 @@ class Admin::AdBannersController < ApplicationController redirect_to admin_ad_banners_url end + def destroy_ad_image + + end + def index @ad_banners = AdBanner.all + @active = @ad_banners.first end end \ No newline at end of file diff --git a/app/controllers/admin/ad_images_controller.rb b/app/controllers/admin/ad_images_controller.rb new file mode 100644 index 00000000..3fb681da --- /dev/null +++ b/app/controllers/admin/ad_images_controller.rb @@ -0,0 +1,47 @@ +class Admin::AdImagesController < ApplicationController + layout 'new_admin' + before_filter :authenticate_user! + before_filter :is_admin? + + def edit + @ad_banner = AdBanner.find params[:ad_banner_id] + @ad_image = @ad_banner.ad_images.find params[:id] + end + + def update + @ad_banner = AdBanner.find params[:ad_banner_id] + @ad_image = AdImage.find params[:id] + @ad_image.update_attributes(params[:ad_image]) + @ad_image.to_save = true + @ad_image.save! + redirect_to admin_ad_banner_path @ad_banner + end + + def new + @ad_image =AdImage.new + #render :action => 'new',:url=> {:ad_banner_id => params.has_key?(:ad_banner_id)? params[:ad_banner_id],nil} + end + + def create + @ad_banner = AdBanner.find params[:ad_banner][:id] + ad_image = AdImage.new params[:ad_image] + ad_image.to_save = true + @ad_banner.ad_images << ad_image + + if @ad_banner.save! + redirect_to admin_ad_banner_path @ad_banner + end + + end + + def destroy + @ad_banner = AdBanner.find params[:ad_banner_id] + @ad_image = @ad_banner.ad_images.find params[:id] + if @ad_image.destroy + flash[:notice] = t('admin.success_destroy_ad_image') + redirect_to admin_ad_banner_path @ad_banner + end + end + + +end diff --git a/app/controllers/desktop_controller.rb b/app/controllers/desktop_controller.rb index 9d9211bc..a46c0cb0 100644 --- a/app/controllers/desktop_controller.rb +++ b/app/controllers/desktop_controller.rb @@ -1,11 +1,12 @@ class DesktopController< ApplicationController layout 'desktop' - + before_filter :authenticate_user! def index - + @desktop = current_user.desktop end def desktop + render :layout => false end @@ -17,6 +18,18 @@ class DesktopController< ApplicationController render :layout => false end + def save_desktop_settings + @desktop = Desktop.find(params["id"]) + @desktop.update_attributes(:theme => params["theme"]) + a = Array.new + a << {"success"=>"true"} + render :json=>a.to_json + end + + def get_desktop_settings + @desktop = Desktop.find(params["id"]) + render :json => @desktop.to_json + end def settings render :layout => false end diff --git a/app/controllers/gridfs_controller.rb b/app/controllers/gridfs_controller.rb index 8a95a581..4be7ec17 100644 --- a/app/controllers/gridfs_controller.rb +++ b/app/controllers/gridfs_controller.rb @@ -3,7 +3,7 @@ require 'mongo' class GridfsController < ActionController::Metal def serve - gridfs_path = env["PATH_INFO"].gsub("/gridfs/", "") + gridfs_path = env["PATH_INFO"].gsub("/gridfs/", "").force_encoding("UTF-8") begin gridfs_file = Mongo::GridFileSystem.new(Mongoid.database).open(gridfs_path, 'r') self.response_body = gridfs_file.read diff --git a/app/helpers/admin/ad_banner_helper.rb b/app/helpers/admin/ad_banner_helper.rb index 0621df38..2de0504b 100644 --- a/app/helpers/admin/ad_banner_helper.rb +++ b/app/helpers/admin/ad_banner_helper.rb @@ -1,2 +1,34 @@ module Admin::AdBannerHelper + def preview_block(ad_banner) + res ='' + #same code as in frontend backend parser + if ad_banner + res << "" + res << "
" + printable_ad_images = [] + ad_banner.ad_images.each do |ad_image| + if ad_image.display? + ad_image.weight.times do + printable_ad_images << ad_image + end + end + end + + printable_ad_images.shuffle! + printable_ad_images.each do |ad_image| #TODO Need Reflact + res << "" + end + res << "
" + res.html_safe + end + end + end \ No newline at end of file diff --git a/app/helpers/admin/ad_images_helper.rb b/app/helpers/admin/ad_images_helper.rb new file mode 100644 index 00000000..1f2422fc --- /dev/null +++ b/app/helpers/admin/ad_images_helper.rb @@ -0,0 +1,7 @@ +module Admin::AdImagesHelper + + def active_when_default_locale_eq locale + locale.to_sym == I18n.default_locale ? 'active': '' + end + +end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9c03de3d..6d2cf9a8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2,6 +2,12 @@ module ApplicationHelper FLASH_NOTICE_KEYS = [:error, :notice, :warning] + def site_valid_locales_default_head + index = @site_valid_locales.rindex I18n.default_locale.to_s + shift_out = @site_valid_locales.shift(index) + @site_valid_locales += shift_out + end + def colorize_in_use_locale(locale) @site_in_use_locales.include?(locale)? 'green' : 'red' end @@ -145,7 +151,8 @@ module ApplicationHelper javascripts << "\n" javascripts << "\n" javascripts << "\n" - javascripts << "\n" + javascripts << "\n" + javascripts << "\n" javascripts << "\n" javascripts << "\n" page.design.javascripts.each do |js| diff --git a/app/models/ad_banner.rb b/app/models/ad_banner.rb index 0a2928b3..3e09280f 100644 --- a/app/models/ad_banner.rb +++ b/app/models/ad_banner.rb @@ -4,41 +4,32 @@ class AdBanner include Mongoid::MultiParameterAttributes field :title - field :picture_position - field :post_date,type: Date - field :unpost_date,type: Date - field :context - field :direct_to_after_click,type: Boolean + field :transition_sec,type: Integer field :ad_fx #TODO Design should explain - - + before_save :save_or_destroy - - embeds_many :ad_images, :cascade_callbacks => true + validates_uniqueness_of :title + has_many :ad_images , dependent: :delete FX_TYPES = ["blindX","blindY","blindZ","cover","curtainX","curtainY","fade","fadeZoom","growX","growY","scrollUp","scrollDown","scrollLeft","scrollRight","scrollHorz","scrollVert","shuffle","slideX","slideY","toss","turnUp","turnDown","turnLeft","turnRight","uncover","wipe","zoom"] - def display? - if (self.post_date <= Date.today && (self.unpost_date.nil? || self.unpost_date>= Date.today)) - return true - end - return false - end + + # def new_ad_images(*attrs) + # debugger + # a=1 + # attrs[0].each do |attr| #Loop by JSs,Themes,Imgs + # unless attr[:file].nil? + # self.ad_images << AdImage.new(attr) + # end + # end + # end - def new_ad_images=(*attrs) - attrs[0].each do |attr| #Loop by JSs,Themes,Imgs - unless attr[:file].nil? - self.ad_images << AdImage.new(attr) - end - end - end - - def existing_ad_images=(*attrs) - attrs[0].each do |attr| #Loop by JSs,Themes,Imgs - ad_image = self.ad_images.find attr[0] - ad_image.update_attributes(attr[1]) - end - end + # def existing_ad_images=(*attrs) + # attrs[0].each do |attr| #Loop by JSs,Themes,Imgs + # ad_image = self.ad_images.find attr[0] + # ad_image.update_attributes(attr[1]) + # end + # end def save_or_destroy self.ad_images.each do |ad_image| diff --git a/app/models/ad_image.rb b/app/models/ad_image.rb index 5d06d798..3eb63511 100644 --- a/app/models/ad_image.rb +++ b/app/models/ad_image.rb @@ -3,19 +3,46 @@ class AdImage include Mongoid::Timestamps mount_uploader :file, ImageUploader + + has_one :title, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy + has_one :context, :class_name => "I18nVariable", :as => :language_value, :autosave => true, :dependent => :destroy - field :time_to_next #Weight - field :picture_intro - field :out_link - field :link_open + field :direct_to_after_click,type: Boolean + + field :weight ,type: Integer ,default: 1 + field :out_link #the link itself + field :link_open #how will the link be opened + LINK_OPEN_TYPES = ["new_window","local"] + + field :post_date,type: Date + field :unpost_date,type: Date field :to_save, :type => Boolean field :to_destroy, :type => Boolean - - LINK_OPEN_TYPES = ["new_window","local"] + + 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' + # validates_presence_of :post_date,:message => 'Need a valid post date' + attr_reader :parse_post_date,:parse_unpost_date + + def parse_post_date=(att) + self.post_date = (Date.parse att rescue nil) + end - embedded_in :ad_banner + def parse_unpost_date=(att) + self.unpost_date = (Date.parse att rescue nil) + end + + def display? + if (self.post_date <= Date.today && (self.unpost_date.nil? || self.unpost_date>= Date.today) rescue false) + return true + end + return false + end + def get_delay_time time = '' diff --git a/app/models/design/design.rb b/app/models/design/design.rb index 7fbacedc..2a25dd11 100644 --- a/app/models/design/design.rb +++ b/app/models/design/design.rb @@ -1,6 +1,7 @@ class Design include Mongoid::Document include Mongoid::Timestamps + include ParserLayout field :title field :author @@ -14,7 +15,7 @@ class Design embeds_one :reset_css, :class_name => "Stylesheet", :cascade_callbacks => true embeds_many :themes, :cascade_callbacks => true embeds_many :javascripts, :cascade_callbacks => true - embeds_many :images, :cascade_callbacks => true + embeds_many :images, :as => :design_image, :cascade_callbacks => true # embeds_many :custom_images, :class_name => 'Image', :cascade_callbacks => true validates_presence_of :title @@ -65,9 +66,6 @@ class Design protected def parse_css_for_images - self.images.each do |image| - image.save - end if (self.default_css && self.default_css.changed) self.default_css.parse_urls end @@ -76,6 +74,7 @@ class Design theme.parse_urls end end + parse_body_for_images(self) end end diff --git a/app/models/design/stylesheet.rb b/app/models/design/stylesheet.rb index 4b908122..bb2ec85e 100644 --- a/app/models/design/stylesheet.rb +++ b/app/models/design/stylesheet.rb @@ -27,6 +27,7 @@ class Stylesheet < DesignFile temp_file = File.new(dir + '/' + orig_file_name, 'w+') temp_file.write content.force_encoding("UTF-8") self.file = temp_file + self.save } end diff --git a/app/models/desktop.rb b/app/models/desktop.rb new file mode 100644 index 00000000..16c8fd90 --- /dev/null +++ b/app/models/desktop.rb @@ -0,0 +1,19 @@ +class Desktop + include Mongoid::Document + include Mongoid::Timestamps + + field :theme, default: "default" + + belongs_to :user + has_many :sections, :autosave => true, :dependent => :destroy + + before_create :initialize_section + + def initialize_section + self.sections.build(name: "Desktop 1") + self.sections.build(name: "Desktop 2") + self.sections.build(name: "Desktop 3") + self.sections.build(name: "Desktop 4") + end + +end \ No newline at end of file diff --git a/app/models/group.rb b/app/models/group.rb new file mode 100644 index 00000000..4918514d --- /dev/null +++ b/app/models/group.rb @@ -0,0 +1,15 @@ +class Group + include Mongoid::Document + include Mongoid::Timestamps + + belongs_to :section + has_many :tiles, :autosave => true, :dependent => :destroy + before_create :initialize_tile + + def initialize_tile + self.tiles.build + self.tiles.build + end + +end + \ No newline at end of file diff --git a/app/models/page.rb b/app/models/page.rb index b9e06143..d98f3a4e 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -34,7 +34,7 @@ class Page < Item end def set_key - if title.new_record? + if title && title.new_record? title.key = 'title' end end diff --git a/app/models/section.rb b/app/models/section.rb new file mode 100644 index 00000000..f9035c69 --- /dev/null +++ b/app/models/section.rb @@ -0,0 +1,17 @@ +class Section + include Mongoid::Document + include Mongoid::Timestamps + + field :name + + belongs_to :desktop + has_many :groups, :autosave => true, :dependent => :destroy + + before_create :initialize_group + + def initialize_group + self.groups.build + self.groups.build + end + +end \ No newline at end of file diff --git a/app/models/tile.rb b/app/models/tile.rb new file mode 100644 index 00000000..010b9376 --- /dev/null +++ b/app/models/tile.rb @@ -0,0 +1,8 @@ +class Tile + include Mongoid::Document + include Mongoid::Timestamps + + belongs_to :group + + +end diff --git a/app/models/user/user.rb b/app/models/user/user.rb index d74a543b..39fec3f0 100644 --- a/app/models/user/user.rb +++ b/app/models/user/user.rb @@ -16,11 +16,13 @@ class User has_many :privilege_apps, :inverse_of => :privilege_users, :class_name => "AppAuth" has_many :managing_apps,:class_name => "AppManager" - + has_one :desktop, :autosave => true, :dependent => :destroy belongs_to :role has_and_belongs_to_many :sub_roles accepts_nested_attributes_for :attribute_values, :allow_destroy => true + before_create :initialize_desktop + def avb_apps sub_role_ids_ary=self.sub_roles.collect{|t| t.id} query1 = AppAuth.any_in({sub_role_ids: sub_role_ids_ary}).excludes(blocked_user_ids: self.id) @@ -53,4 +55,8 @@ class User User.find(id) rescue nil end + def initialize_desktop + self.build_desktop + end + end diff --git a/app/views/admin/ad_banners/_ad_banner_tab.html.erb b/app/views/admin/ad_banners/_ad_banner_tab.html.erb new file mode 100644 index 00000000..19ba5087 --- /dev/null +++ b/app/views/admin/ad_banners/_ad_banner_tab.html.erb @@ -0,0 +1,19 @@ + +
" id=<%= ad_banner_tab.title %>> +

尺寸:

+ + <%= form_for ad_banner_tab,:url=> admin_ad_banner_path(ad_banner_tab),:method => :put,:class=>"input-medium" do |f| -%> + <%= f.label :ad_fx, t('admin.ad.ab_fx') %> + <%= f.select :ad_fx ,AdBanner::FX_TYPES %> + <%= f.label :transition_sec, t('admin.ad.transition_sec') %> + <%= f.text_field :transition_sec,:placeholder=>"3秒請輸入3000",:class=> "span3" %> <%= t("admin.ad.trans_unit_sec") %> + <%= f.submit %> + <%= f.submit 'Cancel',:type=>'reset' %> +
+ <%= render :partial => "ad_image_update", :collection => ad_banner_tab.ad_images,:as => :ad_image,:locals=>{:ad_banner => ad_banner_tab} %> + <%#= render :partial => 'new_add_banner_file', :object => ad_banner_tab.ad_images.build, :locals => { :field_name => "new_ad_images[]", :f => f, :classes => "r_destroy" } %> + <%= link_to 'Add AdImage',new_admin_ad_banner_ad_image_path(ad_banner_tab) %> +
+ <% end -%> + <%= preview_block ad_banner_tab %> +
diff --git a/app/views/admin/ad_banners/_ad_image.html.erb b/app/views/admin/ad_banners/_ad_image.html.erb deleted file mode 100644 index e724a47f..00000000 --- a/app/views/admin/ad_banners/_ad_image.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -
- <%= image_tag ad_image.file %> -

- Time to next: <%= ad_image.time_to_next %> - Intro: <%= ad_image.picture_intro %> - Out Link <%= link_to ad_image.out_link %> by <%= ad_image.link_open %> -

-
diff --git a/app/views/admin/ad_banners/_ad_image_form.html.erb b/app/views/admin/ad_banners/_ad_image_form.html.erb deleted file mode 100644 index 3a153d47..00000000 --- a/app/views/admin/ad_banners/_ad_image_form.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -Time: <%= f.text_field :time_to_next ,:class=> 'ad_time'%> -Link:<%= f.text_field :out_link ,:class=> 'ad_out_link'%> -Open Type <%= f.select :link_open ,AdImage::LINK_OPEN_TYPES %> - -<%= f.hidden_field :to_save %> \ No newline at end of file diff --git a/app/views/admin/ad_banners/_ad_image_show.html.erb b/app/views/admin/ad_banners/_ad_image_show.html.erb deleted file mode 100644 index e724a47f..00000000 --- a/app/views/admin/ad_banners/_ad_image_show.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -
- <%= image_tag ad_image.file %> -

- Time to next: <%= ad_image.time_to_next %> - Intro: <%= ad_image.picture_intro %> - Out Link <%= link_to ad_image.out_link %> by <%= ad_image.link_open %> -

-
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 e3d53b15..366d370d 100644 --- a/app/views/admin/ad_banners/_ad_image_update.html.erb +++ b/app/views/admin/ad_banners/_ad_image_update.html.erb @@ -1,9 +1,12 @@ -<%= fields_for "ad_banner[existing_ad_images][#{ad_image.id}]", ad_image do |f| %> - <%= image_tag ad_image.file %> -
- Destroy?<%= f.check_box :to_destroy %> - <%= render :partial => "ad_image_form", :locals => { :f => f } %> -
-<% end %> - +
  • + <%= image_tag ad_image.file %> +

    + <%= ad_image.display? ? '[Showing]' : '[NotShawing]' %> + <%= "#{ad_image.post_date ||'NeedReset' }~#{ad_image.unpost_date || 'NeedReset'}" %> +

    +

    + <%= link_to 'Edit',edit_admin_ad_banner_ad_image_path(ad_banner,ad_image),:class => 'btn btn-primary' %> + <%= link_to 'Del',admin_ad_banner_ad_image_path(ad_banner,ad_image),:class => 'btn',:method => :delete,:confirm => t('sure?') %> +

    +
  • diff --git a/app/views/admin/ad_banners/_form.html.erb b/app/views/admin/ad_banners/_form.html.erb deleted file mode 100644 index c29d9aef..00000000 --- a/app/views/admin/ad_banners/_form.html.erb +++ /dev/null @@ -1,53 +0,0 @@ -<% content_for :page_specific_css do %> - <%#= javascript_include_tag "ad_banner" #this line wont work %> - -<% end %> - - -

    - <%= f.label :title, t('admin.title') %> - <%= f.text_field :title, :class => 'text' %> -

    -

    - <%= f.label :picture_position, t('admin.picture_position') %> - <%= f.text_field :picture_position, :class => 'text' %> -

    - -

    - <%= f.label :post_date, t('admin.post_date') %> - <%= f.date_select :post_date, :order => [:year, :month, :day], :use_month_numbers => true %> -

    - -

    - <%= f.label :unpost_date, t('admin.unpost_date') %> - <%= f.date_select :unpost_date, :order => [:year, :month, :day], :use_month_numbers => true,:prompt => { :day => t('form.date_unlimited'), :month => t('form.date_unlimited'), :year => t('form.date_unlimited') } %> -

    -

    - <%= f.label :context, t('admin.context') %> - <%= f.text_field :context, :class => 'text' %> - -

    -

    - <%= f.label :direct_to_after_click, t('admin.direct_to_after_click') %> - <%= f.check_box :direct_to_after_click %> -

    -

    - <%= f.label :ad_fx, t('admin.ad_fx') %> - <%= f.select :ad_fx ,AdBanner::FX_TYPES %> -

    -

    - <%#= f.label :ad_images, t('admin.ad_images') %> - - <%# @ad_banner.ad_images.each do |ad_image| %> - <%#= render :partial => 'ad_image_update', :object => ad_image, :locals => { :field_name => "ad_images", :f => f, :classes => "r_destroy, r_edit" } %> - <%# end %> - <%= render :partial => "ad_image_update", :collection => @ad_banner.ad_images,:as => :ad_image, %> -

      - <%= render :partial => 'new_add_banner_file', :object => @ad_banner.ad_images.build, :locals => { :field_name => "new_ad_images[]", :f => f, :classes => "r_destroy" } %> -

      - -

      - - - <%#= render :partial => 'new_design_file', :object => @design.themes.build, :locals => { :field_name => "themes", :f => f, :classes => "r_destroy" } %> -

      diff --git a/app/views/admin/ad_banners/_modal_ad_banner_form.html.erb b/app/views/admin/ad_banners/_modal_ad_banner_form.html.erb new file mode 100644 index 00000000..418b8c8f --- /dev/null +++ b/app/views/admin/ad_banners/_modal_ad_banner_form.html.erb @@ -0,0 +1,40 @@ + + + + + <% if user_signed_in? %>
      ' case part.kind when 'text' @@ -65,7 +65,7 @@ module ParserBackEnd public_r_tags << part.public_r_tag else '' - end + end if part end scope = "<#{content.name}" content.attributes.each_pair do |key, value| diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index 96cbb4b9..93ea2608 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -2,7 +2,7 @@ module ParserCommon def menu_level(page, current, menu, edit = false) res = '' - if current <= menu.levels + if menu.levels > 0 && current <= menu.levels if current != 0 res << "
      " item = rand(100000) @@ -49,19 +49,29 @@ module ParserCommon body.css('ad_banner').each do |banner| res = '' ad_banner = AdBanner.find(banner["id"]) rescue nil - if ad_banner && ad_banner.display? + if ad_banner res << "" res << "
      " - ad_banner.ad_images.each do |ad_image| - res << "" + printable_ad_images = [] + ad_banner.ad_images.each do |ad_image| + if ad_image.display? + ad_image.weight.times do + printable_ad_images << ad_image + end end + end + printable_ad_images.shuffle! + printable_ad_images.each do |ad_image| #TODO Need Reflact + res << "" + end res << "
      " end fragment = Nokogiri::HTML::DocumentFragment.new(body, res) @@ -74,7 +84,7 @@ module ParserCommon body.css('.page_image').each do |page_image| # image = page.custom_images.detect{|image| image.name.eql?(tag.attr['name']) } # image = page.design.custom_images.detect{|image| image.name.eql?(tag.attr['name']) } unless image - image = page.design.images.detect{|image| image.name.eql?(page_image['name']) } unless image + image = page.design.images.detect{|image| image.name.eql?(File.basename(page_image['src'])) } unless image if image res = " content['name']) end - body.css('.page_image').each do |image| - image = layout.design.images.detect{ |i| i.file_identifier.eql?(parse_html_image(image.to_html)) } - image.update_attributes(:name => image['name'], :html_id => image['id'], :html_class => image['class']) if image - end - body.css('.page_menu').each do |menu| layout.build_menu(:levels => 0, :values => {}) unless layout.menu layout.menu.levels = i = menu['level'].to_i @@ -22,12 +17,14 @@ module ParserLayout end - def parse_html_image(html) - html.scan(/(?<=\)/){ - $1.gsub(' ','').scan(/(?<=src=\")(.*?)(?=\")/){ - return File.basename($1).gsub(/[\\\"]/, '') - } - } + def parse_body_for_images(design) + body = Nokogiri::HTML(design.layout.body) + + body.css('.page_image').each do |page_image| + image = design.images.where( file: File.basename(page_image['src']))[0] + image.update_attributes(:name => File.basename(page_image['src']), :html_id => page_image['id'], :html_class => page_image['class']) if image + end + end diff --git a/public/desktop_pages/app_manager.html b/public/desktop_pages/app_manager.html deleted file mode 100755 index 570799f9..00000000 --- a/public/desktop_pages/app_manager.html +++ /dev/null @@ -1,121 +0,0 @@ -
      - -
      - -
      -
      - -
      - - - -
      -
      -
      -
      diff --git a/public/desktop_pages/desktop.html b/public/desktop_pages/desktop.html deleted file mode 100755 index 1089b596..00000000 --- a/public/desktop_pages/desktop.html +++ /dev/null @@ -1,110 +0,0 @@ -
      - -
      -
      -
      -
        -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Aperture

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Aperture

        -
      • -
      • -

        Aperture

        -
      • -
      • -

        Aperture

        -
      • -
      • -

        Aperture

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Aperture

        -
      • -
      • -

        Aperture

        -
      • -
      • -

        Aperture

        -
      • -
      • -

        Aperture

        -
      • -

        Aperture

        -
      • -

        Garage Band

        -
      • -

        Aperture

        -
      • -
      -
      -
      -
        -
      • -

        Garage Band

        -
      • -

        Aperture

        -
      • -
      • -

        Aperture

        -
      • -
      • -

        Aperture

        -
      • -

        Aperture

        -
      • -

        Aperture

        -
      • -

        Garage Band

        -
      • -

        Aperture

        -
      • -

        Aperture

        -
      • -

        Aperture

        -
      • -

        Aperture

        -
      • -

        Aperture

        -
      • -

        Garage Band

        -
      • -

        Aperture

        -
      • -

        Aperture

        -
      • -

        Aperture

        -
      • -
      -
      -
      -
      -
      - -
      -
      - \ No newline at end of file diff --git a/public/desktop_pages/sections.html b/public/desktop_pages/sections.html deleted file mode 100644 index 50ecaa93..00000000 --- a/public/desktop_pages/sections.html +++ /dev/null @@ -1,171 +0,0 @@ -
      - -
      -
      -
      - -
        -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • - - -
      -
      -
      - -
        -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • -
      • -

        Garage Band

        -
      • - -
      -
      -
      -
      -
      -
      \ No newline at end of file diff --git a/public/desktop_themes/chris/images/d_activities.png b/public/desktop_themes/chris/images/d_activities.png new file mode 100644 index 00000000..b481e676 Binary files /dev/null and b/public/desktop_themes/chris/images/d_activities.png differ diff --git a/public/desktop_themes/chris/images/d_album.png b/public/desktop_themes/chris/images/d_album.png new file mode 100644 index 00000000..6f0e4a17 Binary files /dev/null and b/public/desktop_themes/chris/images/d_album.png differ diff --git a/public/desktop_themes/chris/images/d_app_manager.png b/public/desktop_themes/chris/images/d_app_manager.png new file mode 100644 index 00000000..da09e5a4 Binary files /dev/null and b/public/desktop_themes/chris/images/d_app_manager.png differ diff --git a/public/desktop_themes/chris/images/d_appstore.png b/public/desktop_themes/chris/images/d_appstore.png new file mode 100644 index 00000000..e82e745d Binary files /dev/null and b/public/desktop_themes/chris/images/d_appstore.png differ diff --git a/public/desktop_themes/chris/images/d_blog.png b/public/desktop_themes/chris/images/d_blog.png new file mode 100644 index 00000000..0bb55251 Binary files /dev/null and b/public/desktop_themes/chris/images/d_blog.png differ diff --git a/public/desktop_themes/chris/images/d_books.png b/public/desktop_themes/chris/images/d_books.png new file mode 100644 index 00000000..49ec0fba Binary files /dev/null and b/public/desktop_themes/chris/images/d_books.png differ diff --git a/public/desktop_themes/chris/images/d_calendar.png b/public/desktop_themes/chris/images/d_calendar.png new file mode 100644 index 00000000..26520f73 Binary files /dev/null and b/public/desktop_themes/chris/images/d_calendar.png differ diff --git a/public/desktop_themes/chris/images/d_certification.png b/public/desktop_themes/chris/images/d_certification.png new file mode 100644 index 00000000..a695edce Binary files /dev/null and b/public/desktop_themes/chris/images/d_certification.png differ diff --git a/public/desktop_themes/chris/images/d_clubs.png b/public/desktop_themes/chris/images/d_clubs.png new file mode 100644 index 00000000..f22aa6dd Binary files /dev/null and b/public/desktop_themes/chris/images/d_clubs.png differ diff --git a/public/desktop_themes/chris/images/d_connection.png b/public/desktop_themes/chris/images/d_connection.png new file mode 100644 index 00000000..ac6978eb Binary files /dev/null and b/public/desktop_themes/chris/images/d_connection.png differ diff --git a/public/desktop_themes/chris/images/d_courses.png b/public/desktop_themes/chris/images/d_courses.png new file mode 100644 index 00000000..3d521ddf Binary files /dev/null and b/public/desktop_themes/chris/images/d_courses.png differ diff --git a/public/desktop_themes/chris/images/d_education.png b/public/desktop_themes/chris/images/d_education.png new file mode 100755 index 00000000..fa366a17 Binary files /dev/null and b/public/desktop_themes/chris/images/d_education.png differ diff --git a/public/desktop_themes/chris/images/d_experience.png b/public/desktop_themes/chris/images/d_experience.png new file mode 100644 index 00000000..f182981b Binary files /dev/null and b/public/desktop_themes/chris/images/d_experience.png differ diff --git a/public/desktop_themes/chris/images/d_files.png b/public/desktop_themes/chris/images/d_files.png new file mode 100644 index 00000000..99299d80 Binary files /dev/null and b/public/desktop_themes/chris/images/d_files.png differ diff --git a/public/desktop_themes/chris/images/d_home.png b/public/desktop_themes/chris/images/d_home.png new file mode 100644 index 00000000..67f4a227 Binary files /dev/null and b/public/desktop_themes/chris/images/d_home.png differ diff --git a/public/desktop_themes/chris/images/d_homework.png b/public/desktop_themes/chris/images/d_homework.png new file mode 100644 index 00000000..28f1b266 Binary files /dev/null and b/public/desktop_themes/chris/images/d_homework.png differ diff --git a/public/desktop_themes/chris/images/d_honors.png b/public/desktop_themes/chris/images/d_honors.png new file mode 100755 index 00000000..778cfa84 Binary files /dev/null and b/public/desktop_themes/chris/images/d_honors.png differ diff --git a/public/desktop_themes/chris/images/d_journal_p.png b/public/desktop_themes/chris/images/d_journal_p.png new file mode 100644 index 00000000..5f0e2757 Binary files /dev/null and b/public/desktop_themes/chris/images/d_journal_p.png differ diff --git a/public/desktop_themes/chris/images/d_labs.png b/public/desktop_themes/chris/images/d_labs.png new file mode 100644 index 00000000..fcb929e6 Binary files /dev/null and b/public/desktop_themes/chris/images/d_labs.png differ diff --git a/public/desktop_themes/chris/images/d_landt.png b/public/desktop_themes/chris/images/d_landt.png new file mode 100644 index 00000000..c003ec8d Binary files /dev/null and b/public/desktop_themes/chris/images/d_landt.png differ diff --git a/public/desktop_themes/chris/images/d_mypage.png b/public/desktop_themes/chris/images/d_mypage.png new file mode 100644 index 00000000..9d466a95 Binary files /dev/null and b/public/desktop_themes/chris/images/d_mypage.png differ diff --git a/public/desktop_themes/chris/images/d_orbit.png b/public/desktop_themes/chris/images/d_orbit.png new file mode 100755 index 00000000..e5852979 Binary files /dev/null and b/public/desktop_themes/chris/images/d_orbit.png differ diff --git a/public/desktop_themes/chris/images/d_patents.png b/public/desktop_themes/chris/images/d_patents.png new file mode 100644 index 00000000..5b08a529 Binary files /dev/null and b/public/desktop_themes/chris/images/d_patents.png differ diff --git a/public/desktop_themes/chris/images/d_personal.png b/public/desktop_themes/chris/images/d_personal.png new file mode 100644 index 00000000..a0a2140b Binary files /dev/null and b/public/desktop_themes/chris/images/d_personal.png differ diff --git a/public/desktop_themes/chris/images/d_publication.png b/public/desktop_themes/chris/images/d_publication.png new file mode 100644 index 00000000..a3220b86 Binary files /dev/null and b/public/desktop_themes/chris/images/d_publication.png differ diff --git a/public/desktop_themes/chris/images/d_research.png b/public/desktop_themes/chris/images/d_research.png new file mode 100644 index 00000000..691ebe25 Binary files /dev/null and b/public/desktop_themes/chris/images/d_research.png differ diff --git a/public/desktop_themes/chris/images/d_research_d.png b/public/desktop_themes/chris/images/d_research_d.png new file mode 100644 index 00000000..4301e573 Binary files /dev/null and b/public/desktop_themes/chris/images/d_research_d.png differ diff --git a/public/desktop_themes/chris/images/d_research_p.png b/public/desktop_themes/chris/images/d_research_p.png new file mode 100644 index 00000000..d3ba06cd Binary files /dev/null and b/public/desktop_themes/chris/images/d_research_p.png differ diff --git a/public/desktop_themes/chris/images/d_sections.png b/public/desktop_themes/chris/images/d_sections.png new file mode 100644 index 00000000..6832e3d0 Binary files /dev/null and b/public/desktop_themes/chris/images/d_sections.png differ diff --git a/public/desktop_themes/chris/images/d_seminar_p.png b/public/desktop_themes/chris/images/d_seminar_p.png new file mode 100644 index 00000000..36cfb59a Binary files /dev/null and b/public/desktop_themes/chris/images/d_seminar_p.png differ diff --git a/public/desktop_themes/chris/images/d_settings.png b/public/desktop_themes/chris/images/d_settings.png new file mode 100644 index 00000000..0ca9b18d Binary files /dev/null and b/public/desktop_themes/chris/images/d_settings.png differ diff --git a/public/desktop_themes/chris/images/d_working.png b/public/desktop_themes/chris/images/d_working.png new file mode 100644 index 00000000..9bc38981 Binary files /dev/null and b/public/desktop_themes/chris/images/d_working.png differ diff --git a/public/desktop_themes/chris/settings/chris.json b/public/desktop_themes/chris/settings/chris.json index 0451815a..64701e64 100755 --- a/public/desktop_themes/chris/settings/chris.json +++ b/public/desktop_themes/chris/settings/chris.json @@ -1 +1,39 @@ -{"css":"default.css","background":"chris.jpeg","tilecolor":["thmc1","thmc2"],"icons":{"home":"home.png","app_manager":"apps.png","sections":"sections.png"}} \ No newline at end of file +{ + "css":"default.css", + "background":"background.jpg", + "tilecolor":["thmc1","thmc2"], + "icons":{ + "home":"d_home.png", + "app_manager":"d_app_manager.png", + "sections":"d_sections.png", + "settings":"d_settings.png", + "publication":"d_publication.png", + "journal_p":"d_journal_p.png", + "seminar_p":"d_seminar_p.png", + "books":"d_books.png", + "research":"d_research.png", + "research_d":"d_research_d.png", + "research_p":"d_research_p.png", + "patents":"d_patents.png", + "labs":"d_labs.png", + "experience":"d_experience.png", + "working":"d_working.png", + "education":"d_education.png", + "honors":"d_honors.png", + "activities":"d_activities.png", + "clubs":"d_clubs.png", + "landt":"d_landt.png", + "courses":"d_courses.png", + "homework":"d_homework.png", + "certification":"d_certification.png", + "personal":"d_personal.png", + "mypage":"d_mypage.png", + "blog":"d_blog.png", + "album":"d_album.png", + "calendar":"d_calendar.png", + "files":"d_files.png", + "orbit":"d_orbit.png", + "connection":"d_connection.png", + "appstore":"d_appstore.png" + } + } \ No newline at end of file diff --git a/public/desktop_themes/sexy/css/sexy.css b/public/desktop_themes/sexy/css/default.css similarity index 100% rename from public/desktop_themes/sexy/css/sexy.css rename to public/desktop_themes/sexy/css/default.css diff --git a/public/desktop_themes/sexy/images/d_activities.png b/public/desktop_themes/sexy/images/d_activities.png new file mode 100644 index 00000000..b481e676 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_activities.png differ diff --git a/public/desktop_themes/sexy/images/d_album.png b/public/desktop_themes/sexy/images/d_album.png new file mode 100644 index 00000000..6f0e4a17 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_album.png differ diff --git a/public/desktop_themes/sexy/images/d_app_manager.png b/public/desktop_themes/sexy/images/d_app_manager.png new file mode 100644 index 00000000..da09e5a4 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_app_manager.png differ diff --git a/public/desktop_themes/sexy/images/d_appstore.png b/public/desktop_themes/sexy/images/d_appstore.png new file mode 100644 index 00000000..e82e745d Binary files /dev/null and b/public/desktop_themes/sexy/images/d_appstore.png differ diff --git a/public/desktop_themes/sexy/images/d_blog.png b/public/desktop_themes/sexy/images/d_blog.png new file mode 100644 index 00000000..0bb55251 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_blog.png differ diff --git a/public/desktop_themes/sexy/images/d_books.png b/public/desktop_themes/sexy/images/d_books.png new file mode 100644 index 00000000..49ec0fba Binary files /dev/null and b/public/desktop_themes/sexy/images/d_books.png differ diff --git a/public/desktop_themes/sexy/images/d_calendar.png b/public/desktop_themes/sexy/images/d_calendar.png new file mode 100644 index 00000000..26520f73 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_calendar.png differ diff --git a/public/desktop_themes/sexy/images/d_certification.png b/public/desktop_themes/sexy/images/d_certification.png new file mode 100644 index 00000000..a695edce Binary files /dev/null and b/public/desktop_themes/sexy/images/d_certification.png differ diff --git a/public/desktop_themes/sexy/images/d_clubs.png b/public/desktop_themes/sexy/images/d_clubs.png new file mode 100644 index 00000000..f22aa6dd Binary files /dev/null and b/public/desktop_themes/sexy/images/d_clubs.png differ diff --git a/public/desktop_themes/sexy/images/d_connection.png b/public/desktop_themes/sexy/images/d_connection.png new file mode 100644 index 00000000..ac6978eb Binary files /dev/null and b/public/desktop_themes/sexy/images/d_connection.png differ diff --git a/public/desktop_themes/sexy/images/d_courses.png b/public/desktop_themes/sexy/images/d_courses.png new file mode 100644 index 00000000..3d521ddf Binary files /dev/null and b/public/desktop_themes/sexy/images/d_courses.png differ diff --git a/public/desktop_themes/sexy/images/d_education.png b/public/desktop_themes/sexy/images/d_education.png new file mode 100755 index 00000000..fa366a17 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_education.png differ diff --git a/public/desktop_themes/sexy/images/d_experience.png b/public/desktop_themes/sexy/images/d_experience.png new file mode 100644 index 00000000..f182981b Binary files /dev/null and b/public/desktop_themes/sexy/images/d_experience.png differ diff --git a/public/desktop_themes/sexy/images/d_files.png b/public/desktop_themes/sexy/images/d_files.png new file mode 100644 index 00000000..99299d80 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_files.png differ diff --git a/public/desktop_themes/sexy/images/d_home.png b/public/desktop_themes/sexy/images/d_home.png new file mode 100644 index 00000000..67f4a227 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_home.png differ diff --git a/public/desktop_themes/sexy/images/d_homework.png b/public/desktop_themes/sexy/images/d_homework.png new file mode 100644 index 00000000..28f1b266 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_homework.png differ diff --git a/public/desktop_themes/sexy/images/d_honors.png b/public/desktop_themes/sexy/images/d_honors.png new file mode 100755 index 00000000..778cfa84 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_honors.png differ diff --git a/public/desktop_themes/sexy/images/d_journal_p.png b/public/desktop_themes/sexy/images/d_journal_p.png new file mode 100644 index 00000000..5f0e2757 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_journal_p.png differ diff --git a/public/desktop_themes/sexy/images/d_labs.png b/public/desktop_themes/sexy/images/d_labs.png new file mode 100644 index 00000000..fcb929e6 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_labs.png differ diff --git a/public/desktop_themes/sexy/images/d_landt.png b/public/desktop_themes/sexy/images/d_landt.png new file mode 100644 index 00000000..c003ec8d Binary files /dev/null and b/public/desktop_themes/sexy/images/d_landt.png differ diff --git a/public/desktop_themes/sexy/images/d_mypage.png b/public/desktop_themes/sexy/images/d_mypage.png new file mode 100644 index 00000000..9d466a95 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_mypage.png differ diff --git a/public/desktop_themes/sexy/images/d_orbit.png b/public/desktop_themes/sexy/images/d_orbit.png new file mode 100755 index 00000000..e5852979 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_orbit.png differ diff --git a/public/desktop_themes/sexy/images/d_patents.png b/public/desktop_themes/sexy/images/d_patents.png new file mode 100644 index 00000000..5b08a529 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_patents.png differ diff --git a/public/desktop_themes/sexy/images/d_personal.png b/public/desktop_themes/sexy/images/d_personal.png new file mode 100644 index 00000000..a0a2140b Binary files /dev/null and b/public/desktop_themes/sexy/images/d_personal.png differ diff --git a/public/desktop_themes/sexy/images/d_publication.png b/public/desktop_themes/sexy/images/d_publication.png new file mode 100644 index 00000000..a3220b86 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_publication.png differ diff --git a/public/desktop_themes/sexy/images/d_research.png b/public/desktop_themes/sexy/images/d_research.png new file mode 100644 index 00000000..691ebe25 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_research.png differ diff --git a/public/desktop_themes/sexy/images/d_research_d.png b/public/desktop_themes/sexy/images/d_research_d.png new file mode 100644 index 00000000..4301e573 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_research_d.png differ diff --git a/public/desktop_themes/sexy/images/d_research_p.png b/public/desktop_themes/sexy/images/d_research_p.png new file mode 100644 index 00000000..d3ba06cd Binary files /dev/null and b/public/desktop_themes/sexy/images/d_research_p.png differ diff --git a/public/desktop_themes/sexy/images/d_sections.png b/public/desktop_themes/sexy/images/d_sections.png new file mode 100644 index 00000000..6832e3d0 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_sections.png differ diff --git a/public/desktop_themes/sexy/images/d_seminar_p.png b/public/desktop_themes/sexy/images/d_seminar_p.png new file mode 100644 index 00000000..36cfb59a Binary files /dev/null and b/public/desktop_themes/sexy/images/d_seminar_p.png differ diff --git a/public/desktop_themes/sexy/images/d_settings.png b/public/desktop_themes/sexy/images/d_settings.png new file mode 100644 index 00000000..0ca9b18d Binary files /dev/null and b/public/desktop_themes/sexy/images/d_settings.png differ diff --git a/public/desktop_themes/sexy/images/d_working.png b/public/desktop_themes/sexy/images/d_working.png new file mode 100644 index 00000000..9bc38981 Binary files /dev/null and b/public/desktop_themes/sexy/images/d_working.png differ diff --git a/public/desktop_themes/sexy/settings/sexy.json b/public/desktop_themes/sexy/settings/sexy.json index 0282bc55..64701e64 100755 --- a/public/desktop_themes/sexy/settings/sexy.json +++ b/public/desktop_themes/sexy/settings/sexy.json @@ -1 +1,39 @@ -{"css":"sexy.css","background":"background.jpg","tilecolor":["thmc1","thmc2"],"icons":{"home":"home.png","app_manager":"apps.png","sections":"sections.png"}} \ No newline at end of file +{ + "css":"default.css", + "background":"background.jpg", + "tilecolor":["thmc1","thmc2"], + "icons":{ + "home":"d_home.png", + "app_manager":"d_app_manager.png", + "sections":"d_sections.png", + "settings":"d_settings.png", + "publication":"d_publication.png", + "journal_p":"d_journal_p.png", + "seminar_p":"d_seminar_p.png", + "books":"d_books.png", + "research":"d_research.png", + "research_d":"d_research_d.png", + "research_p":"d_research_p.png", + "patents":"d_patents.png", + "labs":"d_labs.png", + "experience":"d_experience.png", + "working":"d_working.png", + "education":"d_education.png", + "honors":"d_honors.png", + "activities":"d_activities.png", + "clubs":"d_clubs.png", + "landt":"d_landt.png", + "courses":"d_courses.png", + "homework":"d_homework.png", + "certification":"d_certification.png", + "personal":"d_personal.png", + "mypage":"d_mypage.png", + "blog":"d_blog.png", + "album":"d_album.png", + "calendar":"d_calendar.png", + "files":"d_files.png", + "orbit":"d_orbit.png", + "connection":"d_connection.png", + "appstore":"d_appstore.png" + } + } \ No newline at end of file diff --git a/public/desktop_themes/snake/css/snake.css b/public/desktop_themes/snake/css/default.css similarity index 100% rename from public/desktop_themes/snake/css/snake.css rename to public/desktop_themes/snake/css/default.css diff --git a/public/desktop_themes/snake/images/d_activities.png b/public/desktop_themes/snake/images/d_activities.png new file mode 100644 index 00000000..b481e676 Binary files /dev/null and b/public/desktop_themes/snake/images/d_activities.png differ diff --git a/public/desktop_themes/snake/images/d_album.png b/public/desktop_themes/snake/images/d_album.png new file mode 100644 index 00000000..6f0e4a17 Binary files /dev/null and b/public/desktop_themes/snake/images/d_album.png differ diff --git a/public/desktop_themes/snake/images/d_app_manager.png b/public/desktop_themes/snake/images/d_app_manager.png new file mode 100644 index 00000000..da09e5a4 Binary files /dev/null and b/public/desktop_themes/snake/images/d_app_manager.png differ diff --git a/public/desktop_themes/snake/images/d_appstore.png b/public/desktop_themes/snake/images/d_appstore.png new file mode 100644 index 00000000..e82e745d Binary files /dev/null and b/public/desktop_themes/snake/images/d_appstore.png differ diff --git a/public/desktop_themes/snake/images/d_blog.png b/public/desktop_themes/snake/images/d_blog.png new file mode 100644 index 00000000..0bb55251 Binary files /dev/null and b/public/desktop_themes/snake/images/d_blog.png differ diff --git a/public/desktop_themes/snake/images/d_books.png b/public/desktop_themes/snake/images/d_books.png new file mode 100644 index 00000000..49ec0fba Binary files /dev/null and b/public/desktop_themes/snake/images/d_books.png differ diff --git a/public/desktop_themes/snake/images/d_calendar.png b/public/desktop_themes/snake/images/d_calendar.png new file mode 100644 index 00000000..26520f73 Binary files /dev/null and b/public/desktop_themes/snake/images/d_calendar.png differ diff --git a/public/desktop_themes/snake/images/d_certification.png b/public/desktop_themes/snake/images/d_certification.png new file mode 100644 index 00000000..a695edce Binary files /dev/null and b/public/desktop_themes/snake/images/d_certification.png differ diff --git a/public/desktop_themes/snake/images/d_clubs.png b/public/desktop_themes/snake/images/d_clubs.png new file mode 100644 index 00000000..f22aa6dd Binary files /dev/null and b/public/desktop_themes/snake/images/d_clubs.png differ diff --git a/public/desktop_themes/snake/images/d_connection.png b/public/desktop_themes/snake/images/d_connection.png new file mode 100644 index 00000000..ac6978eb Binary files /dev/null and b/public/desktop_themes/snake/images/d_connection.png differ diff --git a/public/desktop_themes/snake/images/d_courses.png b/public/desktop_themes/snake/images/d_courses.png new file mode 100644 index 00000000..3d521ddf Binary files /dev/null and b/public/desktop_themes/snake/images/d_courses.png differ diff --git a/public/desktop_themes/snake/images/d_education.png b/public/desktop_themes/snake/images/d_education.png new file mode 100755 index 00000000..fa366a17 Binary files /dev/null and b/public/desktop_themes/snake/images/d_education.png differ diff --git a/public/desktop_themes/snake/images/d_experience.png b/public/desktop_themes/snake/images/d_experience.png new file mode 100644 index 00000000..f182981b Binary files /dev/null and b/public/desktop_themes/snake/images/d_experience.png differ diff --git a/public/desktop_themes/snake/images/d_files.png b/public/desktop_themes/snake/images/d_files.png new file mode 100644 index 00000000..99299d80 Binary files /dev/null and b/public/desktop_themes/snake/images/d_files.png differ diff --git a/public/desktop_themes/snake/images/d_home.png b/public/desktop_themes/snake/images/d_home.png new file mode 100644 index 00000000..67f4a227 Binary files /dev/null and b/public/desktop_themes/snake/images/d_home.png differ diff --git a/public/desktop_themes/snake/images/d_homework.png b/public/desktop_themes/snake/images/d_homework.png new file mode 100644 index 00000000..28f1b266 Binary files /dev/null and b/public/desktop_themes/snake/images/d_homework.png differ diff --git a/public/desktop_themes/snake/images/d_honors.png b/public/desktop_themes/snake/images/d_honors.png new file mode 100755 index 00000000..778cfa84 Binary files /dev/null and b/public/desktop_themes/snake/images/d_honors.png differ diff --git a/public/desktop_themes/snake/images/d_journal_p.png b/public/desktop_themes/snake/images/d_journal_p.png new file mode 100644 index 00000000..5f0e2757 Binary files /dev/null and b/public/desktop_themes/snake/images/d_journal_p.png differ diff --git a/public/desktop_themes/snake/images/d_labs.png b/public/desktop_themes/snake/images/d_labs.png new file mode 100644 index 00000000..fcb929e6 Binary files /dev/null and b/public/desktop_themes/snake/images/d_labs.png differ diff --git a/public/desktop_themes/snake/images/d_landt.png b/public/desktop_themes/snake/images/d_landt.png new file mode 100644 index 00000000..c003ec8d Binary files /dev/null and b/public/desktop_themes/snake/images/d_landt.png differ diff --git a/public/desktop_themes/snake/images/d_mypage.png b/public/desktop_themes/snake/images/d_mypage.png new file mode 100644 index 00000000..9d466a95 Binary files /dev/null and b/public/desktop_themes/snake/images/d_mypage.png differ diff --git a/public/desktop_themes/snake/images/d_orbit.png b/public/desktop_themes/snake/images/d_orbit.png new file mode 100755 index 00000000..e5852979 Binary files /dev/null and b/public/desktop_themes/snake/images/d_orbit.png differ diff --git a/public/desktop_themes/snake/images/d_patents.png b/public/desktop_themes/snake/images/d_patents.png new file mode 100644 index 00000000..5b08a529 Binary files /dev/null and b/public/desktop_themes/snake/images/d_patents.png differ diff --git a/public/desktop_themes/snake/images/d_personal.png b/public/desktop_themes/snake/images/d_personal.png new file mode 100644 index 00000000..a0a2140b Binary files /dev/null and b/public/desktop_themes/snake/images/d_personal.png differ diff --git a/public/desktop_themes/snake/images/d_publication.png b/public/desktop_themes/snake/images/d_publication.png new file mode 100644 index 00000000..a3220b86 Binary files /dev/null and b/public/desktop_themes/snake/images/d_publication.png differ diff --git a/public/desktop_themes/snake/images/d_research.png b/public/desktop_themes/snake/images/d_research.png new file mode 100644 index 00000000..691ebe25 Binary files /dev/null and b/public/desktop_themes/snake/images/d_research.png differ diff --git a/public/desktop_themes/snake/images/d_research_d.png b/public/desktop_themes/snake/images/d_research_d.png new file mode 100644 index 00000000..4301e573 Binary files /dev/null and b/public/desktop_themes/snake/images/d_research_d.png differ diff --git a/public/desktop_themes/snake/images/d_research_p.png b/public/desktop_themes/snake/images/d_research_p.png new file mode 100644 index 00000000..d3ba06cd Binary files /dev/null and b/public/desktop_themes/snake/images/d_research_p.png differ diff --git a/public/desktop_themes/snake/images/d_sections.png b/public/desktop_themes/snake/images/d_sections.png new file mode 100644 index 00000000..6832e3d0 Binary files /dev/null and b/public/desktop_themes/snake/images/d_sections.png differ diff --git a/public/desktop_themes/snake/images/d_seminar_p.png b/public/desktop_themes/snake/images/d_seminar_p.png new file mode 100644 index 00000000..36cfb59a Binary files /dev/null and b/public/desktop_themes/snake/images/d_seminar_p.png differ diff --git a/public/desktop_themes/snake/images/d_settings.png b/public/desktop_themes/snake/images/d_settings.png new file mode 100644 index 00000000..0ca9b18d Binary files /dev/null and b/public/desktop_themes/snake/images/d_settings.png differ diff --git a/public/desktop_themes/snake/images/d_working.png b/public/desktop_themes/snake/images/d_working.png new file mode 100644 index 00000000..9bc38981 Binary files /dev/null and b/public/desktop_themes/snake/images/d_working.png differ diff --git a/public/desktop_themes/snake/settings/snake.json b/public/desktop_themes/snake/settings/snake.json index c0266235..64701e64 100755 --- a/public/desktop_themes/snake/settings/snake.json +++ b/public/desktop_themes/snake/settings/snake.json @@ -1 +1,39 @@ -{"css":"snake.css","background":"background.jpg","tilecolor":["thmc1","thmc2"],"icons":{"home":"home.png","app_manager":"apps.png","sections":"sections.png"}} \ No newline at end of file +{ + "css":"default.css", + "background":"background.jpg", + "tilecolor":["thmc1","thmc2"], + "icons":{ + "home":"d_home.png", + "app_manager":"d_app_manager.png", + "sections":"d_sections.png", + "settings":"d_settings.png", + "publication":"d_publication.png", + "journal_p":"d_journal_p.png", + "seminar_p":"d_seminar_p.png", + "books":"d_books.png", + "research":"d_research.png", + "research_d":"d_research_d.png", + "research_p":"d_research_p.png", + "patents":"d_patents.png", + "labs":"d_labs.png", + "experience":"d_experience.png", + "working":"d_working.png", + "education":"d_education.png", + "honors":"d_honors.png", + "activities":"d_activities.png", + "clubs":"d_clubs.png", + "landt":"d_landt.png", + "courses":"d_courses.png", + "homework":"d_homework.png", + "certification":"d_certification.png", + "personal":"d_personal.png", + "mypage":"d_mypage.png", + "blog":"d_blog.png", + "album":"d_album.png", + "calendar":"d_calendar.png", + "files":"d_files.png", + "orbit":"d_orbit.png", + "connection":"d_connection.png", + "appstore":"d_appstore.png" + } + } \ No newline at end of file diff --git a/public/desktop_themes/vintage/images/d_activities.png b/public/desktop_themes/vintage/images/d_activities.png new file mode 100644 index 00000000..b481e676 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_activities.png differ diff --git a/public/desktop_themes/vintage/images/d_album.png b/public/desktop_themes/vintage/images/d_album.png new file mode 100644 index 00000000..6f0e4a17 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_album.png differ diff --git a/public/desktop_themes/vintage/images/d_app_manager.png b/public/desktop_themes/vintage/images/d_app_manager.png new file mode 100644 index 00000000..da09e5a4 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_app_manager.png differ diff --git a/public/desktop_themes/vintage/images/d_appstore.png b/public/desktop_themes/vintage/images/d_appstore.png new file mode 100644 index 00000000..e82e745d Binary files /dev/null and b/public/desktop_themes/vintage/images/d_appstore.png differ diff --git a/public/desktop_themes/vintage/images/d_blog.png b/public/desktop_themes/vintage/images/d_blog.png new file mode 100644 index 00000000..0bb55251 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_blog.png differ diff --git a/public/desktop_themes/vintage/images/d_books.png b/public/desktop_themes/vintage/images/d_books.png new file mode 100644 index 00000000..49ec0fba Binary files /dev/null and b/public/desktop_themes/vintage/images/d_books.png differ diff --git a/public/desktop_themes/vintage/images/d_calendar.png b/public/desktop_themes/vintage/images/d_calendar.png new file mode 100644 index 00000000..26520f73 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_calendar.png differ diff --git a/public/desktop_themes/vintage/images/d_certification.png b/public/desktop_themes/vintage/images/d_certification.png new file mode 100644 index 00000000..a695edce Binary files /dev/null and b/public/desktop_themes/vintage/images/d_certification.png differ diff --git a/public/desktop_themes/vintage/images/d_clubs.png b/public/desktop_themes/vintage/images/d_clubs.png new file mode 100644 index 00000000..f22aa6dd Binary files /dev/null and b/public/desktop_themes/vintage/images/d_clubs.png differ diff --git a/public/desktop_themes/vintage/images/d_connection.png b/public/desktop_themes/vintage/images/d_connection.png new file mode 100644 index 00000000..ac6978eb Binary files /dev/null and b/public/desktop_themes/vintage/images/d_connection.png differ diff --git a/public/desktop_themes/vintage/images/d_courses.png b/public/desktop_themes/vintage/images/d_courses.png new file mode 100644 index 00000000..3d521ddf Binary files /dev/null and b/public/desktop_themes/vintage/images/d_courses.png differ diff --git a/public/desktop_themes/vintage/images/d_education.png b/public/desktop_themes/vintage/images/d_education.png new file mode 100755 index 00000000..fa366a17 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_education.png differ diff --git a/public/desktop_themes/vintage/images/d_experience.png b/public/desktop_themes/vintage/images/d_experience.png new file mode 100644 index 00000000..f182981b Binary files /dev/null and b/public/desktop_themes/vintage/images/d_experience.png differ diff --git a/public/desktop_themes/vintage/images/d_files.png b/public/desktop_themes/vintage/images/d_files.png new file mode 100644 index 00000000..99299d80 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_files.png differ diff --git a/public/desktop_themes/vintage/images/d_home.png b/public/desktop_themes/vintage/images/d_home.png new file mode 100644 index 00000000..67f4a227 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_home.png differ diff --git a/public/desktop_themes/vintage/images/d_homework.png b/public/desktop_themes/vintage/images/d_homework.png new file mode 100644 index 00000000..28f1b266 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_homework.png differ diff --git a/public/desktop_themes/vintage/images/d_honors.png b/public/desktop_themes/vintage/images/d_honors.png new file mode 100755 index 00000000..778cfa84 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_honors.png differ diff --git a/public/desktop_themes/vintage/images/d_journal_p.png b/public/desktop_themes/vintage/images/d_journal_p.png new file mode 100644 index 00000000..5f0e2757 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_journal_p.png differ diff --git a/public/desktop_themes/vintage/images/d_labs.png b/public/desktop_themes/vintage/images/d_labs.png new file mode 100644 index 00000000..fcb929e6 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_labs.png differ diff --git a/public/desktop_themes/vintage/images/d_landt.png b/public/desktop_themes/vintage/images/d_landt.png new file mode 100644 index 00000000..c003ec8d Binary files /dev/null and b/public/desktop_themes/vintage/images/d_landt.png differ diff --git a/public/desktop_themes/vintage/images/d_mypage.png b/public/desktop_themes/vintage/images/d_mypage.png new file mode 100644 index 00000000..9d466a95 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_mypage.png differ diff --git a/public/desktop_themes/vintage/images/d_orbit.png b/public/desktop_themes/vintage/images/d_orbit.png new file mode 100755 index 00000000..e5852979 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_orbit.png differ diff --git a/public/desktop_themes/vintage/images/d_patents.png b/public/desktop_themes/vintage/images/d_patents.png new file mode 100644 index 00000000..5b08a529 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_patents.png differ diff --git a/public/desktop_themes/vintage/images/d_personal.png b/public/desktop_themes/vintage/images/d_personal.png new file mode 100644 index 00000000..a0a2140b Binary files /dev/null and b/public/desktop_themes/vintage/images/d_personal.png differ diff --git a/public/desktop_themes/vintage/images/d_publication.png b/public/desktop_themes/vintage/images/d_publication.png new file mode 100644 index 00000000..a3220b86 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_publication.png differ diff --git a/public/desktop_themes/vintage/images/d_research.png b/public/desktop_themes/vintage/images/d_research.png new file mode 100644 index 00000000..691ebe25 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_research.png differ diff --git a/public/desktop_themes/vintage/images/d_research_d.png b/public/desktop_themes/vintage/images/d_research_d.png new file mode 100644 index 00000000..4301e573 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_research_d.png differ diff --git a/public/desktop_themes/vintage/images/d_research_p.png b/public/desktop_themes/vintage/images/d_research_p.png new file mode 100644 index 00000000..d3ba06cd Binary files /dev/null and b/public/desktop_themes/vintage/images/d_research_p.png differ diff --git a/public/desktop_themes/vintage/images/d_sections.png b/public/desktop_themes/vintage/images/d_sections.png new file mode 100644 index 00000000..6832e3d0 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_sections.png differ diff --git a/public/desktop_themes/vintage/images/d_seminar_p.png b/public/desktop_themes/vintage/images/d_seminar_p.png new file mode 100644 index 00000000..36cfb59a Binary files /dev/null and b/public/desktop_themes/vintage/images/d_seminar_p.png differ diff --git a/public/desktop_themes/vintage/images/d_settings.png b/public/desktop_themes/vintage/images/d_settings.png new file mode 100644 index 00000000..0ca9b18d Binary files /dev/null and b/public/desktop_themes/vintage/images/d_settings.png differ diff --git a/public/desktop_themes/vintage/images/d_working.png b/public/desktop_themes/vintage/images/d_working.png new file mode 100644 index 00000000..9bc38981 Binary files /dev/null and b/public/desktop_themes/vintage/images/d_working.png differ diff --git a/public/desktop_themes/vintage/settings/vintage.json b/public/desktop_themes/vintage/settings/vintage.json old mode 100644 new mode 100755 index 0d1fb48e..64701e64 --- a/public/desktop_themes/vintage/settings/vintage.json +++ b/public/desktop_themes/vintage/settings/vintage.json @@ -1 +1,39 @@ -{"css":"default.css","background":"background.jpg","tilecolor":["thmc1","thmc2"],"icons":{"home":"Home-icon.png","app_manager":"apps.png","sections":"sections.png"}} \ No newline at end of file +{ + "css":"default.css", + "background":"background.jpg", + "tilecolor":["thmc1","thmc2"], + "icons":{ + "home":"d_home.png", + "app_manager":"d_app_manager.png", + "sections":"d_sections.png", + "settings":"d_settings.png", + "publication":"d_publication.png", + "journal_p":"d_journal_p.png", + "seminar_p":"d_seminar_p.png", + "books":"d_books.png", + "research":"d_research.png", + "research_d":"d_research_d.png", + "research_p":"d_research_p.png", + "patents":"d_patents.png", + "labs":"d_labs.png", + "experience":"d_experience.png", + "working":"d_working.png", + "education":"d_education.png", + "honors":"d_honors.png", + "activities":"d_activities.png", + "clubs":"d_clubs.png", + "landt":"d_landt.png", + "courses":"d_courses.png", + "homework":"d_homework.png", + "certification":"d_certification.png", + "personal":"d_personal.png", + "mypage":"d_mypage.png", + "blog":"d_blog.png", + "album":"d_album.png", + "calendar":"d_calendar.png", + "files":"d_files.png", + "orbit":"d_orbit.png", + "connection":"d_connection.png", + "appstore":"d_appstore.png" + } + } \ No newline at end of file diff --git a/public/desktop_widgets/clock/bg_blue.png b/public/desktop_widgets/clock/bg_blue.png new file mode 100755 index 00000000..ea275d1b Binary files /dev/null and b/public/desktop_widgets/clock/bg_blue.png differ diff --git a/public/desktop_widgets/clock/bg_green.png b/public/desktop_widgets/clock/bg_green.png new file mode 100755 index 00000000..393618c2 Binary files /dev/null and b/public/desktop_widgets/clock/bg_green.png differ diff --git a/public/desktop_widgets/clock/bg_orange.png b/public/desktop_widgets/clock/bg_orange.png new file mode 100755 index 00000000..84d32207 Binary files /dev/null and b/public/desktop_widgets/clock/bg_orange.png differ diff --git a/public/desktop_widgets/clock/clock.css b/public/desktop_widgets/clock/clock.css new file mode 100755 index 00000000..7bba2ba0 --- /dev/null +++ b/public/desktop_widgets/clock/clock.css @@ -0,0 +1,69 @@ +.clock{ + /* The .clock div. Created dynamically by jQuery */ + background-color:#252525; + height:200px; + width:200px; + position:relative; + overflow:hidden; + float:left; +} + +.clock .rotate{ + /* There are two .rotate divs - one for each half of the background */ + position:absolute; + width:200px; + height:200px; + top:0; + left:0; +} + +.rotate.right{ + display:none; + z-index:11; +} + +.clock .bg, .clock .front{ + width:100px; + height:200px; + background-color:#252525; + position:absolute; + top:0; +} + +.clock .display{ + /* Holds the number of seconds, minutes or hours respectfully */ + position:absolute; + width:200px; + font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif; + z-index:20; + color:#F5F5F5; + font-size:60px; + text-align:center; + top:65px; + left:0; + + /* CSS3 text shadow: */ + text-shadow:4px 4px 5px #333333; +} + +/* The left part of the background: */ + +.clock .bg.left{ left:0; } + +/* Individual styles for each color: */ +.orange .bg.left{ background:url(bg_orange.png) no-repeat left top; } +.green .bg.left{ background:url(bg_green.png) no-repeat left top; } +.blue .bg.left{ background:url(bg_blue.png) no-repeat left top; } + +/* The right part of the background: */ +.clock .bg.right{ left:100px; } + +.orange .bg.right{ background:url(bg_orange.png) no-repeat right top; } +.green .bg.right{ background:url(bg_green.png) no-repeat right top; } +.blue .bg.right{ background:url(bg_blue.png) no-repeat right top; } + + +.clock .front.left{ + left:0; + z-index:10; +} diff --git a/public/desktop_widgets/clock/clock.js b/public/desktop_widgets/clock/clock.js new file mode 100755 index 00000000..d4237c01 --- /dev/null +++ b/public/desktop_widgets/clock/clock.js @@ -0,0 +1,171 @@ +/*! + * jquery.tzineClock.js - Tutorialzine Colorful Clock Plugin + * + * Copyright (c) 2009 Martin Angelov + * http://tutorialzine.com/ + * + * Licensed under MIT + * http://www.opensource.org/licenses/mit-license.php + * + * Launch : December 2009 + * Version : 1.0 + * Released: Monday 28th December, 2009 - 00:00 + */ + +(function($){ + + // A global array used by the functions of the plug-in: + var gVars = {}; + + // Extending the jQuery core: + $.fn.tzineClock = function(opts){ + + // "this" contains the elements that were selected when calling the plugin: $('elements').tzineClock(); + // If the selector returned more than one element, use the first one: + + var container = this.eq(0); + + if(!container) + { + try{ + console.log("Invalid selector!"); + } catch(e){} + + return false; + } + + if(!opts) opts = {}; + + var defaults = { + /* Additional options will be added in future versions of the plugin. */ + }; + + /* Merging the provided options with the default ones (will be used in future versions of the plugin): */ + $.each(defaults,function(k,v){ + opts[k] = opts[k] || defaults[k]; + }) + + // Calling the setUp function and passing the container, + // will be available to the setUp function as "this": + setUp.call(container); + + return this; + } + + function setUp() + { + // The colors of the dials: + var colors = ['orange','blue','green']; + + var tmp; + + for(var i=0;i<3;i++) + { + // Creating a new element and setting the color as a class name: + + tmp = $('
      ').attr('class',colors[i]+' clock').html( + '
      '+ + + '
      '+ + + '
      '+ + '
      '+ + '
      '+ + + '
      '+ + '
      '+ + '
      ' + ); + + // Appending to the container: + $(this).append(tmp); + + // Assigning some of the elements as variables for speed: + tmp.rotateLeft = tmp.find('.rotate.left'); + tmp.rotateRight = tmp.find('.rotate.right'); + tmp.display = tmp.find('.display'); + + // Adding the dial as a global variable. Will be available as gVars.colorName + gVars[colors[i]] = tmp; + } + + // Setting up a interval, executed every 1000 milliseconds: + setInterval(function(){ + + var currentTime = new Date(); + var h = currentTime.getHours(); + var m = currentTime.getMinutes(); + var s = currentTime.getSeconds(); + + animation(gVars.green, s, 60); + animation(gVars.blue, m, 60); + animation(gVars.orange, h, 24); + + },1000); + } + + function animation(clock, current, total) + { + // Calculating the current angle: + var angle = (360/total)*(current+1); + + var element; + + if(current==0) + { + // Hiding the right half of the background: + clock.rotateRight.hide(); + + // Resetting the rotation of the left part: + rotateElement(clock.rotateLeft,0); + } + + if(angle<=180) + { + // The left part is rotated, and the right is currently hidden: + element = clock.rotateLeft; + } + else + { + // The first part of the rotation has completed, so we start rotating the right part: + clock.rotateRight.show(); + clock.rotateLeft.show(); + + rotateElement(clock.rotateLeft,180); + + element = clock.rotateRight; + angle = angle-180; + } + + rotateElement(element,angle); + + // Setting the text inside of the display element, inserting a leading zero if needed: + clock.display.html(current<10?'0'+current:current); + } + + function rotateElement(element,angle) + { + // Rotating the element, depending on the browser: + var rotate = 'rotate('+angle+'deg)'; + + if(element.css('MozTransform')!=undefined) + element.css('MozTransform',rotate); + + else if(element.css('WebkitTransform')!=undefined) + element.css('WebkitTransform',rotate); + + // A version for internet explorer using filters, works but is a bit buggy (no surprise here): + else if(element.css("filter")!=undefined) + { + var cos = Math.cos(Math.PI * 2 / 360 * angle); + var sin = Math.sin(Math.PI * 2 / 360 * angle); + + element.css("filter","progid:DXImageTransform.Microsoft.Matrix(M11="+cos+",M12=-"+sin+",M21="+sin+",M22="+cos+",SizingMethod='auto expand',FilterType='nearest neighbor')"); + + element.css("left",-Math.floor((element.width()-200)/2)); + element.css("top",-Math.floor((element.height()-200)/2)); + } + + } + +})(jQuery) \ No newline at end of file diff --git a/public/desktop_widgets/clock/img/bg_blue.png b/public/desktop_widgets/clock/img/bg_blue.png new file mode 100644 index 00000000..7f53ed5c Binary files /dev/null and b/public/desktop_widgets/clock/img/bg_blue.png differ diff --git a/public/desktop_widgets/clock/img/bg_green.png b/public/desktop_widgets/clock/img/bg_green.png new file mode 100644 index 00000000..ce092cfc Binary files /dev/null and b/public/desktop_widgets/clock/img/bg_green.png differ diff --git a/public/desktop_widgets/clock/img/bg_orange.png b/public/desktop_widgets/clock/img/bg_orange.png new file mode 100644 index 00000000..f13fdc7c Binary files /dev/null and b/public/desktop_widgets/clock/img/bg_orange.png differ diff --git a/public/desktop_widgets/clock/index.html.erb b/public/desktop_widgets/clock/index.html.erb new file mode 100755 index 00000000..8fda567a --- /dev/null +++ b/public/desktop_widgets/clock/index.html.erb @@ -0,0 +1,76 @@ + +
      + \ No newline at end of file diff --git a/public/desktop_widgets/school_events/events.json b/public/desktop_widgets/school_events/events.json new file mode 100644 index 00000000..c4c6fd5e --- /dev/null +++ b/public/desktop_widgets/school_events/events.json @@ -0,0 +1 @@ +{"first":{"date":"25 Feb","event":"國立政治大學101學年度碩士班暨…","timing":"時間:07:00-17:00"},"second":{"date":"26 Feb","event":"國立政治大學101學年度碩士班暨…","timing":"時間:07:00-17:00"}} \ No newline at end of file diff --git a/public/desktop_widgets/school_events/index.html.erb b/public/desktop_widgets/school_events/index.html.erb new file mode 100644 index 00000000..e6ac921a --- /dev/null +++ b/public/desktop_widgets/school_events/index.html.erb @@ -0,0 +1,7 @@ +
      +


      +
      + + \ No newline at end of file diff --git a/public/desktop_widgets/school_events/school_events.js b/public/desktop_widgets/school_events/school_events.js new file mode 100644 index 00000000..78240c72 --- /dev/null +++ b/public/desktop_widgets/school_events/school_events.js @@ -0,0 +1,21 @@ +var eventsjson = new Array; +var loadEvents = function(){ + $.getJSON(o.widgetfolder+"/school_events/events.json",function(events){ + $.each(events,function(i,event){ + eventsjson.push(event); + }) + + displayevents(); + }) +} +var i = 0; +var displayevents = function(){ + $("#school_events").fadeOut(500); + $("span#date").text(eventsjson[i].date); + $("span#event").text(eventsjson[i].event); + $("span#timings").text(eventsjson[i].timing); + $("#school_events").fadeIn(500); + i++; + if(i==eventsjson.length)i=0; + setTimeout(displayevents,5000); +} \ No newline at end of file diff --git a/public/desktop_widgets/weather/img/clouds_180x150_bg.jpg b/public/desktop_widgets/weather/img/clouds_180x150_bg.jpg new file mode 100644 index 00000000..744cdaec Binary files /dev/null and b/public/desktop_widgets/weather/img/clouds_180x150_bg.jpg differ diff --git a/public/desktop_widgets/weather/index.html.erb b/public/desktop_widgets/weather/index.html.erb new file mode 100644 index 00000000..1dfa1849 --- /dev/null +++ b/public/desktop_widgets/weather/index.html.erb @@ -0,0 +1,6 @@ +
      \ No newline at end of file diff --git a/public/desktop_widgets/weather/weather.js b/public/desktop_widgets/weather/weather.js new file mode 100644 index 00000000..e69de29b diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb index 648c8d55..e8b899eb 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb @@ -8,19 +8,19 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController # @bulletins = Bulletin.desc("postdate desc") get_categorys(params[:bulletin_category_id]) get_tags - + # @bulletins = Bulletin.where("bulletin_category_id" => params[:bulletin_category_id]).desc("postdate") if params[:bulletin_category_id] # @bulletins = Bulletin.search(params[:search], params[:category_id]) # @bulletins = Bulletin.all.order_by([params[:sort], params[:direction]]) - @bulletins = params[:sort] ? get_sorted_bulletins : Bulletin.all.desc("postdate") + @bulletins = params[:sort] ? get_sorted_bulletins : Bulletin.all.page(params[:page]).per(10) @bulletin_categories = BulletinCategory.all - + @bulletin_link = BulletinLink.new - @link_url = panel_announcement_back_end_bulletins_path + @link_url = panel_announcement_back_end_bulletins_path @bulletin_file = BulletinFile.new - @file_url = panel_announcement_back_end_bulletins_path + @file_url = panel_announcement_back_end_bulletins_path respond_to do |format| format.html # index.html.erb @@ -299,7 +299,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController bulletins = Bulletin.all case params[:sort] when 'postdate', 'deadline' - bulletins.order_by([params[:sort], params[:direction]]) + bulletins.order_by([params[:sort], params[:direction]]).page(params[:page]).per(10) when 'category' category_ids = bulletins.distinct(:bulletin_category_id) categories = BulletinCategory.find(category_ids) rescue nil @@ -308,26 +308,29 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController categories.each { |category| h[category.i18n_variable[I18n.locale]] = category.id } sorted = params[:direction].eql?('asc') ? h.sort : h.sort.reverse! sorted_categorys = sorted.collect {|a| bulletins.where(:bulletin_category_id => a[1]).entries } - sorted_categorys.flatten + sorted_categorys.flatten! + Kaminari.paginate_array(sorted_categorys).page(params[:page]).per(10) else nil end when 'title' - h = Hash.new - bulletins.each { |bulletin| h[bulletin.title[I18n.locale]] = bulletin } + h = Array.new + bulletins.each { |bulletin| h << [bulletin.title[I18n.locale].downcase, bulletin] } sorted = params[:direction].eql?('asc') ? h.sort : h.sort.reverse! - sorted.collect {|a| a[1] } + sorted_titles = sorted.collect {|a| a[1] } + Kaminari.paginate_array(sorted_titles).page(params[:page]).per(10) when 'status' - bulletins.order_by(:is_top, params[:direction]).order_by(:is_hot, params[:direction]).order_by(:is_hidden, params[:direction]) + bulletins.order_by(:is_top, params[:direction]).order_by(:is_hot, params[:direction]).order_by(:is_hidden, params[:direction]).page(params[:page]).per(10) when 'update_user_id' user_ids = bulletins.distinct(:update_user_id) users = User.find(user_ids) rescue nil if users - h = Hash.new - users.each { |user| h[user.name] = user.id } + h = Array.new + users.each { |user| h << [user.name, user.id] } sorted = params[:direction].eql?('asc') ? h.sort : h.sort.reverse! sorted_users = sorted.collect {|a| bulletins.where(:update_user_id => a[1]).entries } - sorted_users.flatten + sorted_users.flatten! + Kaminari.paginate_array(sorted_users).page(params[:page]).per(10) else nil end @@ -335,7 +338,14 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController a = Array.new AnnouncementTag.all.order_by(I18n.locale, params[:direction]).each { |tag| a << tag.bulletins } a.flatten! - a.uniq + a.uniq! + tmp = Array.new + bulletins.where(:tag_ids => []).each { |bulletin| tmp << [bulletin.title[I18n.locale].downcase, bulletin] } + sorted = params[:direction].eql?('asc') ? tmp.sort : tmp.sort.reverse! + sorted_titles = sorted.collect {|a| a[1] } + a = params[:direction].eql?('asc') ? (sorted_titles + a) : (a + sorted_titles) + a.flatten! + Kaminari.paginate_array(a).page(params[:page]).per(10) end end diff --git a/vendor/built_in_modules/announcement/app/models/bulletin_file.rb b/vendor/built_in_modules/announcement/app/models/bulletin_file.rb index 05894515..c4d60b9b 100644 --- a/vendor/built_in_modules/announcement/app/models/bulletin_file.rb +++ b/vendor/built_in_modules/announcement/app/models/bulletin_file.rb @@ -16,6 +16,15 @@ class BulletinFile belongs_to :bulletin # embedded_in :bulletin + before_save :set_key + + def filetitle + @filetitle ||= I18nVariable.first(:conditions => {:key => 'filetitle', :language_value_id => self.id, :language_value_type => self.class}) rescue nil + end + + def description + @description ||= I18nVariable.first(:conditions => {:key => 'description', :language_value_id => self.id, :language_value_type => self.class}) rescue nil + end protected diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_categorys/_bulletin_category.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_categorys/_bulletin_category.html.erb index bf02b054..7f1b5626 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_categorys/_bulletin_category.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_categorys/_bulletin_category.html.erb @@ -5,7 +5,6 @@
      diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_categorys/quick_edit.js.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_categorys/quick_edit.js.erb deleted file mode 100644 index 7db1d0f8..00000000 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_categorys/quick_edit.js.erb +++ /dev/null @@ -1,3 +0,0 @@ -$.each($(".quick_edit"),function(obj){ $(this).remove(); }); -$("#<%= dom_id @bulletin_category %>").append("
      <%= j render "form" %>
      "); -//$("#form > form").replaceWith("<%= j render "form" %>"); diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletins.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletins.html.erb index 979f3f4a..81daae8b 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletins.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletins.html.erb @@ -1,39 +1,3 @@ - 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 09222a36..f8ea5418 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 @@ -1,4 +1,4 @@ -