Compare commits

..
99 Commits
Author SHA1 Message Date
Matt K. Fu 74f9dea6b9 Merge commit '20bdeb3c2d55f6c0404ae604108c4c23c3d4aa67' into development 2013-04-02 18:40:48 +08:00
Matt K. Fu 20bdeb3c2d fix widget and fronted setting interface. checked with Spen 2013-04-02 18:39:46 +08:00
Matt K. Fu 695d712843 Merge commit '8b44f930f38d70098da5793bd795400eb088a052' into development
Conflicts:
	app/assets/javascripts/orbitdesktop.js
2013-04-02 18:05:30 +08:00
harrybomrah 8b44f930f3 widget and gridster fixes 2013-04-01 18:00:47 +08:00
Matt K. Fu 3476237fa7 solved conflicts 2013-04-01 17:18:41 +08:00
chris bd3e9fe4f6 Fix js bug and asset url after merge 2013-03-29 17:50:21 +08:00
devin 4bb5e18f44 recover .gitignore file
Conflicts:
	.gitignore
2013-03-29 12:33:35 +08:00
harrybomrah 78205d8b00 features and widgets added
Conflicts:
	app/assets/javascripts/orbitdesktop.js
2013-03-29 12:04:21 +08:00
devin a62ff9308f Lots of Update
1. CSS to SCSS
2. Journal Paper update

Conflicts:
	Gemfile.lock
	app/assets/javascripts/orbitdesktop.js
	app/assets/stylesheets/desktop/desktop-main.css
	vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_author_relations/index.html.erb
	vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_co_authors/index.html.erb
	vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb
	vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/journal_type.html.erb
2013-03-29 12:03:15 +08:00
Matt K. Fu 474e8b9b57 fix for both part and page part settings
Conflicts:
	app/helpers/admin/page_parts_helper.rb
	app/views/admin/pages/reload_front_end_setting.js.erb
	app/views/admin/pages/reload_frontend_pages.js.erb
2013-03-29 11:12:52 +08:00
Spen a8f7422c25 faq app 2013-03-29 11:09:56 +08:00
Fu Matthew 9e02011956 deliver API 2013-03-29 11:08:22 +08:00
chris 3f0addf04d Fix bug in setup_app_frontend_and_style 2013-03-26 16:29:35 +08:00
chris 0a01faedc9 Fix merge error 2013-03-26 16:16:19 +08:00
chris 8e0331449f Merge branch 'patrial_Select_for_default_widget_style' of github.com:Rulingcom/orbit into patrial_Select_for_default_widget_style
Conflicts:
	app/controllers/admin/pages_controller.rb
	app/helpers/admin/page_parts_helper.rb
2013-03-21 18:51:16 +08:00
Fu Matthew 635d3f1690 add conditions for making multi cates and tags more stable 2013-03-21 18:49:53 +08:00
Fu Matthew 9e33bdadc3 now default options can be chosen by developer at init 2013-03-21 18:46:57 +08:00
Fu Matthew 54acaebc98 style for front end 2013-03-21 18:46:56 +08:00
Fu Matthew 7f7e21b4f2 1.make module app forbid unearthed access except from admin
2.override sidebar link when it's object_auth or app_auth.
2013-03-21 18:45:28 +08:00
Fu Matthew 8609c8dec0 put add admin pages using orbit back end controller 2013-03-21 18:45:27 +08:00
chris f3e40c1405 Merge branch 'desktop' of github.com:Rulingcom/orbit into desktop
Conflicts:
	Gemfile.lock
	vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb
	vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb
2013-03-21 18:39:09 +08:00
Rueshyna 42aca64dc3 correct model method 2013-03-21 18:29:25 +08:00
harrybomrah 6ba840de4a app manager changed plus some changes 2013-03-21 18:29:22 +08:00
harrybomrah 53953e57db section page fixed.. 2013-03-21 18:27:23 +08:00
Rueshyna ddf61e5606 fixed co author relation save button 2013-03-21 18:25:37 +08:00
harrybomrah 5685e11511 app manager changed plus some changes 2013-03-21 18:25:37 +08:00
harrybomrah 0e39de56e2 section page fixed.. 2013-03-21 18:25:36 +08:00
devin 677faf1811 add browser compatibility page 2013-03-21 18:25:36 +08:00
Rueshyna f0fbd50261 fixed checkout and start in personal plugin 2013-03-21 18:25:36 +08:00
Rueshyna 573270c98c correct factoried girl for journal 2013-03-21 18:25:36 +08:00
Rueshyna f61b786e90 one abstract one column for personal plugin 2013-03-21 18:25:36 +08:00
Rueshyna d085197635 add pagination for every controller and view in personal plugin 2013-03-21 18:25:36 +08:00
harrybomrah 6c58a0f773 compatibility page added and tinyscrollbar drag event fixed.. 2013-03-21 18:25:33 +08:00
harrybomrah 478b54da26 tinyscrollbar pagination fixed 2013-03-21 18:25:05 +08:00
harrybomrah e799ac4395 insert and remove columns 2013-03-21 18:25:05 +08:00
harrybomrah c101413d32 Major tinyscrollbar update 2013-03-21 18:25:02 +08:00
Rueshyna 50a09763ec modify translation for journal_co_author_relation button 2013-03-21 18:24:20 +08:00
Rueshyna 811b30791b modify nil of email string and sort 2013-03-21 18:24:20 +08:00
Rueshyna 4b8c68500a remove redundant space of co_author sample data 2013-03-21 18:24:20 +08:00
Rueshyna e5e45f3ada make index of list can be hightline list when click cancel button 2013-03-21 18:24:20 +08:00
Rueshyna f619c5e389 fixed author sample data generation and model method 2013-03-21 18:24:20 +08:00
Rueshyna 3c6ca3c254 add author filter for journal and fix some bug 2013-03-21 18:24:20 +08:00
Rueshyna 12fdb5a0ca have done conference author filter, journal haven't been done, yet 2013-03-21 18:24:16 +08:00
harrybomrah 7df0be3826 tinyscrollbar pagination fixed 2013-03-21 18:22:28 +08:00
harrybomrah 80be9e63ef insert and remove columns 2013-03-21 18:22:28 +08:00
harrybomrah 0444b1f5e5 Major tinyscrollbar update 2013-03-21 18:22:06 +08:00
Rueshyna 91d3e1d92c add pagination for personal plugin 2013-03-21 18:16:08 +08:00
Rueshyna fb8407dbe3 fixed bug 2013-03-21 18:10:55 +08:00
harrybomrah 9963c9fb68 insert and remove columns 2013-03-21 18:09:39 +08:00
devin 80a2f67dda tinyscrollbar css minor update 2013-03-21 18:09:39 +08:00
harrybomrah 7b2e7f5297 Major tinyscrollbar update 2013-03-21 18:09:39 +08:00
harrybomrah 38a695d8a9 all none for conf done 2013-03-21 18:09:38 +08:00
harrybomrah df83c6fff7 all none fixed 2013-03-21 18:09:38 +08:00
Rueshyna adec8c8938 correct model method 2013-03-15 15:10:14 +08:00
Rueshyna 2746616610 Merge branch 'desktop_work' into desktop
* desktop_work:
  app manager changed plus some changes
  section page fixed..
  section page fixed..
  add browser compatibility page

Conflicts:
	vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb
2013-03-14 19:00:06 +08:00
Rueshyna 61cc8f0f54 fixed co author relation save button 2013-03-14 18:29:24 +08:00
harrybomrah 31476bb813 app manager changed plus some changes 2013-03-14 17:55:33 +08:00
harrybomrah d2c1abeb95 section page fixed.. 2013-03-14 17:54:38 +08:00
devin f0c19cfdf9 add browser compatibility page 2013-03-14 17:54:38 +08:00
harrybomrah 8ab4e90a06 app manager changed plus some changes 2013-03-14 17:48:45 +08:00
Rueshyna 7a78594594 fixed checkout and start in personal plugin 2013-03-14 17:43:29 +08:00
Rueshyna b50548c538 correct factoried girl for journal 2013-03-14 17:43:01 +08:00
harrybomrah 84f255173c Merge branch 'desktop_work_devin' into desktop_work 2013-03-14 14:17:13 +08:00
harrybomrah b4ba4149d4 section page fixed.. 2013-03-14 14:16:38 +08:00
harrybomrah 3830fddfe0 section page fixed.. 2013-03-14 14:00:04 +08:00
Fu Matthew 66633443de add conditions for making multi cates and tags more stable 2013-03-13 17:53:11 +08:00
devin 3d7fbd9711 add browser compatibility page 2013-03-13 15:49:20 +08:00
Fu Matthew aa851cad76 now default options can be chosen by developer at init 2013-03-13 14:09:10 +08:00
Rueshyna 4a2c994401 one abstract one column for personal plugin 2013-03-13 14:05:06 +08:00
Rueshyna af6813480a add pagination for every controller and view in personal plugin 2013-03-12 17:00:42 +08:00
harrybomrah 4a83521b84 compatibility page added and tinyscrollbar drag event fixed.. 2013-03-12 15:23:38 +08:00
Rueshyna 470dbea22d Merge branch 'desktop' into desktop_work
* desktop:
  tinyscrollbar pagination fixed
  insert and remove columns
  Major tinyscrollbar update
  modify translation for journal_co_author_relation button
  modify nil of email string and sort
  remove redundant space of co_author sample data
  make index of list can be hightline list when click cancel button
  fixed author sample data generation and model method
  add author filter for journal and fix some bug
  have done conference author filter, journal haven't been done, yet
2013-03-12 14:16:25 +08:00
harrybomrah 8e369fe819 tinyscrollbar pagination fixed 2013-03-12 11:42:17 +08:00
harrybomrah 2b4e53ed1b insert and remove columns 2013-03-12 11:42:17 +08:00
harrybomrah 6d194759fa Major tinyscrollbar update 2013-03-12 11:42:16 +08:00
Rueshyna d20081157a modify translation for journal_co_author_relation button 2013-03-12 11:22:11 +08:00
harrybomrah e88487bc9f tinyscrollbar pagination fixed 2013-03-12 11:18:32 +08:00
Fu Matthew 311d741f92 style for front end 2013-03-11 18:21:17 +08:00
Rueshyna 8e0632236b modify nil of email string and sort 2013-03-11 17:21:02 +08:00
Rueshyna 78abcac1cb remove redundant space of co_author sample data 2013-03-11 17:20:24 +08:00
Rueshyna 385e043809 make index of list can be hightline list when click cancel button 2013-03-11 17:18:58 +08:00
Rueshyna 8d5a2d71b7 fixed author sample data generation and model method 2013-03-11 14:53:21 +08:00
Rueshyna 1880ed11ca add author filter for journal and fix some bug 2013-03-11 10:41:07 +08:00
Rueshyna 96602842a3 have done conference author filter, journal haven't been done, yet 2013-03-08 19:16:01 +08:00
harrybomrah ca64cba9ad updated 2013-03-08 12:54:58 +08:00
harrybomrah 4f64ff3568 insert and remove columns 2013-03-08 12:23:15 +08:00
devin a22c0c46e0 tinyscrollbar css minor update 2013-03-08 12:23:15 +08:00
harrybomrah 196030b4b4 Major tinyscrollbar update 2013-03-08 12:23:15 +08:00
Rueshyna 75a5e74bc0 add pagination for personal plugin 2013-03-08 12:01:13 +08:00
harrybomrah 39a20f6cc9 Merge branch 'desktop_work' into desktop_work_devin 2013-03-07 19:16:41 +08:00
harrybomrah 32d56232bc insert and remove columns 2013-03-07 19:15:30 +08:00
devin b7beadfc04 tinyscrollbar css minor update 2013-03-07 17:44:02 +08:00
Fu Matthew e53ad9f5d1 1.make module app forbid unearthed access except from admin
2.override sidebar link when it's object_auth or app_auth.
2013-03-07 16:51:47 +08:00
Rueshyna b2cbcf6629 fixed bug 2013-03-07 10:50:43 +08:00
harrybomrah 906e522a6a Major tinyscrollbar update 2013-03-06 19:04:33 +08:00
Fu Matthew 4f7928ad1b Merge branch 'development' of github.com:Rulingcom/orbit into development 2013-03-06 15:17:06 +08:00
Fu Matthew 77c7053bf1 put add admin pages using orbit back end controller 2013-03-06 15:16:20 +08:00
harrybomrah 20ac4f1ac0 all none for conf done 2013-03-06 12:08:08 +08:00
harrybomrah 9931eb7f61 all none fixed 2013-03-06 11:32:53 +08:00
283 changed files with 1389 additions and 5409 deletions

No files matched your search

+1 -4
View File
@@ -17,7 +17,4 @@ uploads/**/*
*.swp
*.pid
*.lck
.sass-cache/*
*.supported
*.lck
-1
View File
@@ -26,7 +26,6 @@ gem "mongo_session_store-rails3", '3.0.6'
gem 'nokogiri'
gem 'fb_graph'
gem 'rack-gridfs'
gem 'radius'
gem 'rake'
# gem 'remotipart'
-5
View File
@@ -194,10 +194,6 @@ GEM
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-gridfs (0.4.1)
mime-types
mongo (~> 1.2)
rack
rack-oauth2 (1.0.0)
activesupport (>= 2.3)
attr_required (>= 0.0.5)
@@ -377,7 +373,6 @@ DEPENDENCIES
pry-debugger
pry-remote
pry-stack_explorer
rack-gridfs
radius
rails (~> 3.2.9)
rake
Binary file not shown.

Before

Width:  |  Height:  |  Size: 824 B

After

Width:  |  Height:  |  Size: 613 B

@@ -1,34 +0,0 @@
function append_id(){
if ($("#object_id").length == 1) {
return "&id="+$("#object_id").val();
}
else{
return '';
};
}
$("#page_design").live('change', function() {
$.getScript($(this).attr('rel') + '?design_id=' + $(this).val() + append_id());
});
$("#module_app_list select").live('change', function() {
$.getScript($(this).attr('rel') + '?module_app_id='+$(this).val() + append_id());
});
$("#widget_list select,#frontend_list select").live('change', function() {
$.getScript($(this).attr('rel') +'?frontend=' + $(this).val() + '&module_app_id=' + $("#module_app_list select").val() + append_id() );
});
$("#tag_list select").live('change', function() {
$.getScript($(this).attr('rel') + '?type=' + $(this).val() + append_id() );
});
$("select.widget_field_select").live('change', function() {
$.getScript($(this).attr('rel') + '?widget_field_value='+ $(this).val()+'&dom_id=' + $(this).attr("id") + '&field_seri=' +$(this).attr('field_seri')+ '&module_app_id=' +$("#page_module_app_id,page_part_module_app_id").val() + append_id() );
});
$('.part_kind').live('click', function() {
$('.part_kind_partial').hide();
$('#part_' + $(this).attr('value')).show();
});
File diff suppressed because it is too large. Load diff
+7 -1
View File
@@ -147,7 +147,7 @@ var orbitDesktopAPI = function(){
return;
}
}
var whtml =$('<div id="app_frame_'+o.windowcounter+'" class="thmc2 app_frame" data-app="'+settings.appid+'"><div id="content"><div id="header" class="hh3"><div class="dtitle hh3 hp" style="text-transform:capitalize;"><span class="thmtxth">'+settings.title+'</span></div><span class="icon-remove hh3 hp thmtxt"></span></div><div id="holder_'+o.windowcounter+'" class="app_holder"><iframe src="'+appurl+'" frameborder="0" scrolling="auto"></iframe><div class="clear"></div></div></div></div>');
var whtml =$('<div id="app_frame_'+o.windowcounter+'" class="thmc2 app_frame" data-app="'+settings.appid+'"><div id="content"><div id="header" class="hh3"><div class="dtitle w2 hh3 hp" style="text-transform:capitalize;"><span class="thmtxth">'+settings.title+'</span></div><span class="icon-remove hh3 hp thmtxt"></span></div><div id="holder_'+o.windowcounter+'" class="app_holder"><iframe src="'+appurl+'" frameborder="0" scrolling="auto"></iframe><div class="clear"></div></div></div></div>');
$(o.contentHolder).append(whtml);
var parentwindow = $(o.contentHolder).find("div#app_frame_"+o.windowcounter);
var app_holder_height = parentwindow.height() - 72;
@@ -206,6 +206,12 @@ var orbitDesktopAPI = function(){
}
}
};
this.use_select2 = function(){
$('select:not(.select2-offscreen)').select2({
minimumResultsForSearch: -1
// minimumInputLength: -1
});
}
};
orbitDesktopAPI.prototype.notifyImgPath = "temp";
orbitDesktopAPI.prototype.wallpaperPath = "temp";
+40 -5
View File
@@ -1,3 +1,42 @@
function append_id(){
if ($("#object_id").length == 1) {
return "&id="+$("#object_id").val();
}
else{
return '';
};
}
$("div.editable").live("mouseenter mouseleave", function (event) {
$(this).children('.edit_link').toggle();
});
$("#page_design").live('change', function() {
$.getScript($(this).attr('rel') + '?design_id=' + $(this).val() + append_id());
});
$("#module_app_list select").live('change', function() {
$.getScript($(this).attr('rel') + '?module_app_id='+$(this).val() + append_id());
});
$("#widget_list select,#frontend_list select").live('change', function() {
$.getScript($(this).attr('rel') +'?frontend=' + $(this).val() + '&module_app_id=' + $("#module_app_list select").val() + append_id() );
});
$("#tag_list select").live('change', function() {
$.getScript($(this).attr('rel') + '?type=' + $(this).val() + append_id() );
});
$("select.widget_field_select").live('change', function() {
$.getScript($(this).attr('rel') + '?widget_field_value='+ $(this).val()+'&dom_id=' + $(this).attr("id") + '&field_seri=' +$(this).attr('field_seri')+ '&module_app_id=' +$("#page_module_app_id,page_part_module_app_id").val() + append_id() );
});
$('.part_kind').live('click', function() {
$('.part_kind_partial').hide();
$('#part_' + $(this).attr('value')).show();
});
$(document).ready(function(){
bindTreeDragHandle();
});
@@ -21,8 +60,4 @@ var bindTreeDragHandle = function(){
$.post("<%= Rails.application.routes.url_helpers.admin_update_position_path %>", { id: ui.item.attr('id'), parent_id: ui.item.parent().closest('li').attr('id'), position: ui.item.index() } );
}
});
}
$("div.editable").live("mouseenter mouseleave", function (event) {
$(this).children('.edit_link').toggle();
});
}
@@ -3,10 +3,12 @@ $gray: #ddd;
@mixin font-main($font-size) {
font-family: "Source Sans Pro", sans-serif;
font-size: #{$font-size}px;
font-weight: 300;
}
@mixin font-sub($font-size) {
font-family: "Source Sans Pro", Arial, sans-serif;
font-size: #{$font-size}px;
font-weight: 300;
}
@mixin transition-type($property, $sec) {
-webkit-transition: #{$property} #{$sec}s ease;
@@ -92,28 +92,20 @@
z-index: 9;
left: 0;
top: 60px;
font-size: 15px;
width: 120px;
border: solid 2px #dddddd;
-webkit-box-sizing: border-box;
/* webkit */
-khtml-box-sizing: border-box;
/* konqueror */
-moz-box-sizing: border-box;
/* firefox */
-ms-box-sizing: border-box;
/* ie */
box-sizing: border-box;
/* css3 */ }
.sdm_o li {
border-top: solid 1px #f7f7f7; }
.sdm_o li:first-child {
border: none; }
.sdm_o a {
display: block; }
.sdm_o .admtxt {
display: block;
line-height: 36px; }
font-size: 15px; }
.sdm_o li {
border-top: solid 1px #f2f2f2; }
.sdm_o li:first-child {
border: none; }
.sdm_o a {
display: block; }
.sdm_o .admtxt {
display: block;
line-height: 36px; }
/* simple dropdown menu with indicator */
.sdm_mdr .sdm_t {
@@ -127,12 +119,15 @@
.s_menu {
font-size: 15px;
line-height: 36px; }
.s_menu li {
border-top: solid 1px #dddddd; }
.s_menu li:first-child {
border: none; }
.s_menu a {
display: block; }
.s_menu li {
border-top: solid 1px #dddddd; }
.s_menu li:first-child {
border: none; }
.s_menu a {
display: block; }
/* simple tabs */
.s_tab {
@@ -162,7 +157,7 @@
font-size: 15px; }
.s_form label {
font-size: 13px;
font-weight: bold;
font-weight: normal;
display: inline-block;
vertical-align: middle;
width: 100px;
@@ -202,8 +197,7 @@
.s_form input[type=text]:focus,
.s_form input[type=password]:focus,
.s_form textarea:focus {
background-color: #f7f7f7;
border-color: #c4c4c4; }
background-color: #f7f7f7; }
.s_form textarea {
resize: none; }
.s_form textarea.full_height {
@@ -256,22 +250,27 @@
line-height: 36px;
position: relative;
z-index: 9; }
.toolbar .sdm, .toolbar .fn_g {
display: inline-block;
vertical-align: top; }
.toolbar .sdm_o {
top: 36px; }
.toolbar button {
border: none;
outline: none;
padding: 0 16px;
margin: 0;
font-family: inherit;
font-size: 15px;
vertical-align: top; }
.toolbar .fn_btn {
display: inline-block;
vertical-align: top; }
.toolbar .sdm, .toolbar .fn_g {
display: inline-block;
vertical-align: top; }
.toolbar .sdm_o {
top: 36px;
background-color: #f0f0f0; }
.toolbar button {
border: none;
outline: none;
padding: 0 16px;
margin: 0;
font-family: inherit;
font-size: 15px;
vertical-align: top; }
.toolbar .fn_btn {
display: inline-block;
vertical-align: top; }
/* tiny scrollbar */
.tinycanvas {
@@ -369,7 +368,10 @@
.tinycanvas:hover .scrollbar {
visibility: visible;
opacity: 1; }
.toolbar + .tinycanvas, .s_tab + .tinycanvas {
height: 480px; }
#panel_r .tinycanvas {
padding: 12px 0; }
.toolbar + .tinycanvas,
.s_tab + .tinycanvas {
height: 480px; }
#panel_r .tinycanvas {
padding: 12px 0; }
@@ -58,23 +58,19 @@
left: 0;
top: 60px;
font-size: 15px;
width: 120px;
border: solid 2px $gray;
@include box-sizing;
li {
border-top: solid 1px lighten( $gray, 10% );
}
li:first-child {
border: none;
}
a {
display: block;
}
.admtxt {
display: block;
line-height: 36px;
}
.sdm_o li {
border-top: solid 1px #f2f2f2;
}
.sdm_o li:first-child {
border: none;
}
.sdm_o a {
display: block;
}
.sdm_o .admtxt {
display: block;
line-height: 36px;
}
/* simple dropdown menu with indicator */
@@ -90,16 +86,15 @@
.s_menu {
font-size: 15px;
line-height: 36px;
li {
border-top: solid 1px $gray;
}
li:first-child {
border: none;
}
a {
display: block;
}
}
.s_menu li {
border-top: solid 1px #ddd;
}
.s_menu li:first-child {
border: none;
}
.s_menu a {
display: block;
}
/* simple tabs */
@@ -135,7 +130,7 @@
// basic style
label {
font-size: 13px;
font-weight: bold;
font-weight: normal;
display: inline-block;
vertical-align: middle;
width: 100px;
@@ -170,7 +165,6 @@
&:focus {
background-color: lighten($gray, 10%);
border-color: darken($gray, 10%);
}
}
textarea {
@@ -234,27 +228,27 @@
line-height: 36px;
position: relative;
z-index: 9;
.sdm, .fn_g {
display: inline-block;
vertical-align: top;
}
.sdm_o {
top: 36px;
}
button {
border: none;
outline: none;
padding: 0 16px;
margin: 0;
font-family: inherit;
font-size: 15px;
vertical-align: top;
}
.fn_btn {
display: inline-block;
vertical-align: top;
}
}
.toolbar .sdm, .toolbar .fn_g {
display: inline-block;
vertical-align: top;
}
.toolbar .sdm_o {
top: 36px;
background-color: #f0f0f0;
}
.toolbar button {
border: none;
outline: none;
padding: 0 16px;
margin: 0;
font-family: inherit;
font-size: 15px;
vertical-align: top;
}
.toolbar .fn_btn {
display: inline-block;
vertical-align: top;
}
/* tiny scrollbar */
@@ -357,11 +351,11 @@
visibility: visible;
opacity: 1;
}
.toolbar + &,
.s_tab + & {
height: 480px;
}
#panel_r & {
padding: 12px 0;
}
}
.toolbar + .tinycanvas,
.s_tab + .tinycanvas {
height: 480px;
}
#panel_r .tinycanvas {
padding: 12px 0;
}
+152 -112
View File
@@ -54,6 +54,7 @@ table {
body {
font-family: "Source Sans Pro", sans-serif;
font-size: 12px;
font-weight: 300;
background-color: #000; }
a, a:hover {
@@ -69,13 +70,11 @@ a:focus {
.clear:after {
display: table;
width: 100%;
content: '';
clear: both; }
content: ''; }
.o-loading {
font-size: 13px; }
.fullsize .o-loading {
padding: 12px; }
font-size: 13px;
font-weight: normal; }
.o-loading i {
font-size: 20px; }
@@ -295,7 +294,7 @@ a:focus {
.fn_des.admtxt {
line-height: 60px;
padding: 0 12px;
padding: 0 6px;
font-size: 15px;
position: absolute;
z-index: 9;
@@ -334,7 +333,8 @@ a:focus {
.section_label li {
font-size: 15px; }
.section_label li:first-child {
font-size: 18px; }
font-size: 18px;
font-weight: normal; }
/* panel */
#panel_l {
@@ -369,7 +369,8 @@ a:focus {
#orbitnote .note_holder .note_message {
color: #333;
margin: 10px 0 0 48px;
font-size: 15px; }
font-size: 15px;
font-weight: normal; }
/* Desktop Dialogue */
#orbitdiag {
@@ -400,6 +401,7 @@ a:focus {
margin: 0 6px;
text-align: center;
font-size: 15px;
font-weight: normal;
line-height: 36px; }
#orbitdiag .diag_holder .diag_holder_inner .diag_btn:hover {
outline: solid 2px white; }
@@ -416,12 +418,12 @@ a:focus {
position: absolute;
left: 0;
bottom: 0;
z-index: 3;
white-space: nowrap; }
z-index: 3; }
[data-sizex="1"] .appname, .w1.h1 .appname {
text-align: center; }
[data-sizey="2"] .appname {
font-size: 21px; }
font-size: 21px;
font-weight: normal; }
.hh2 .appname {
position: relative;
width: auto;
@@ -473,12 +475,8 @@ a:focus {
left: 0;
top: 0; }
.gridster ul {
margin: -6px 0 0 -6px; }
.widget.gs_w {
cursor: move;
overflow: hidden; }
cursor: move; }
/* header drop menu */
.sdm_mdr .sdm_o {
@@ -509,6 +507,7 @@ a:focus {
.theme_preview {
width: 528px;
height: 150px;
line-height: 36px;
font-size: 15px; }
@@ -519,24 +518,15 @@ a:focus {
margin-right: 12px; }
.theme_plate > div:first-child {
margin-right: 48px; }
.theme_plate .g_sep {
margin-right: 0; }
#color_input th {
vertical-align: bottom; }
.stock_wallpaper .ssl_item {
margin-bottom: 6px; }
.s_title {
font-size: 21px;
font-weight: normal;
line-height: 60px;
text-align: left; }
.s_title.size_large {
font-size: 36px; }
.s_title.size_small {
font-size: 15px;
line-height: 2em; }
.s_subtitle {
font-size: 15px;
@@ -555,6 +545,7 @@ a:focus {
display: block;
float: right;
font-size: 15px;
font-weight: normal;
line-height: 36px;
text-align: center;
border: 0; }
@@ -569,18 +560,8 @@ a:focus {
max-width: 340px; }
.g_sep {
width: 12px;
border-left: solid 1px white;
-webkit-box-sizing: border-box;
/* webkit */
-khtml-box-sizing: border-box;
/* konqueror */
-moz-box-sizing: border-box;
/* firefox */
-ms-box-sizing: border-box;
/* ie */
box-sizing: border-box;
/* css3 */ }
width: 11px;
border-left: solid 1px white; }
.grp {
height: 528px;
@@ -605,12 +586,14 @@ a:focus {
/* list item */
.list_t_item {
/*padding: 2px;*/
overflow: hidden; }
.list_t_title {
margin-bottom: 6px;
color: #333;
font-size: 15px; }
font-size: 15px;
font-weight: normal; }
.list_t_des {
line-height: 1.5em;
@@ -624,74 +607,118 @@ a:focus {
font-size: 11px;
-webkit-text-size-adjust: none; }
/* Connection Page */
#connection_setting {
height: 492px; }
#connection_setting .s_form {
float: left;
margin: 0 12px 0 0;
padding-left: 24px;
height: 100%;
border-left: solid 1px #dddddd; }
#connection_setting .s_form:first-child {
padding-left: 0;
border: none; }
#connection_setting .s_form label {
line-height: 30px; }
#connection_setting .s_form .c_icon, #connection_setting .s_form .c_name {
display: inline-block;
vertical-align: middle; }
#connection_setting .s_form .c_name {
padding: 0 12px;
font-size: 18px; }
#connection_setting .s_form input[type=text], #connection_setting .s_form input[type=password] {
width: 202px; }
#connection_setting .setting_btn {
margin-left: 12px; }
#connection_setting .setting_btn.disable {
background-color: #ddd;
cursor: default; }
#connection_setting .c_status {
float: right;
padding: 6px;
background-color: #eee;
color: #ccc;
font-size: 9px;
font-weight: normal;
-webkit-text-size-adjust: none;
-webkit-transition: background-color 0.5s ease;
-moz-transition: background-color 0.5s ease;
transition: background-color 0.5s ease; }
#connection_setting .c_status_on {
background-color: #51A351;
color: #fff; }
#connection_setting .c_info {
padding: 7px 6px;
background-color: #fcfcfc;
cursor: default;
font-size: 18px;
font-weight: normal; }
/* Journal Papers */
[page-name="journal_p_list"] .list_t_item .inner {
padding-left: 30px; }
[page-name="journal_p_list"] .list_item_action {
font-size: 12px;
float: left;
margin-left: -30px; }
[page-name="journal_p_list"] .list_item_action a {
display: block;
width: 20px;
height: 20px;
line-height: 20px;
margin: 1px 1px 6px 1px; }
[page-name="journal_p_list"] .list_item_action .icon-star-empty {
color: #999;
font-size: 20px; }
[page-name="journal_p_list"] .list_item_action .icon-star {
color: #faa732;
font-size: 20px; }
[page-name="journal_p_list"] .list_item_action .icon-check-empty {
color: #999;
font-size: 20px; }
[page-name="journal_p_list"] .list_item_action .icon-check {
color: #333;
font-size: 20px; }
[page-name="journal_p_list"] .file_view .list_t_des {
overflow: hidden; }
[page-name="journal_p_list"] .list_item_action a {
display: block;
width: 20px;
height: 20px;
line-height: 20px;
margin: 1px 1px 6px 1px; }
[page-name="journal_p_list"] .list_item_action .icon-star-empty {
color: #999;
font-size: 20px; }
[page-name="journal_p_list"] .list_item_action .icon-star {
color: #faa732;
font-size: 20px; }
[page-name="journal_p_list"] .list_item_action .icon-check-empty {
color: #999;
font-size: 20px; }
[page-name="journal_p_list"] .list_item_action .icon-check {
color: #333;
font-size: 20px; }
[page-name="journal_p_list"] .list_t_item.file_view {
height: 148px; }
[page-name="journal_p_list"] .file_view .file {
float: left;
width: 120px;
display: inline-block;
width: 62px;
height: 50px;
padding: 6px;
margin: 1px;
position: relative;
-webkit-box-sizing: border-box;
/* webkit */
-khtml-box-sizing: border-box;
/* konqueror */
-moz-box-sizing: border-box;
/* firefox */
-ms-box-sizing: border-box;
/* ie */
box-sizing: border-box;
/* css3 */ }
[page-name="journal_p_list"] .file_view .file:hover {
background-color: #f7f7f7; }
[page-name="journal_p_list"] .file_view .file img {
width: 38px;
height: 38px;
position: absolute;
left: 6px;
top: 6px; }
[page-name="journal_p_list"] .file_view .file .filetitle {
display: block;
width: 100%;
height: 38px;
padding-left: 40px;
overflow: hidden;
-webkit-box-sizing: border-box;
/* webkit */
-khtml-box-sizing: border-box;
/* konqueror */
-moz-box-sizing: border-box;
/* firefox */
-ms-box-sizing: border-box;
/* ie */
box-sizing: border-box;
/* css3 */ }
text-align: center; }
[page-name="journal_p_list"] .file_view .file:hover {
background-color: #ddd; }
[page-name="journal_p_list"] .file_view .file img {
width: 24px;
display: block;
margin: 0 auto;
margin-top: 4px; }
[page-name="journal_p_list"] .file_view .filetitle {
font-size: 11px;
-webkit-text-size-adjust: none; }
/* Journal Paper Add */
#paper_add .s_grid_con {
@@ -700,22 +727,27 @@ a:focus {
margin-left: 12px;
padding-left: 12px;
border-left: solid 1px #eeeeee; }
#paper_add .s_grid_con:first-child {
margin-left: 0;
padding-left: 0;
border: none; }
#paper_add .s_grid_con:first-child {
margin-left: 0;
padding-left: 0;
border: none; }
#paper_add .f_w {
width: 336px; }
#paper_add label {
margin-right: 0; }
/* Journal Journal list */
[page-name="journal_p_journal"] .datalist_item .inner {
padding-left: 30px; }
[page-name="journal_p_journal"] .list_item_action {
font-size: 12px;
float: left;
margin-left: -30px; }
[page-name="journal_p_journal"] .list_item_action i {
color: #999;
font-size: 20px;
@@ -724,6 +756,7 @@ a:focus {
height: 20px;
line-height: 20px;
margin: 1px 1px 6px 1px; }
[page-name="journal_p_journal"] .list_t_desc {
font-family: Arial, sans-serif;
font-size: 12px;
@@ -732,17 +765,21 @@ a:focus {
/* Journal Co-Author */
[page-name="journal_p_coauthor"] .list_t_item {
height: 110px; }
[page-name="journal_p_coauthor"] .list_item_function a {
display: inline-block;
padding: 4px;
font-family: Arial, sans-serif;
font-size: 11px;
-webkit-text-size-adjust: none; }
[page-name="journal_p_coauthor"] .info {
font-family: Arial, sans-serif; }
[page-name="journal_p_coauthor"] .info li {
margin-bottom: 8px;
color: #999; }
[page-name="journal_p_coauthor"] .info .name {
font-size: 18px;
line-height: 24px;
@@ -751,6 +788,7 @@ a:focus {
/* Journal Co-Author Relationship*/
[page-name="journal_p_coauthor_relation"] .edit_co_author_relation {
/*margin-left: -10px;*/ }
[page-name="journal_p_coauthor_relation"] .form_space {
margin-bottom: 10px;
font-size: 18px;
@@ -771,16 +809,18 @@ a:focus {
right: 0;
bottom: 0;
z-index: 12; }
.app_frame .app_holder {
background-color: #fff;
position: absolute;
width: 100%; }
.app_frame #header .icon-remove {
display: block;
float: right;
line-height: 60px;
font-size: 20px;
cursor: pointer; }
.app_frame .app_holder {
background-color: #fff;
position: absolute;
width: 100%; }
.app_frame #header .icon-remove {
display: block;
float: right;
line-height: 60px;
font-size: 20px;
cursor: pointer; }
/*Tooltip popup */
.desktop_toolpopup {
+168 -183
View File
@@ -66,15 +66,11 @@ a:focus { outline: none; }
display: table;
width: 100%;
content: '';
clear: both;
}
.o-loading {
font-size: 13px;
// font-weight: normal;
font-weight: normal;
.fullsize & {
padding: 12px;
}
i {
font-size: 20px;
}
@@ -231,7 +227,7 @@ a:focus { outline: none; }
}
.fn_des.admtxt {
line-height: 60px;
padding: 0 12px;
padding: 0 6px;
font-size: 15px;
position: absolute;
z-index: 9;
@@ -277,9 +273,10 @@ a:focus { outline: none; }
}
li:first-child {
font-size: 18px;
// font-weight: normal;
font-weight: normal;
}
}
/* panel */
#panel_l {
background-color: #f0f0f0;
@@ -320,7 +317,7 @@ a:focus { outline: none; }
color: #333;
margin: 10px 0 0 48px;
font-size: 15px;
// font-weight: normal;
font-weight: normal;
}
}
}
@@ -360,7 +357,7 @@ a:focus { outline: none; }
margin: 0 6px;
text-align: center;
font-size: 15px;
// font-weight: normal;
font-weight: normal;
line-height: 36px;
&:hover {
@@ -385,7 +382,6 @@ a:focus { outline: none; }
left: 0;
bottom: 0;
z-index: 3;
white-space: nowrap;
[data-sizex="1"] &,
.w1.h1 & {
@@ -393,7 +389,7 @@ a:focus { outline: none; }
}
[data-sizey="2"] & {
font-size: 21px;
// font-weight: normal;
font-weight: normal;
}
.hh2 & {
position: relative;
@@ -421,6 +417,8 @@ a:focus { outline: none; }
margin-right: 6px;
}
}
.appholder {
position: relative;
z-index: 2;
@@ -444,7 +442,7 @@ a:focus { outline: none; }
margin: 0 12px 0 0;
position: relative;
z-index: 9;
}
}
.tile {
display: block;
width: 100%;
@@ -452,19 +450,10 @@ a:focus { outline: none; }
position: absolute;
left: 0;
top: 0;
}
.gridster ul {
margin: -6px 0 0 -6px;
}
}
.widget.gs_w {
cursor: move;
overflow: hidden;
}
// .app.gs_w:active {
// -webkit-transform: scale(0.9);
// -moz-transform: scale(0.9);
// transform: scale(0.9);
// }
/* header drop menu */
.sdm_mdr .sdm_o { top: 36px; }
@@ -495,6 +484,7 @@ a:focus { outline: none; }
}
.theme_preview {
width: 528px;
height: 150px;
line-height: 36px;
font-size: 15px;
}
@@ -508,12 +498,6 @@ a:focus { outline: none; }
> div:first-child {
margin-right: 48px;
}
.g_sep {
margin-right: 0;
}
}
#color_input th {
vertical-align: bottom
}
.stock_wallpaper {
.ssl_item {
@@ -523,17 +507,9 @@ a:focus { outline: none; }
.s_title {
font-size: 21px;
// font-weight: normal;
font-weight: normal;
line-height: 60px;
text-align: left;
&.size_large {
font-size: 36px;
}
&.size_small {
font-size: 15px;
line-height: 2em;
}
}
.s_subtitle {
font-size: 15px;
@@ -552,7 +528,7 @@ a:focus { outline: none; }
display: block;
float: right;
font-size: 15px;
// font-weight: normal;
font-weight: normal;
line-height: 36px;
text-align: center;
border: 0;
@@ -570,9 +546,9 @@ a:focus { outline: none; }
max-width: 340px;
}
.g_sep {
width: 12px;
border-left: solid 1px #fff;
@include box-sizing;
width: 11px;
border-left:
solid 1px #fff;
}
@@ -596,12 +572,12 @@ a:focus { outline: none; }
}
/* list item */
.list_t_item { overflow: hidden; }
.list_t_item { /*padding: 2px;*/ overflow: hidden; }
.list_t_title {
margin-bottom: 6px;
color: #333;
font-size: 15px;
// font-weight: normal;
font-weight: normal;
}
.list_t_des {
line-height: 1.5em;
@@ -616,145 +592,155 @@ a:focus { outline: none; }
-webkit-text-size-adjust: none;
}
/* Journal Papers */
[page-name="journal_p_list"] {
.list_t_item .inner { padding-left: 30px; }
.list_item_action {
font-size: 12px;
float: left;
margin-left: -30px;
a {
display: block;
width: 20px;
height: 20px;
line-height: 20px;
margin: 1px 1px 6px 1px;
}
.icon-star-empty { color: #999; font-size: 20px; }
.icon-star { color: #faa732; font-size: 20px; }
.icon-check-empty { color: #999; font-size: 20px; }
.icon-check { color: #333; font-size: 20px; }
}
.file_view {
.list_t_des {
overflow: hidden;
}
.file {
float: left;
width: 120px;
height: 50px;
padding: 6px;
margin: 1px;
position: relative;
@include box-sizing;
/* Connection Page */
#connection_setting { height: 492px; }
#connection_setting .s_form {
float: left;
margin: 0 12px 0 0;
padding-left: 24px;
height: 100%;
border-left: solid 1px #ddd;
}
#connection_setting .s_form:first-child { padding-left: 0; border: none; }
#connection_setting .s_form label { line-height: 30px; }
#connection_setting .s_form .c_icon, #connection_setting .s_form .c_name {
display: inline-block;
vertical-align: middle;
}
#connection_setting .s_form .c_name { padding: 0 12px; font-size: 18px; }
#connection_setting .s_form input[type=text], #connection_setting .s_form input[type=password] { width: 202px; }
#connection_setting .setting_btn { margin-left: 12px; }
#connection_setting .setting_btn.disable { background-color: #ddd; cursor: default; }
#connection_setting .c_status {
float: right;
padding: 6px;
background-color: #eee;
color: #ccc;
font-size: 9px;
font-weight: normal;
-webkit-text-size-adjust: none;
@include transition-type("background-color",0.5);
}
#connection_setting .c_status_on { background-color: #51A351; color: #fff; }
#connection_setting .c_info {
padding: 7px 6px;
background-color: #fcfcfc;
cursor: default;
font-size: 18px;
font-weight: normal;
}
&:hover {
background-color: lighten($gray, 10%);
}
img {
width: 38px;
height: 38px;
position: absolute;
left: 6px;
top: 6px;
}
.filetitle {
display: block;
width: 100%;
height: 38px;
padding-left: 40px;
overflow: hidden;
@include box-sizing;
}
}
}
/* Journal Papers */
[page-name="journal_p_list"] .list_t_item .inner { padding-left: 30px; }
[page-name="journal_p_list"] .list_item_action {
font-size: 12px;
float: left;
margin-left: -30px;
}
[page-name="journal_p_list"] .list_item_action a {
display: block;
width: 20px;
height: 20px;
line-height: 20px;
margin: 1px 1px 6px 1px;
}
[page-name="journal_p_list"] .list_item_action .icon-star-empty { color: #999; font-size: 20px; }
[page-name="journal_p_list"] .list_item_action .icon-star { color: #faa732; font-size: 20px; }
[page-name="journal_p_list"] .list_item_action .icon-check-empty { color: #999; font-size: 20px; }
[page-name="journal_p_list"] .list_item_action .icon-check { color: #333; font-size: 20px; }
[page-name="journal_p_list"] .list_t_item.file_view {
height: 148px;
}
[page-name="journal_p_list"] .file_view .file {
display: inline-block;
width: 62px;
height: 50px;
text-align: center;
}
[page-name="journal_p_list"] .file_view .file:hover {
background-color: #ddd;
}
[page-name="journal_p_list"] .file_view .file img {
width: 24px;
display: block;
margin: 0 auto;
margin-top: 4px;
}
[page-name="journal_p_list"] .file_view .filetitle {
font-size: 11px;
-webkit-text-size-adjust: none;
}
/* Journal Paper Add */
#paper_add {
.s_grid_con {
float: left;
height: 456px;
margin-left: 12px;
padding-left: 12px;
border-left: solid 1px #eee;
&:first-child {
margin-left: 0;
padding-left: 0;
border: none;
}
}
.f_w { width: 336px; }
label { margin-right: 0; }
#paper_add .s_grid_con {
float: left;
height: 456px;
margin-left: 12px;
padding-left: 12px;
border-left: solid 1px #eee;
}
#paper_add .s_grid_con:first-child { margin-left: 0; padding-left: 0; border: none; }
#paper_add .f_w { width: 336px; }
#paper_add label { margin-right: 0; }
/* Journal Journal list */
[page-name="journal_p_journal"] {
.datalist_item .inner {
padding-left: 30px;
}
.list_item_action {
font-size: 12px;
float: left;
margin-left: -30px;
}
.list_item_action i {
color: #999;
font-size: 20px;
display: block;
width: 20px;
height: 20px;
line-height: 20px;
margin: 1px 1px 6px 1px;
}
.list_t_desc {
font-family: Arial, sans-serif;
font-size: 12px;
color: #999;
}
[page-name="journal_p_journal"] .datalist_item .inner {
padding-left: 30px;
}
[page-name="journal_p_journal"] .list_item_action {
font-size: 12px;
float: left;
margin-left: -30px;
}
[page-name="journal_p_journal"] .list_item_action i {
color: #999;
font-size: 20px;
display: block;
width: 20px;
height: 20px;
line-height: 20px;
margin: 1px 1px 6px 1px;
}
[page-name="journal_p_journal"] .list_t_desc {
font-family: Arial, sans-serif;
font-size: 12px;
color: #999;
}
/* Journal Co-Author */
[page-name="journal_p_coauthor"] {
.list_t_item {
height: 110px;
}
.list_item_function {}
.list_item_function a {
display: inline-block;
padding: 4px;
font-family: Arial, sans-serif;
font-size: 11px;
-webkit-text-size-adjust: none;
}
.info {
font-family: Arial, sans-serif;
}
.info li {
margin-bottom: 8px;
color: #999;
}
.info .name {
font-size: 18px;
line-height: 24px;
color: #333;
}
[page-name="journal_p_coauthor"] {}
[page-name="journal_p_coauthor"] .list_t_item {
height: 110px;
}
[page-name="journal_p_coauthor"] .list_item_function {}
[page-name="journal_p_coauthor"] .list_item_function a {
display: inline-block;
padding: 4px;
font-family: Arial, sans-serif;
font-size: 11px;
-webkit-text-size-adjust: none;
}
[page-name="journal_p_coauthor"] .info {
font-family: Arial, sans-serif;
}
[page-name="journal_p_coauthor"] .info li {
margin-bottom: 8px;
color: #999;
}
[page-name="journal_p_coauthor"] .info .name {
font-size: 18px;
line-height: 24px;
color: #333;
}
/* Journal Co-Author Relationship*/
[page-name="journal_p_coauthor_relation"]{
.edit_co_author_relation {
/*margin-left: -10px;*/
}
.form_space {
margin-bottom: 10px;
font-size: 18px;
font-family: Arial, sans-serif;
}
[page-name="journal_p_coauthor_relation"] .edit_co_author_relation {
/*margin-left: -10px;*/
}
[page-name="journal_p_coauthor_relation"] .form_space {
margin-bottom: 10px;
font-size: 18px;
font-family: Arial, sans-serif;
}
/* Journal New Co-Author */
#new_co_author label {
@@ -773,19 +759,18 @@ a:focus { outline: none; }
right: 0;
bottom: 0;
z-index: 12;
.app_holder {
background-color: #fff;
position: absolute;
width: 100%;
}
#header .icon-remove {
display: block;
float: right;
line-height: 60px;
font-size: 20px;
cursor: pointer;
}
}
.app_frame .app_holder {
background-color: #fff;
position: absolute;
width: 100%;
}
.app_frame #header .icon-remove {
display: block;
float: right;
line-height: 60px;
font-size: 20px;
cursor: pointer;
}
/*Tooltip popup */
@@ -65,7 +65,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
font-size: 1px;
text-decoration: none;
border: 0;
background: url("select2/select2.png") right top no-repeat;
background: url(<%= asset_path "desktop/select2/select2.png" %>) right top no-repeat;
cursor: pointer;
outline: 0; }
@@ -86,21 +86,24 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
position: absolute;
z-index: 9999;
top: 100%;
background-color: #fff;
background: #fff;
color: #000;
border: 2px solid #dddddd; }
border: 1px solid #dddddd;
border-top: 0; }
.select2-drop.select2-drop-above {
margin-top: 1px; }
margin-top: 1px;
border-top: 1px solid #dddddd;
border-bottom: 0; }
.select2-container .select2-choice div {
display: block;
width: 21px;
width: 20px;
height: 100%;
position: absolute;
right: 0;
top: 0;
border-left: solid 1px #dddddd;
background: #ccc;
-webkit-box-sizing: border-box;
/* webkit */
-khtml-box-sizing: border-box;
@@ -116,7 +119,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
display: block;
width: 100%;
height: 100%;
background: url("select2/select2.png") no-repeat 0 50%; }
background: url(<%= asset_path "desktop/select2/select2.png" %>) no-repeat 0 1px; }
.select2-search {
display: inline-block;
@@ -149,25 +152,29 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
margin-top: 4px; }
.select2-search input.select2-active {
background: white image-url("select2-spinner.gif") no-repeat 100%; }
background: white image-url(<%= asset_path "desktop/select2/select2-spinner.gif" %>) no-repeat 100%; }
.select2-container-active .select2-choice,
.select2-container-active .select2-choices {
outline: none; }
.select2-dropdown-open .select2-choice {
border-bottom-color: transparent; }
border-bottom-color: transparent;
background-color: #eee; }
.select2-dropdown-open .select2-choice div {
background-color: #dddddd;
background: transparent;
border-left: none;
filter: none; }
.select2-dropdown-open .select2-choice div b {
background-position: -20px 50%; }
background-position: -18px 1px; }
/* results */
.select2-results {
max-height: 200px;
padding: 0 0 0 4px;
margin: 4px 4px 4px 0;
font-size: 13px;
position: relative;
overflow-x: hidden;
@@ -201,16 +208,13 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
.select2-results li {
list-style: none;
display: list-item;
background-image: none;
border-top: solid 1px #f7f7f7; }
.select2-results li :first-child {
border-top: 0; }
background-image: none; }
.select2-results li.select2-result-with-children > .select2-result-label {
font-weight: bold; }
.select2-results .select2-result-label {
padding: 6px;
padding: 4px 6px;
margin: 0;
cursor: pointer;
-webkit-touch-callout: none;
@@ -261,7 +265,7 @@ disabled look for disabled choices in the results dropdown
display: none; }
.select2-more-results.select2-active {
background: #f4f4f4 image-url("select2-spinner.gif") no-repeat 100%; }
background: #f4f4f4 image-url(<%= asset_path "desktop/select2/select2-spinner.gif" %>) no-repeat 100%; }
.select2-more-results {
background: #f4f4f4;
@@ -323,7 +327,7 @@ disabled look for disabled choices in the results dropdown
background: transparent !important; }
.select2-container-multi .select2-choices .select2-search-field input.select2-active {
background: white image-url("select2-spinner.gif") no-repeat 100% !important; }
background: white image-url(<%= asset_path "desktop/select2/select2-spinner.gif" %>) no-repeat 100% !important; }
.select2-default {
color: #999999 !important; }
@@ -352,23 +356,23 @@ disabled look for disabled choices in the results dropdown
.select2-search-choice-close {
display: block;
width: 10px;
height: 10px;
width: 12px;
height: 13px;
position: absolute;
right: 3px;
top: 5px;
top: 4px;
font-size: 1px;
outline: none;
background: url("select2/select2.png") right top no-repeat; }
background: url(<%= asset_path "desktop/select2/select2.png" %>) right top no-repeat; }
.select2-container-multi .select2-search-choice-close {
left: 3px; }
.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
background-position: right -20px; }
background-position: right -11px; }
.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
background-position: right -20px; }
background-position: right -11px; }
/* disabled styles */
.select2-container-multi.select2-container-disabled .select2-choices {
@@ -393,13 +397,12 @@ disabled look for disabled choices in the results dropdown
.select2-offscreen {
position: absolute;
left: -10000px;
top: 0; }
left: -10000px; }
/* Retina-ize icons */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) {
.select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice div b {
background-image: url("select2/select2x2.png") !important;
background-image: url(<%= asset_path "desktop/select2/select2x2.png" %>) !important;
background-repeat: no-repeat !important;
background-size: 60px 40px !important; }
@@ -86,26 +86,27 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
position: absolute;
z-index: 9999;
top: 100%;
background-color: #fff;
background: #fff;
color: #000;
border: 2px solid $gray;
// border-top: 0;
border: 1px solid $gray;
border-top: 0;
}
.select2-drop.select2-drop-above {
margin-top: 1px;
// border-top: 1px solid $gray;
// border-bottom: 0;
border-top: 1px solid $gray;
border-bottom: 0;
}
.select2-container .select2-choice div {
display: block;
width: 21px;
width: 20px;
height: 100%;
position: absolute;
right: 0;
top: 0;
border-left: solid 1px $gray;
background: #ccc;
@include box-sizing;
}
@@ -113,7 +114,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
display: block;
width: 100%;
height: 100%;
background: url('select2/select2.png') no-repeat 0 50%;
background: url('select2/select2.png') no-repeat 0 1px;
}
.select2-search {
@@ -166,22 +167,23 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
.select2-dropdown-open .select2-choice {
border-bottom-color: transparent;
background-color: #eee;
}
.select2-dropdown-open .select2-choice div {
background-color: $gray;
// border-left: none;
background: transparent;
border-left: none;
filter: none;
}
.select2-dropdown-open .select2-choice div b {
background-position: -20px 50%;
background-position: -18px 1px;
}
/* results */
.select2-results {
max-height: 200px;
// padding: 0 0 0 4px;
// margin: 4px 4px 4px 0;
padding: 0 0 0 4px;
margin: 4px 4px 4px 0;
font-size: 13px;
position: relative;
overflow-x: hidden;
@@ -205,11 +207,6 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
list-style: none;
display: list-item;
background-image: none;
border-top: solid 1px lighten($gray, 10%);
:first-child {
border-top: 0;
}
}
.select2-results li.select2-result-with-children > .select2-result-label {
@@ -217,7 +214,7 @@ Version: 3.3.1 Timestamp: Wed Feb 20 09:57:22 PST 2013
}
.select2-results .select2-result-label {
padding: 6px;
padding: 4px 6px;
margin: 0;
cursor: pointer;
@@ -380,11 +377,11 @@ disabled look for disabled choices in the results dropdown
.select2-search-choice-close {
display: block;
width: 10px;
height: 10px;
width: 12px;
height: 13px;
position: absolute;
right: 3px;
top: 5px;
top: 4px;
font-size: 1px;
outline: none;
background: url('select2/select2.png') right top no-repeat;
@@ -395,10 +392,10 @@ disabled look for disabled choices in the results dropdown
}
.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
background-position: right -20px;
background-position: right -11px;
}
.select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
background-position: right -20px;
background-position: right -11px;
}
/* disabled styles */
@@ -430,7 +427,6 @@ disabled look for disabled choices in the results dropdown
.select2-offscreen {
position: absolute;
left: -10000px;
top: 0;
}
/* Retina-ize icons */
@@ -5,9 +5,8 @@ class Admin::DashboardsController < OrbitBackendController
# before_filter :is_admin?
def index
check_backend_openness
@module_app_contents, @module_app_contents_total = get_module_app_count('bulletin', 'page_context', 'web_link')
@recent_updated = get_recently_updated('bulletin', 'page_context', 'web_link')
@module_app_contents, @module_app_contents_total = get_module_app_count('bulletin', 'page_context', 'web_link')
@recent_updated = get_recently_updated('bulletin', 'page_context', 'web_link')
@most_visited = get_most_visited('bulletin', 'page_context')
end
+1 -16
View File
@@ -148,22 +148,7 @@ include Admin::FrontendWidgetInterface
else
flash.now[:error] = t('create.error.page')
@designs = Design.all.entries
@design = Design.find(params[:page][:design]) || Design.first
@themes = @design.themes
@module_apps = ModuleApp.for_frontend_select
@selected={
:design => params[:page][:design],
:theme=> (Theme.find(params[:page][:theme_id]) rescue nil),
:module_app=> (ModuleApp.find(params[:page][:module_app_id]) rescue nil) ,#@module_apps.first
:app_frontend_url=> params[:page][:app_frontend_url], #@module_apps.first
:category=>params[:page][:category],
:tag=>params[:page][:tag],
:page_frontend_data_count=>params[:page][:page_frontend_data_count],
:frontend_style => params[:page][:frontend_style]
}
@app_frontend_urls = @item.module_app ? select_array_for_app_frontend_urls(@item.module_app.app_pages) : nil
get_categories_and_tags
get_frontend_data_count
@design = Design.first
render :action => "new"
end
end
@@ -1,9 +0,0 @@
class Admin::RoleCategorysController < Admin::RoleFiltersController
def initialize
super
@app_type = 'role_category'
@app_type_name = 'category'
end
end
@@ -1,144 +0,0 @@
class Admin::RoleFiltersController < OrbitBackendController
include OrbitControllerLib::DivisionForDisable
layout "new_admin"
before_filter :authenticate_user!
before_filter :is_admin?
# before_filter :set_attribute, :only => [:index, :show, :new, :edit]
helper Admin::AttributeValuesViewHelper
def index
get_types
@role = Role.find(params[:role_id])
@role_filters = @types.where(:role_id=>params[:role_id])
@role_filter = @types.new(:display => 'List')
# @url = admin_role_filter_role_filters_path
if @app_type == 'role_statuses'
@url = eval("admin_#{@app_type}_path")
else
@url = eval("admin_#{@app_type}s_path")
end
respond_to do |format|
format.html # index.html.erb
format.js
end
end
def show
get_types
@role_filter = @types.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.js
end
end
def new
get_types
@role_filter = @types.new(:display => 'List')
@verb = :post
respond_to do |format|
format.html # new.html.erb
format.js
end
end
def edit
get_types
@role_filter = @types.find(params[:id])
@url = polymorphic_path([:admin, @role_filter])
@verb = :put
respond_to do |format|
format.html
format.js
end
end
def create
get_types
@role_filter = @types.new(params[:role_filter])
respond_to do |format|
if @role_filter.save
format.html { redirect_to(admin_role_filter_url(params[:role_filter][:role_id])) }
format.js
end
end
end
def update
get_types
@role_filter = @types.find(params[:id])
# debugger
# @url = admin_role_filter_role_filter_path(@role_filter)
# @url = eval("admin_role_filter_#{@app_type}_path(#{@role_filter})")
@url = polymorphic_path([:admin, @role_filter])
respond_to do |format|
if @role_filter.update_attributes(params[:role_filter])
format.html { redirect_to(admin_role_filter_role_filters_url(params[:role_id]), :notice => t('role_filter.update_role_filter_success')) }
# format.xml { head :ok }
format.js
else
format.html { render :action => "edit" }
format.js { render :action => "edit" }
end
end
end
def destroy
get_types
@role_filter = @types.find(params[:id])
@role_filter.disable = @role_filter.disable ? false : true
if @role_filter.save!
respond_to do |format|
format.html { redirect_to(admin_role_filter_role_filters_url) }
# format.xml { head :ok }
format.js
end
else
flash[:error] = t("role_filter.update_failed")
format.html { render :action => "index" }
end
end
protected
def get_types
@types = @app_type.classify.constantize
end
end
@@ -1,9 +0,0 @@
class Admin::RoleStatusesController < Admin::RoleFiltersController
def initialize
super
@app_type = 'role_statuses'
@app_type_name = 'status'
end
end
+37 -35
View File
@@ -17,34 +17,35 @@ class Admin::RolesController < OrbitBackendController
def role_field
@field_name = 'role'
@field_name = 'role'
@attribute = Role.find(params[:role_id])
@attribute = Role.find(params[:role_id])
end
def sub_role
@attribute = Role.find(params[:role_id])
@attribute_fields_upper_object = @attribute.sub_roles
@attribute = Role.find(params[:role_id])
@attribute_fields_upper_object = @attribute.sub_roles
end
def add_sub_role
@attribute = Role.find(params[:role_id])
# @sub_attribute = Role.find(params[:role_id])
@attribute = Role.find(params[:role_id])
# @sub_attribute = Role.find(params[:role_id])
@sub_attribute = SubRole.new
@sub_attribute = SubRole.new
@sub_attribute.role_id = params[:role_id]
end
def edit_sub_role
@sub_attribute = SubRole.find(params[:role_id])
@sub_attribute = SubRole.find(params[:role_id])
@attribute = Role.find(@sub_attribute.role_id)
@attribute = Role.find(@sub_attribute.role_id)
@sub_attribute.role_id = @sub_attribute.role_id
@@ -54,52 +55,53 @@ class Admin::RolesController < OrbitBackendController
@field_name = 'sub_role'
@sub_attribute = SubRole.find(params[:role_id])
@sub_attribute = SubRole.find(params[:role_id])
@attribute = Role.find(@sub_attribute.role_id)
@attribute = Role.find(@sub_attribute.role_id)
end
def add_attribute_field
if params[:sub_role]
if params[:sub_role]
@field_name = 'sub_role'
@field_name = 'sub_role'
attribute = SubRole.find(params[:sub_role][:id]) rescue nil
@attribute_field_counter = attribute.attribute_fields.count
@attribute_field = attribute.attribute_fields.build
@attribute_field.save
attribute = SubRole.find(params[:sub_role][:id]) rescue nil
@attribute_field_counter = attribute.attribute_fields.count
@attribute_field = attribute.attribute_fields.build
@attribute_field.save
@attribute_field[:af_count] = @attribute_field_counter
@attribute_field[:af_count] = @attribute_field_counter
@attribute = SubRole.find(params[:sub_role][:id])
@attribute = SubRole.find(params[:sub_role][:id])
else
else
@field_name = 'role'
@field_name = 'role'
attribute = Role.find(params[:role_id]) rescue nil
@attribute_field_counter = attribute.attribute_fields.count
@attribute_field = attribute.attribute_fields.build
@attribute_field.save
attribute = Role.find(params[:role_id]) rescue nil
@attribute_field_counter = attribute.attribute_fields.count
@attribute_field = attribute.attribute_fields.build
@attribute_field.save
@attribute_field[:af_count] = @attribute_field_counter
@attribute_field[:af_count] = @attribute_field_counter
@attribute = Role.find(params[:role_id])
@attribute = Role.find(params[:role_id])
end
end
respond_to do |format|
respond_to do |format|
format.js { render 'add_attribute_field' }
end
end
end
def new
@attribute = Role.new
if !params[:parent_id]
if !params[:parent_id]
render :template => 'admin/attributes/new'
end
@@ -163,17 +165,17 @@ class Admin::RolesController < OrbitBackendController
def destroy
if params[:sub_role]
if params[:sub_role]
@sub_role = SubRole.find(params[:sub_role][:id])
@sub_role = SubRole.find(params[:sub_role][:id])
respond_to do |format|
if @sub_role.destroy
format.html { redirect_to(admin_role_sub_role_url(@sub_role.role_id)) }
format.html { redirect_to(admin_role_sub_role_url(@sub_role.role_id)) }
end
end
else
else
@attribute = Role.find(params[:id])
@attribute.destroy
@@ -14,16 +14,8 @@ class Admin::SitesController < OrbitBackendController
# @site = Site.new
# end
def show_system_preference
@git_commit_list_file = File.new(OrbitSystemPreference::GitCommitListPath, "r") rescue nil
@db_backup_list_file = File.new(OrbitSystemPreference::ArchiveDbListPath, "r") rescue nil
@resque_logs_file = File.new(OrbitSystemPreference::ResqueLogFile, "r") rescue nil
@site = Site.first
end
def update
@site.update_attributes(params[:site])
site_restart
redirect_to :back
end
@@ -1,6 +1,4 @@
class Admin::UsersNewInterfaceController < OrbitBackendController
helper MemberHelper
layout "new_admin"
# before_filter :authenticate_user!
@@ -25,13 +23,13 @@ class Admin::UsersNewInterfaceController < OrbitBackendController
render case params[:at]
when 'summary'
@users=User.not_guest_user.page(page_num).per(12).asc("_id").includes('avatar')
@users=User.not_guest_user.page(page_num).per(12).includes('avatar')
"index_summary"
when 'thumbnail'
@users=User.not_guest_user.page(page_num).per(36).asc("_id").includes('avatar')
@users=User.not_guest_user.page(page_num).per(36).includes('avatar')
"index_thumbnail"
else
@users=User.not_guest_user.page(page_num).per(10).asc("_id").includes('avatar')
@users=User.not_guest_user.page(page_num).per(10).includes('avatar')
"index"
end
end
@@ -45,7 +43,7 @@ class Admin::UsersNewInterfaceController < OrbitBackendController
@student_data = []
@staff_data = []
attribute_values = @user.attribute_values.asc("_id")
attribute_values = @user.attribute_values
attribute_values.each{|att_val|
@profile_data.push({:name => att_val.attribute_field.title,:value =>att_val.get_value_by_locale(I18n.locale.to_s)}) if att_val.attribute_field.attribute.key=="profile" rescue false
}
@@ -82,29 +80,21 @@ class Admin::UsersNewInterfaceController < OrbitBackendController
end
def create
# puts params.to_yaml
puts params.to_yaml
# attribute_values_key = params[:user].has_key?('new_attribute_values') ? 'new_attribute_values' : 'attribute_values'
# attribute_values = params[:user].delete(attribute_values_key)
@user = User.new(params["user"])
@checkuser = User.where(:user_id => params[:user][:user_id]).first
if !@checkuser.blank?
flash.now[:error] = t("users.user_id_error")
end
# attribute_values.to_hash.each{|key,value|
# @user.attribute_values.build(value)
# }
# @user.rebuild_sub_roles_from_attribute_values!(attribute_values)
# binding.pry
if !flash.now[:error] && @user.save
if @user.save
flash[:notice] = t('create.success.user')
redirect_to :action => :index
else
@user.attribute_values = nil
@form_index = 0
render :action => :new , :notice => flash.now[:error]
render :action => :new
end
end
@@ -120,46 +110,16 @@ class Admin::UsersNewInterfaceController < OrbitBackendController
@form_index = 0
get_info_and_roles
end
def edit_passwd
# @disable_all_field = false
@user = User.find(params[:users_new_interface_id])
end
def update
@user = User.find(params[:id])
if params[:edit_type] == 'edit_passwd'
@checkuser = User.where(:user_id => params[:user][:user_id]).first
if !@checkuser.blank? && @checkuser.id != @user.id
flash.now[:error] = t("users.user_id_error")
elsif @user.admin && current_user.id == @user.id
flash.now[:error] = t("users.admin_change_password")
end
if !flash.now[:error] && @user.update_attributes(params[:user])
redirect_to :action => :show
else
render :action => :edit_passwd, :notice => flash.now[:error]
end
else
@user.update_attributes(params[:user])
attribute_values_key = params[:user].has_key?('new_attribute_values') ? 'new_attribute_values' : 'attribute_values'
attribute_values = params[:user].delete(attribute_values_key)
# @user.rebuild_sub_roles_from_attribute_values!(attribute_values)
@user.save
redirect_to :action => :show
end
@user.update_attributes(params[:user])
attribute_values_key = params[:user].has_key?('new_attribute_values') ? 'new_attribute_values' : 'attribute_values'
attribute_values = params[:user].delete(attribute_values_key)
# @user.rebuild_sub_roles_from_attribute_values!(attribute_values)
@user.save
redirect_to :action => :show
# # Update changes to the avatar
# @user.remove_avatar! if params[:file]
# @user.avatar = params[:file] if params[:file]
+2 -10
View File
@@ -17,15 +17,7 @@ class ApplicationController < ActionController::Base
helper_attr :site_valid_locales
def check_backend_openness
if !Me.backend_openness_on
redirect_to '/users/sign_in' if not (authenticate_user! and is_member? )
end
end
def site_restart
Resque.enqueue(RestartServer)
end
def set_current_user
User.current = current_or_guest_user
@@ -109,10 +101,10 @@ class ApplicationController < ActionController::Base
end
# Render the page
def render_page(args=nil)
def render_page
if @item
respond_to do |format|
format.html { render :text => parse_page_content(@item,args), :layout => 'page_layout' }
format.html { render :text => parse_page_content(@item), :layout => 'page_layout' }
format.rss { render_main_rss }
format.mobile { redirect_to mobile_path(:app => params[:app]) }
end
+2 -3
View File
@@ -36,13 +36,12 @@ class DefaultWidgetController< OrbitWidgetController
result = eval("#{ori_class_name}.where(:#{get_category_field_name(ori_class_name)}.in=>params['category_id'])")
end
date_now = Time.now
result.available_for_lang(I18n.locale).can_display.desc(:is_top, :postdate)
result.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc(:is_top, :postdate)
end
def default_widget
if !params[:id].blank?
clicked_field_name = params["clicked_field_name"].to_sym
redirect_to eval("#{@page_part.module_app.widget_fields_link_method[clicked_field_name][:method]}('#{params[:id]}', {inner: #{params[:inner] || true}})")
redirect_to eval("#{@page_part.module_app.widget_fields_link_method[:title][:method]}('#{params[:id]}', {inner: #{params[:inner] || true}})")
else
@tag_class = nil
@default_widget = @page_part.module_app.get_default_widget
@@ -15,7 +15,6 @@ class OrbitBackendController < ApplicationController
private
def force_order_for_visitor
check_backend_openness
setup_vars
set_current_user
end
+2 -14
View File
@@ -1,15 +1,8 @@
class PagesController < ApplicationController
include ApplicationHelper
before_filter :get_item, :only => [:index_from_link, :show_from_link]
before_filter :check_frontend_open, :only => [:index,:show]
# caches_page :index
def check_frontend_open
if Me.frontend_closed
redirect_to '/admin/dashboards'
end
end
def index
@item = Page.find_by_name('home')
@@ -21,18 +14,14 @@ class PagesController < ApplicationController
end
end
def show
def show
#begin
@item = Item.first(:conditions => {:path => params[:page_name]})
if @item && @item.is_published && (@item.enabled_for.nil? ? true : @item.enabled_for.include?(I18n.locale.to_s))
impressionist(@item)
case @item.class.to_s
when 'Page'
if params[:clicked_field_name]
render_page({"clicked_field_name"=>params["clicked_field_name"]}) unless save_from_no_lang_for_page
else
render_page unless save_from_no_lang_for_page
end
render_page unless save_from_no_lang_for_page
when 'Link'
redirect_to(@item[:url]) unless save_from_no_lang_for_page
end
@@ -65,7 +54,6 @@ class PagesController < ApplicationController
options << "#{options.blank? ? '?' : '&'}tag_id=#{params[:tag_id]}" unless params[:tag_id].blank?
options << "#{options.blank? ? '?' : '&'}preview=#{params[:preview]}" unless params[:preview].blank?
options << "#{options.blank? ? '?' : '&'}controller_action=#{params[:controller_action]}" unless params[:controller_action].blank?
options << "#{options.blank? ? '?' : '&'}clicked_field_name=#{params[:clicked_field_name]}" unless params[:clicked_field_name].blank?
redirect_to(url + options) unless save_from_no_lang_for_page
end
+1 -3
View File
@@ -6,9 +6,7 @@ module DefaultWidgetHelper
def link_to_field(row_data,field, switch, options=nil)
method_ary = @page_part.module_app.widget_fields_link_method
field = field.to_sym
options = options || {}
options[:clicked_field_name] = field
if(method_ary.has_key?(field) and (switch.to_s == "true"))
if(method_ary.has_key?(field) and (switch == true))
url = case method_ary[field][:args]
when nil # no args
get_data_link(method_ary[field][:method], options)
-5
View File
@@ -1,5 +0,0 @@
module MemberHelper
def nl2br(val)
val.gsub(/\r\n/, '<br />').html_safe
end
end
+1 -5
View File
@@ -5,13 +5,9 @@ class BackupServer
#CronMail.time_check("Going to backup Orbit").deliver
dbhost = Mongoid.config.database.connection.primary.join ':'
dbname = Mongoid.config.database.name
archive_db_list_path = OrbitSystemPreference::ArchiveDbListPath
dbdirectory = "#{Rails.root}/tmp/#{dbname}-"+Time.now.strftime("%Y-%m-%d-%H-%M")
%x[mongodump -h #{dbhost} -d #{dbname} -o #{dbdirectory} ]
%x[rm #{archive_db_list_path}]
%x[ls #{Rails.root}/tmp/#{dbname}* | du -h --max-depth=1 --block-size=1M |sort -h >> #{archive_db_list_path}]
OrbitJobLogger.info "DB backup done Path:#{dbdirectory}"
# %x[touch #{Rails.root}/tmp/restart]
end
end
-36
View File
@@ -1,36 +0,0 @@
class DashboardCounter < Resque::Plugins::RestrictionJob
@queue = :high
def self.perform(*args)
site = Site.first
obj = new(*args)
site.dashboard_counter[:visitors_this_week] = obj.display_visitors_this_week
site.dashboard_counter[:visitors_this_month] = obj.display_visitors_this_month
site.dashboard_counter[:visitors_this_year] = obj.display_visitors_this_year
site.save
OrbitJobLogger.info "DashboardCounter done #{site.dashboard_counter.to_s}"
end
def display_visitors(options={})
impressions = Impression.where(options).and(:referrer.ne => nil)
impressions.map{|i| i[:session_hash]}.uniq.count
end
def display_visitors_today
display_visitors(created_at: {'$gte' => Date.today.beginning_of_day, '$lte' => Date.today.end_of_day})
end
def display_visitors_this_week
display_visitors(created_at: {'$gte' => Date.today.beginning_of_week, '$lte' => Date.today.end_of_week})
end
def display_visitors_this_month
display_visitors(created_at: {'$gte' => Date.today.beginning_of_month, '$lte' => Date.today.end_of_month})
end
def display_visitors_this_year
display_visitors(created_at: {'$gte' => Date.today.beginning_of_year, '$lte' => Date.today.end_of_year})
end
end
-46
View File
@@ -1,46 +0,0 @@
class GenerateSystemSummary
@queue = :high
def self.perform()
@site = Site.first
get_disk_free
get_git_log_list
get_package_info
@site.save
end
def self.get_package_info
@info = {}
get_nginx_version
get_MongoDB_version
get_Linux_version
@site.system_package_info = @info
end
def self.get_git_log_list
git_commit_list_path = OrbitSystemPreference::GitCommitListPath
%x[rm #{git_commit_list_path}]
%x[cd #{Rails.root};#{OrbitSystemPreference::GitLogCommend} >>#{git_commit_list_path} ]
end
def self.get_disk_free
@site.disk_space= %x[#{OrbitSystemPreference::DiskFree}]
end
def self.get_nginx_version
@info[:nginx] = %x[#{OrbitSystemPreference::SystemPackage::NginxVersion} ]
end
def self.get_MongoDB_version
@info[:mongodb] = %x[#{OrbitSystemPreference::SystemPackage::MongodbVersion} ]
end
def self.get_Linux_version
@info[:linux] = %x[#{OrbitSystemPreference::SystemPackage::SystemVersion} ]
end
def self.check_system_has_enough_space( limit =OrbitSystemPreference::DefaultDiskSpaceLimit )
binding.pry
end
end
+21
View File
@@ -0,0 +1,21 @@
class NccuCalendar
require 'open-uri'
require 'tempfile'
@queue = :high
def self.perform()
# temp_file = Tempfile.new('new_cal')
# open('http://events.nccu.edu.tw/Month').read{|data|
# temp_file << data
# }
open(File.join(Rails.root, 'public/static', 'nccu_calendar.xml'), 'wb') do |fo|
fo.print open('http://events.nccu.edu.tw/Month').read
end
# FileUtils.mv(temp_file, File.join(Rails.root, 'public/static', 'nccu_calendar.xml'))
puts "[#{ DateTime.now.strftime("%Y %D %H:%M")}]NccuCalendar Synced #{File.join(Rails.root, 'public/static', 'nccu_calendar.xml')}"
end
end
-8
View File
@@ -1,8 +0,0 @@
class RestartServer
@queue = :high
def self.perform()
temp_directory = "#{Rails.root}/tmp/"
%x[touch #{temp_directory}restart.txt ]
end
end
+25
View File
@@ -0,0 +1,25 @@
class SyncDb
@queue = :high
def self.perform()
puts "[ #{DateTime.now.strftime("%Y %D %H:%M") }]\t SyncDb Starting"
self.start_sync
self.set_admin
end
def self.start_sync
task = 'mid_site:sync'
args = []
%x[rake #{task} --trace >> #{Rails.root}/log/rake.log]
User.all.each{|ur| ur.create_dept_cache}
puts "[#{ DateTime.now.strftime("%Y %D %H:%M")}]\tSyncDb Synced"
end
def self.set_admin
task = 'mid_site:install_admin'
args = []
%x[rake #{task} --trace >> #{Rails.root}/log/rake.log]
puts "[#{ DateTime.now.strftime("%Y %D %H:%M")}]\tAdmin done"
end
end
-1
View File
@@ -5,6 +5,5 @@ class UpdateTagCloud
Tag.all.each do |tag|
tag.update_attribute(:cloud_view_count, tag.impressionist_count(:created_at.gte => 14.days.ago, :created_at.lte => Time.now))
end
OrbitJobLogger.info "UpdateTagCloud Done"
end
end
+1 -1
View File
@@ -17,7 +17,7 @@ class Item
validates_format_of :name, :with => /^[0-9a-zA-Z\-_]+$/
# validates :name, :exclusion => { :in => LIST[:forbidden_item_names] }
validates_uniqueness_of :name #, :scope => :parent_id
validates_uniqueness_of :name, :scope => :parent_id
validates_presence_of :name
validates_associated :parent, :children
+1 -8
View File
@@ -11,17 +11,10 @@ class Site
field :roaming_id
field :private_key, :type => Binary
field :public_key, :type => Binary
field :frontend_closed, :type => Boolean, :default => false
field :backend_openness_on, :type => Boolean, :default => false
field :title_always_on, :type => Boolean, :default => false
field :dashbroad_allow_visitor, :type => Boolean, :default => false
field :mail_settings, :type => Hash
field :disk_space, :type => String
field :system_package_info, :type => Hash,:default=>{}
field :school
field :department
+1 -6
View File
@@ -11,14 +11,9 @@ class Role < Attribute
has_many :sub_roles, :autosave => true, :dependent => :destroy
has_many :users
# has_many :statuses, :autosave => true, :dependent => :destroy
has_many :statuses, :autosave => true, :dependent => :destroy
# has_many :attribute_fields, :autosave => true, :dependent => :destroy
has_many :role_statuses, :autosave => true, :dependent => :destroy
has_many :role_categorys, :autosave => true, :dependent => :destroy
accepts_nested_attributes_for :sub_roles, :allow_destroy => true
accepts_nested_attributes_for :role_statuses, :allow_destroy => true
accepts_nested_attributes_for :role_categorys, :allow_destroy => true
def is_built_in?
self.built_in
-14
View File
@@ -1,14 +0,0 @@
class RoleCategory < RoleFilter
has_and_belongs_to_many :users
belongs_to :role
def self.get_role_data(role_key)
@role = Role.where(:key =>role_key).first
return @role.id
end
end
-26
View File
@@ -1,26 +0,0 @@
class RoleFilter
include Mongoid::Document
include Mongoid::Timestamps
# include OrbitCoreLib::ObjectAuthable
include OrbitCoreLib::ObjectDisable
field :key
field :title, localize: true
# belongs_to :role
def pp_object
title
end
def self.from_id(id)
RoleFilter.find(id) rescue nil
end
def self.is_localized?(field_name)
self.fields[field_name.to_s].localized?
end
end
-16
View File
@@ -1,16 +0,0 @@
class RoleStatus < RoleFilter
has_and_belongs_to_many :users
belongs_to :role
scope :can_display,where(disable: false)
def self.get_role_data(role_key)
@role = Role.where(:key =>role_key).first
return @role.id
end
end
+5 -62
View File
@@ -9,13 +9,7 @@ class User
field :admin, :type => Boolean, :default => true
field :active_role
field :user_id
field :sid
field :first_name, localize: true
field :last_name, localize: true
field :email
field :sex, :default => 'unknown'
field :office_tel
field :cache_dept,type: Hash
field :status_record,type: Hash
@@ -31,11 +25,9 @@ class User
# has_many :papers, :autosave => true, :dependent => :destroy
has_and_belongs_to_many :sub_role_tags
# has_and_belongs_to_many :statuses
has_and_belongs_to_many :statuses
has_and_belongs_to_many :roles
has_and_belongs_to_many :sub_roles
has_and_belongs_to_many :role_statuses
has_and_belongs_to_many :role_categorys
accepts_nested_attributes_for :attribute_values, :allow_destroy => true
before_create :initialize_desktop
@@ -44,9 +36,6 @@ class User
scope :remote_account, where(:nccu_id.ne => nil)
scope :not_guest_user, all_of(:name.ne => "guest")
validates :user_id,
:presence => { :message => I18n.t("users.user_id_not_null") } ,
:length => {:minimum => 3, :maximum => 50, :message => I18n.t("users.user_id_length") }
# validates_uniqueness_of :email,:message=> I18n.t("devise.registrations.email_not_unique")
# def new_attribute_values=(vars)
@@ -112,24 +101,6 @@ class User
end
end
def role_status=(var)
self.role_statuses = []
var[:id].each do |id,val|
if (val=="true")
self.role_statuses << RoleStatus.find(id)
end
end
end
def role_category=(var)
self.role_categorys = []
var[:id].each do |id,val|
if (val=="true")
self.role_categorys << RoleCategory.find(id)
end
end
end
def set_sub_role(sub_role_id,status_id)
@@ -173,17 +144,6 @@ class User
}.uniq!
end
def self.get_member_list_attribute_field_name(role_type,field_key)
@attribute = ::Attribute.where(:key => role_type).first
return ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first.title
end
def self.get_member_list_attribute_value(user_id,role_type,field_key)
@attribute = ::Attribute.where(:key => role_type).first
@AttributeField = ::AttributeField.where(:key => field_key, :attribute_id => @attribute.id).first
return ::AttributeValue.where(attribute_field_id: @AttributeField.id, :user_id => user_id).first[I18n.locale.to_s]
end
def create_dept_cache
dept_hash = {}
@@ -210,30 +170,12 @@ class User
(query1 + query2).uniq
end
# def name
# info = Class::Info.first(:conditions => {:key => 'profile'})
# if info
# first_name = get_attribute_values.detect {|value| value.key.to_s.eql?('first_name') }[I18n.locale.to_s] rescue nil
# last_name = get_attribute_values.detect {|value| value.key.to_s.eql?('last_name') }[I18n.locale.to_s] rescue nil
# full_name = "#{last_name} #{first_name}"
# if full_name.strip.empty?
# full_name = email
# end
# return full_name
# else
# return nil
# end
# end
def name
info = Class::Info.first(:conditions => {:key => 'profile'})
if info
# first_name = get_attribute_values.detect {|value| value.key.to_s.eql?('first_name') }[I18n.locale.to_s] rescue nil
# last_name = get_attribute_values.detect {|value| value.key.to_s.eql?('last_name') }[I18n.locale.to_s] rescue nil
# full_name = (I18n.locale != 'zh_tw') ? "#{self.last_name} #{self.first_name}" : "#{self.first_name} #{self.last_name}"
full_name = (I18n.locale.to_s == 'zh_tw') ? "#{self.last_name} #{self.first_name}" : "#{self.first_name} #{self.last_name}"
first_name = get_attribute_values.detect {|value| value.key.to_s.eql?('first_name') }[I18n.locale.to_s] rescue nil
last_name = get_attribute_values.detect {|value| value.key.to_s.eql?('last_name') }[I18n.locale.to_s] rescue nil
full_name = "#{last_name} #{first_name}"
if full_name.strip.empty?
full_name = email
@@ -269,6 +211,7 @@ class User
self.roles = self.roles.uniq
end
def rebuild_status_record
self.status_record = {}
self.attribute_values.reject{|t| t.key!='status'}.each do |status|
@@ -37,8 +37,6 @@
<% if @attribute_type == 'role' %>
<li><%= link_to t(:role_field), eval("admin_#{@attribute_type}_role_field_path(attribute)") %></li>
<li><%= link_to t(:sub_role), eval("admin_#{@attribute_type}_sub_role_path(attribute)") %></li>
<li><%= link_to t(:status), eval("admin_role_statuses_path(:role_id=>attribute)") %></li>
<li><%= link_to t(:category), eval("admin_role_categorys_path(:role_id=>attribute)") %></li>
<% end %>
<li><%= link_to t(:enable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :#{@attribute_type} => {:disabled => true})"), :remote => true, :method => :put, :id => "disable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? 'none' : ''}", :class => 'switch' %></li>
<li><%= link_to t(:disable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :#{@attribute_type} => {:disabled => false})"), :remote => true, :method => :put, :id => "enable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? '' : 'none'}", :class => 'switch' %></li>
@@ -2,14 +2,5 @@
<%= render_node_and_children(Item.first(:conditions => {:parent_id => nil})) %>
</ol>
<script type="text/javascript">
$.ajaxSetup({
error: function(xhr, status, err) {
if (xhr.status == 401){
alert("<%= I18n.t('access.denied.ajax_401_error') %>");
window.location.href = '/';
}
}
});
bindTreeDragHandle();
</script>
+2 -3
View File
@@ -19,6 +19,5 @@
</div>
<% end %>
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
<%= javascript_include_tag "inc/page_widget_edit_interface.js" %>
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
+4
View File
@@ -2,4 +2,8 @@
<%= render 'admin/items/site_map_left_bar' %>
<% end -%>
<%= render 'edit' %>
+1 -2
View File
@@ -112,5 +112,4 @@
</div>
</div>
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
<%= javascript_include_tag "inc/page_widget_edit_interface.js" %>
<%=javascript_include_tag "inc/update_cates_and_tags.js" %>
+1 -1
View File
@@ -3,4 +3,4 @@
<%= render 'admin/items/site_map_left_bar' %>
<% end -%>
<%= render 'edit' %>
<%= render 'edit' %>
@@ -1,31 +0,0 @@
<% # encoding: utf-8 %>
<%= form_for(:role_filter, :remote => true, :url => @url, :method => @verb, :html => { :id => 'form_role_filter' } ) do |f| %>
<h2><%= (@role_filter.new_record? ? 'Add' : 'Edit') %></h2>
<div id="widget-title">
<%= f.label :key %>
<%= f.text_field :key %>
</div>
<div id="widget-title">
<%= f.fields_for :title_translations do |f| %>
<% @site_valid_locales.each do |locale| %>
<div class="control-group">
<%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
<div class="controls">
<%= f.text_field locale, :class =>' input-xxlarge', :value => (@role_filter.title_translations[locale] rescue nil) %>
</div>
</div>
<% end %>
<% end %>
</div>
<div class="form-actions">
<%= f.hidden_field :role_id, :value => params[:role_id] if !params[:role_id].blank? %>
<%= f.submit 'Submit/送出', :class=>'btn btn-primary' %>
</div>
<% end %>
@@ -1,23 +0,0 @@
<tr id="<%= dom_id role_filter %>" class="with_action">
<td>
<%= role_filter.key %>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<% if is_admin?%>
<li><%= link_to t('role_filter.edit'),
polymorphic_path([:admin, role_filter], {:action => :edit}), :remote => true %></li>
<li><%= link_to show_toggle_archive_btn(role_filter),
polymorphic_path([:admin, role_filter]), :confirm => t('sure?'), :method => :delete, :remote => true,:class=>"archive_toggle" %></li>
<% end %>
</ul>
</div>
</td>
<% if @types.is_localized?(:title) %>
<% @site_valid_locales.each do |locale| %>
<td><%= role_filter.title_translations[locale] rescue nil %></td>
<% end %>
<% else %>
<td><%= role_filter.title %></td>
<% end %>
</tr>
@@ -1,2 +0,0 @@
$('<%= j render :partial => 'role_filter', :collection => [@role_filter] %>').appendTo('#role_filters').hide().fadeIn();
$("#form_role_filter")[0].reset();
@@ -1 +0,0 @@
$("#<%= dom_id @role_filter %>").find(".archive_toggle").text("<%= show_toggle_archive_btn(@role_filter) %> ");
-1
View File
@@ -1 +0,0 @@
$("#form > form").replaceWith("<%= j render "form" %>");
@@ -1,49 +0,0 @@
<% content_for :side_bar do %>
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
<% end %>
<div class="subnav">
<ul class="breadcrumb">
<li><%= link_to( t("role"), admin_roles_path ) %> <span class="divider">/</span></li>
<li class="active">( <%= @role.title %> ) <%= t(@app_type_name) %></li>
</ul>
<div id="accordion">
<div class="accordion-group filters">
<div class="table-label">
<table class="table main-list">
<thead>
<tr class="sort-header">
<th id="sort-name" class="sort span1-2 select"><span><a href="#"><%= t('role_filters.key') %><b class="web-symbol"></b></a></span></th>
<% @site_valid_locales.each do |locale| %>
<th id="sort-name" class="sort span1-2 select"><span><a href="#"><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %><b class="web-symbol"></b></a></span></th>
<% end %>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
<table id="role_filters" class="table main-list">
<thead>
<tr>
<th class="span1-2"></th>
<% @site_valid_locales.each do |locale| %>
<th class="span1-2"></th>
<% end %>
</tr>
</thead>
<tbody>
<%= render :partial => 'role_filter', :collection => @role_filters %>
</tbody>
</table>
<div id="form"><%= render :partial => "form" %></div>
-1
View File
@@ -1 +0,0 @@
$("#form > form").replaceWith("<%= j render "form" %>");
@@ -1,4 +0,0 @@
$("#<%= dom_id @role_filter %>").replaceWith("<%= j render :partial => 'role_filter', :collection => [@role_filter] %>");
<% @role_filter = @types.new(:display => 'List') # reset for new form %>
$("#form_role_filter").replaceWith("<%= j render "form" %>")
$("#form_role_filter")[0].reset();
@@ -1,9 +1,3 @@
<% content_for :side_bar do %>
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
<% end %>
<%= form_for @sub_attribute,:url => eval("admin_#{@attribute_type}s_path") ,:class=> "form-horizontal" do |f| %>
<div class="site-map role-block">
<div class="map-block back">
@@ -1,9 +1,3 @@
<% content_for :side_bar do %>
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
<% end %>
<%= form_for @sub_attribute,:url => eval("admin_#{@attribute_type}_path(@attribute)") ,:class=> "form-horizontal" do |f| %>
<div class="site-map role-block">
<div class="map-block back">
@@ -1,47 +0,0 @@
<h1><%= I18n.t("site.system_preference") %></h1>
<ul class="nav nav-tabs" id="myTab">
<li class="active"><a href="#summary" data-toggle="tab"><%= I18n.t("site.system_preference_.tab_summary") %></a></li>
<li><a href="#commits" data-toggle="tab"><%= I18n.t("site.system_preference_.tab_commits") %></a></li>
<li><a href="#backups" data-toggle="tab"><%= I18n.t("site.system_preference_.tab_backups") %></a></li>
<li><a href="#resque_logs" data-toggle="tab"><%= I18n.t("site.system_preference_.tab_logs") %></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active in" id="summary">
<h2><%= I18n.t("site.system_preference_.summary.disk_space") %>:</h2>
<%= content_tag :p,@site.disk_space %>
<h2><%= I18n.t("site.system_preference_.summary.code_update_at") %>: </h2>
<% @site.system_package_info.each do |index,value| %>
<h2><%= index.titleize %> <%= I18n.t("site.system_preference_.summary.version") %>:</h2>
<%= content_tag :p,value %>
<% end %>
<h2><%= I18n.t("site.system_preference_.summary.weekness_report") %>:<%= '' %></h2>
</div>
<div class="tab-pane" id="commits">
<% if @git_commit_list_file %>
<% @git_commit_list_file.lines do |line|%>
<%= (line + "<br/>").html_safe %>
<% end%>
<% else %>
<div class="well"><%= I18n.t("site.system_preference_.summary.no_data") %></div>
<% end %>
</div>
<div class="tab-pane" id="backups">
<%if @db_backup_list_file %>
<% @db_backup_list_file.lines do |line|%>
<%=(line + "<br/>").html_safe %>
<% end %>
<% else %>
<div class="well"><%= I18n.t("site.system_preference_.summary.no_data") %></div>
<% end %>
</div>
<div class="tab-pane" id="resque_logs">
<%if @db_backup_list_file %>
<% @resque_logs_file.lines do |line|%>
<%=(line + "<br/>").html_safe %>
<% end if @resque_logs_file%>
<%else %>
<div class="well"><%= I18n.t("site.system_preference_.summary.no_data") %></div>
<% end %>
</div>
</div>
-8
View File
@@ -35,14 +35,6 @@
</div>
<% end %>
<% end %>
<div class="control-group">
<label class="control-label"><%= t 'site.openness' %></label>
<div class="controls">
<%= f.check_box :frontend_closed %><%= I18n.t('site.frontend_closed') %><br/>
<%= f.check_box :backend_openness_on %><%= I18n.t('site.backend_openness_on') %>
<p class="help-block"><%= (t 'site.search_help').html_safe %></p>
</div>
</div>
<div class="control-group">
<label class="control-label"><%= t 'site.search' %></label>
<div class="controls">
@@ -4,34 +4,12 @@
<div class="groups map-block back <%= role_disable ? 'disabled' : '' %>">
<h4>
<button for=<%=@form_index%> class="onoff pull-right"><%= role_disable ? 'OFF' : 'ON' %></button><span><%= role.title %><%= t(:role_info)%></span>
<button for=<%=@form_index%> class="onoff pull-right"><%= role_disable ? 'OFF' : 'ON' %></button><span><%= role.title %></span>
<%= hidden_field_tag("user[disable_role][id][#{role.id}]",role_disable,:for=>@form_index,:class=>"subrole_disable_field",:value=>role_disable)%>
</h4>
<div class="form-horizontal <%= role_disable ? 'hide' : '' %>">
<% @form_index = @form_index +1 %>
<div class="control-group">
<%= label_tag t(:status), nil, {:func=>"field_label", :for=>"1", :class=>"control-label"} %>
<% role.role_statuses.where(:disable => false).each_with_index do |rrs, i|%>
<%= hidden_field_tag("user[role_status][id][#{rrs.id}]", false,:for=>"#{@form_index}")%>
<%= label_tag(i,check_box_tag( "user[role_status][id][#{rrs.id}]", true, @user.role_statuses.include?(rrs))+rrs.title,:class=>"control-label") %>
<% end %>
</div>
<% @form_index = @form_index +1 %>
<div class="control-group">
<%= label_tag t(:category), nil, {:func=>"field_label", :for=>"1", :class=>"control-label"} %>
<% role.role_categorys.where(:disable => false).each_with_index do |rrcg, i|%>
<%= hidden_field_tag("user[role_category][id][#{rrcg.id}]", false,:for=>"#{@form_index}")%>
<%= label_tag(i,check_box_tag( "user[role_category][id][#{rrcg.id}]", true, @user.role_categorys.include?(rrcg))+rrcg.title,:class=>"control-label") %>
<% end %>
</div>
<% role.attribute_fields.each do |rf|%>
<%= rf.block_helper(@user,@form_index)%>
@@ -1,22 +1,14 @@
<div class="roles <%= show_roles.key %>">
<%= show_roles.title %><%= t(:role_info)%>
<%= show_roles.title %>
<div class="label-line">
<hr />
</div>
<table class="table">
<tbody>
<tr>
<td class="span1"><%= t('status') %></td>
<td><%= show_attribute_value(@user.role_statuses.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
</tr>
<tr>
<td class="span1"><%= t('category') %></td>
<td><%= show_attribute_value(@user.role_categorys.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %></td>
</tr>
<% show_roles.attribute_fields.where(:disabled=>false).each do |rf| %>
<tr>
<td class="span1"><%= rf.title %></td>
<td><%= nl2br(show_attribute_value(@user.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %></td>
<td><%= show_attribute_value(@user.get_attribute_value(rf).get_value_by_locale(I18n.locale)) rescue '' %></td>
</tr>
<% end -%>
<%= render :partial => 'show_sub_role',:collection=> @user.get_sub_roles_by_role(show_roles)%>
@@ -2,6 +2,6 @@
<% show_sub_role.attribute_fields.each do |item|%>
<tr>
<td class="span1"><%= item.title %></td>
<td><%= nl2br(show_attribute_value(@user.get_attribute_value(item).get_value_by_locale(I18n.locale))) rescue '' %></td>
<td><%= show_attribute_value(@user.get_attribute_value(item).get_value_by_locale(I18n.locale)) rescue '' %></td>
</tr>
<% end %>
@@ -1,120 +1,32 @@
<%#= devise_error_messages! %>
<div class="map-block back">
<h4><span><%=t(:sys_basic_form)%></span></h4>
<h4><span><%=t(:sys_basic_form)%></span></h4>
<div class="form-horizontal">
<div class="controls-block" >
<div class="control-group language-swich">
<%= f.label t("users.first_name"),{:class=>"control-label", :func=>"field_label"} %>
<div class="controls">
<div class="tabbable">
<div class="tab-content">
<% @site_valid_locales.each_with_index do |locale, i| %>
<div class="tab-pane fade <%= locale %> user-attribute_values-first_name <%= ( i == 0 ) ? "in active" : '' %>">
<%= f.fields_for :first_name_translations do |f| %>
<%= f.text_field locale, :func=>'input_unit', :value => (@user.first_name_translations[locale] rescue nil) %>
<% end %>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t(:email),:class=>"control-label" %><br />
<div class="controls">
<%= f.email_field :email %>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t(:password),:class=>"control-label" %>
<div class="controls">
<%= f.password_field :password %>
</div>
</div>
</div>
<% end %>
</div>
<ul class="nav nav-pills">
<% @site_valid_locales.each_with_index do |locale, i| %>
<li <%= ( i == 0 ) ? "class=active" : '' %> for="<%= locale %>">
<a data-toggle="tab" href=".user-attribute_values-first_name.<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
<% end %>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="controls-block" >
<div class="control-group language-swich">
<%= f.label t("users.last_name"),{:class=>"control-label", :func=>"field_label"} %>
<div class="controls">
<div class="tabbable">
<div class="tab-content">
<% @site_valid_locales.each_with_index do |locale, i| %>
<div class="tab-pane fade <%= locale %> user-attribute_values-last_name <%= ( i == 0 ) ? "in active" : '' %>">
<%= f.fields_for :last_name_translations do |f| %>
<%= f.text_field locale, :func=>'input_unit', :value => (@user.last_name_translations[locale] rescue nil) %>
<% end %>
</div>
<% end %>
</div>
<ul class="nav nav-pills">
<% @site_valid_locales.each_with_index do |locale, i| %>
<li <%= ( i == 0 ) ? "class=active" : '' %> for="<%= locale %>">
<a data-toggle="tab" href=".user-attribute_values-last_name.<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
<% end %>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t("users.email"),:class=>"control-label" %>
<div class="controls">
<%= f.email_field :email %>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t("users.sid"),:class=>"control-label" %>
<div class="controls">
<%= f.text_field :sid %>
<span>( <%= t("users.sid_note")%> )</span>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t("users.office_tel"),:class=>"control-label" %>
<div class="controls">
<%= f.text_field :office_tel %>
<span>( <%= t("users.office_tel_note")%> )</span>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t("users.avatar"),:class=>"control-label" %>
<div class="controls">
<%= f.file_field :avatar %>
<% if @user.avatar.file %>
<%= f.check_box :remove_avatar %>
<%= t('delete.file') %>
<% end %>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t("users.sex"),:class=>"control-label" %>
<div class="controls">
<label func="input_unit" for="0" class=" radio inline">
<%= f.radio_button :sex, "male" %><%= t('users.male')%>
</label>
<label func="input_unit" for="1" class=" radio inline">
<%= f.radio_button :sex, "female" %><%= t('users.female')%>
</label>
<label func="input_unit" for="2" class=" radio inline">
<%= f.radio_button :sex, "unknown" %><%= t('users.unknown')%>
</label>
</div>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t(:password_confirmation),:class=>"control-label" %>
<div class="controls">
<%= f.password_field :password_confirmation %>
</div>
</div>
</div>
</div>
@@ -1,36 +0,0 @@
<%#= devise_error_messages! %>
<%= flash_messages %>
<div class="map-block back">
<h4><span><%=t(:sys_basic_id_form)%></span></h4>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t("users.user_id"),:class=>"control-label" %>
<%#= f.label t(:user_id),:class=>"control-label" %>
<div class="controls">
<%= f.text_field :user_id %>
<span>( <%= t("users.user_id_note")%> )</span>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t("users.new_password"),:class=>"control-label" %>
<div class="controls">
<%= f.password_field :password %>
<span>( <%= t("users.new_password_note")%> )</span>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="control-group">
<%= f.label t("users.new_password_confirmation"),:class=>"control-label" %>
<div class="controls">
<%= f.password_field :password_confirmation %>
</div>
</div>
</div>
</div>
@@ -18,10 +18,7 @@
<%= link_to user_for_summary.name,admin_users_new_interface_path(user_for_summary)%>
</p>
<div class="user-title">
<% user_for_summary.roles.each do |rf| %>
<% @roledata = Role.find(rf.id) %>
<span><%= @roledata.title %></span>
<% end %>
<span>#TODO 教授兼系主任</span><span>#TODO 大學部校友</span>
</div>
<ul class="user-itemborder clear">
<li class="pull-left"><span>#TODO 258</span>Publications</li>
@@ -5,32 +5,6 @@
</div>
<table class="table">
<tbody>
<tr>
<td class="span1"><%= t('users.first_name')%></td>
<td><%= @user.first_name %></td>
</tr>
<tr>
<td class="span1"><%= t('users.last_name')%></td>
<td><%= @user.last_name %></td>
</tr>
<tr>
<td class="span1"><%= t('users.email')%></td>
<td><%= @user.email %></td>
</tr>
<% if !@user.sid.blank? %>
<tr>
<td class="span1"><%= t('users.sid')%></td>
<td><%= @user.sid %></td>
</tr>
<tr>
<td class="span1"><%= t('users.office_tel')%></td>
<td><%= @user.office_tel %></td>
</tr>
<% end %>
<tr>
<td class="span1"><%= t('users.sex')%></td>
<td><%= t("users.#{@user.sex}") %></td>
</tr>
<% items.each do |item| %>
<tr>
<td class="span1"><%= item[:name] %></td>
@@ -1,32 +0,0 @@
<% content_for :side_bar do %>
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-users', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
<% end %>
<% content_for :page_specific_css do -%>
<%= stylesheet_link_tag "member" %>
<%= stylesheet_link_tag "site-map" %>
<% end -%>
<% content_for :page_specific_javascript do -%>
<%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %>
<%= javascript_include_tag "inc/modal-preview" %>
<%= javascript_include_tag "lib/contenteditable" %>
<%= javascript_include_tag "inc/ploy_input_field" %>
<%= javascript_include_tag "inc/input_module" %>
<%= javascript_include_tag "inc/attribute_panel_select" %>
<%= javascript_include_tag "inc/attribute_onoff" %>
<% end -%>
<%= content_tag :div,:class=>"user-role site-map role-block" do%>
<%= form_for @user, :url => admin_users_new_interface_path(@user), :html => { :multipart => true } do |f| %>
<%= f.error_messages %>
<%= render :partial => 'user_basic_passwd', :locals => {:f => f}%>
<div class="button_bar">
<%= link_back %>
<%= hidden_field_tag 'edit_type', 'edit_passwd' %>
<%= link_to t(:update_), "#", :onclick=>"$('#edit_user_#{@user.id}').submit()" %>
</div>
<% end -%>
<% end -%>
@@ -21,7 +21,6 @@
<%= form_for @user, :url => admin_users_new_interface_index_path, :html => { :multipart => true },:method => :post do |f| %>
<%= f.error_messages %>
<%= render :partial => 'user_basic_passwd', :locals => {:f => f}%>
<%= render :partial => 'user_basic', :locals => {:f => f}%>
<%= render :partial => 'form', :locals => { :f => f } %>
<div class="button_bar">
@@ -39,7 +39,6 @@
<%= @user.email %>
</p>
<%= link_to("<i class='icon-pencil'></i>#{t(:edit)}".html_safe,edit_admin_users_new_interface_path(@user),:class=>"btn btn-small" ) if is_admin?%>
<%= link_to("<i class='icon-pencil'></i>#{t("users.change_passwd")}".html_safe,admin_users_new_interface_edit_passwd_path(@user),:class=>"btn btn-small" ) if is_admin?%>
</div>
<div class="user-roles my_scroll">
<div class="scrollbar">
+6 -2
View File
@@ -2,9 +2,13 @@
<div id="content">
<div id="header" class="hh2">
<div class="dtitle w2 hh2 hp sdm">
<div class="thmtxth sdm_t" id="section_heading"></div>
<div class="admbg sdm_o w2">
<div class="thmtxth sdm_t" id="section_heading">Loading...</div>
<div class="admbg sdm_o">
<ul id="section_list">
<!-- <li><a class="admtxt hp w2 hh2" href="">Campus</a></li>
<li><a class="admtxt hp w2 hh2" href="">Research</a></li>
<li><a class="admtxt hp w2 hh2" href="">Social</a></li>
<li><a class="admtxt hp w2 hh2" href="">Private</a></li> -->
</ul>
</div>
</div>
+1 -1
View File
@@ -1,7 +1,7 @@
<div id="side">
<div id="rwidget" class="wh2 thmc4">
<ul class="docklist">
<li class="d_cate"><a callback-method='initializeDesktop' href="desktop/desktop" class="widget_fn wh2 hh2" id='home' onclick="return false;"><span class="widget_icon"><img src="" alt="Home" id="home_icon" width="30" height="30"/></span></a>
<li class="d_cate"><a callback-method='initializeDesktop' href="desktop/" class="widget_fn wh2 hh2" id='home' onclick="return false;"><span class="widget_icon"><img src="" alt="Home" id="home_icon" width="30" height="30"/></span></a>
<ul class="dock_child hh2 thmc4" style="width: 180px;">
<li class="dock_item"><a callback-method='initializeAppSearch' href="<%= desktop_app_manager_path %>" class="widget_fn wh2 hh2" id="d_app_manager" onclick="return false;"><span class="widget_icon"><img src="" alt="App Manager" id="app_manager_icon" width="30" height="30"/></span></a></li>
<li class="dock_item"><a callback-method='initializeSectionsManager' href="<%= desktop_allsections_path %>" class="widget_fn wh2 hh2" id="d_sections" custom-load="sections" onclick="return false;"><span class="widget_icon"><img src="" alt="All Sections" id="sections_icon" width="30" height="30"/></span></a></li>
+4 -4
View File
@@ -2,10 +2,10 @@
<div class="overview" content-layout="simple" base-width="1000">
<div class="s_title hh2">Section Names</div>
<ul class="s_form" id="desktop_names">
<li class="s_grid_row"><label class="s_grid s_grid_4" for="s_name1">Section 1</label><input id="s_name1" class="s_grid s_grid_8" type="text" value=""></li>
<li class="s_grid_row"><label class="s_grid s_grid_4" for="s_name2">Section 2</label><input id="s_name2" class="s_grid s_grid_8" type="text" value=""></li>
<li class="s_grid_row"><label class="s_grid s_grid_4" for="s_name3">Section 3</label><input id="s_name3" class="s_grid s_grid_8" type="text" value=""></li>
<li class="s_grid_row"><label class="s_grid s_grid_4" for="s_name4">Section 4</label><input id="s_name4" class="s_grid s_grid_8" type="text" value=""></li>
<li class="s_grid_row"><label for="s_name1">Section 1</label><input id="s_name1" type="text" value=""></li>
<li class="s_grid_row"><label for="s_name2">Section 2</label><input id="s_name2" type="text" value=""></li>
<li class="s_grid_row"><label for="s_name3">Section 3</label><input id="s_name3" type="text" value=""></li>
<li class="s_grid_row"><label for="s_name4">Section 4</label><input id="s_name4" type="text" value=""></li>
</ul>
<div class="s_subtitle">sample desciption</div>
<div class="s_action">
+5 -5
View File
@@ -21,7 +21,7 @@
<div class="theme_preview vp thmbgc" style="background-color: #000;" id="theme_preview_area">
<div class="thmtxth hh1 hp" style="margin-left:108px;">Theme Text1</div>
<div class="theme_plate">
<div class="thmc4 h1 wh2"></div>
<div class="thmc4 h1 wh3"></div>
<div class="thmc1 h1 w1"><div class="thmtxt hp">Theme Text2</div></div>
<div class="g_sep h1 op07"></div>
<div class="thmc2 h1 w1"><div class="thmtxt hp">Theme Text</div></div>
@@ -30,10 +30,10 @@
<div>
<table id="color_input" cellpadding="0" cellspacing="0" border="0" width="528" >
<tr>
<th class="s_title size_small hh2" width="190px">Theme Color</th>
<th class="s_title size_small hh2">Line Color</th>
<th class="s_title size_small hh2" width="120px">Text Color</th>
<th class="s_title size_small hh2" width="120px">Background Color</th>
<th class="s_title hh2" width="190px">Theme Color</th>
<th class="s_title hh2">Line Color</th>
<th class="s_title hh2" width="120px">Text Color</th>
<th class="s_title hh2" width="120px">Background Color</th>
</tr>
<tr>
<td>
+7 -12
View File
@@ -2,22 +2,17 @@
<div class="s_title hh2">Password Managment</div>
<%= form_for(resource, :as => resource_name, :url => users_passwd_path(resource_name), :html => { :method => :put, "form-type"=>"ajax_form" ,"callback-method"=>"passwordUpdate" }) do |f| %>
<ul class="s_form">
<li class="s_grid_row">
<%= f.label :current_password, :class => 's_grid s_grid_4' %>
<%= f.password_field :current_password, :class => 's_grid s_grid_8' %>
</li>
<li class="s_grid_row"><%= f.label :current_password %>
<%= f.password_field :current_password %></li>
<li class="s_grid_row">
<%= f.label :password, :class => 's_grid s_grid_4' %>
<%= f.password_field :password, :class => 's_grid s_grid_8' %>
</li>
<li class="s_grid_row"><%= f.label :password %>
<%= f.password_field :password %></li>
<li class="s_grid_row">
<%= f.label :password_confirmation, :class => 's_grid s_grid_4' %>
<%= f.password_field :password_confirmation, :class => 's_grid s_grid_8' %>
</li>
<li class="s_grid_row"><%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation %></li>
</ul>
<div class="s_action"><%= f.submit "Update", :class => "setting_btn thmc1 thmtxt w1 hh1 hp" %></div>
<% end %>
</div>
+2 -2
View File
@@ -11,8 +11,8 @@
<p class="alert hide">You need to sign in or sign up before continuing.</p>
<div class="main">
<div class="control-group clear">
<%= f.label :user_id ,t(:user_id)%>
<%= f.text_field :user_id, :placeholder => t(:email), :style => "width: 330px;" %>
<%= f.label :email ,t(:email)%>
<%= f.text_field :email, :placeholder => t(:email), :style => "width: 330px;" %>
<span class="help-inline">Please correct the error</span>
</div>
<div class="control-group clear">
+4 -7
View File
@@ -1,8 +1,5 @@
<a class="brand dropdown-toggle" data-toggle="dropdown" href="#">Orbit</a>
<% if Me.backend_openness_on %>
<ul class="dropdown-menu">
<li><%= link_to content_tag(:i, nil, :class => 'icons-gauge') + t(:dashboard_), admin_dashboards_path %></li>
<li><%= link_to content_tag(:i, nil, :class => 'icons-users') + t(:member), admin_users_new_interface_index_path %></li>
</ul>
<% end %>
<ul class="dropdown-menu">
<li><%= link_to content_tag(:i, nil, :class => 'icons-gauge') + t(:dashboard_), admin_dashboards_path %></li>
<li><%= link_to content_tag(:i, nil, :class => 'icons-users') + t(:member), admin_users_new_interface_index_path %></li>
</ul>
+2 -2
View File
@@ -38,7 +38,7 @@
<li class="dropdown language">
<a class="dropdown-toggle orbit-bar-language" href="#" data-toggle="dropdown" data-icons="&#xe054;"></a>
<ul class="dropdown-menu language-menu">
<% @site_in_use_locales.compact.each do |locale| %>
<% @site_in_use_locales.each do |locale| %>
<%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil) %>
<% end %>
</ul>
@@ -74,7 +74,7 @@
<li>
<div class="input-prepend">
<span class="add-on"><i class="icon-user"></i></span>
<%= f.text_field :user_id, :class => 'span2', :placeholder => t(:email), :size => 16 %>
<%= f.text_field :email, :class => 'span2', :placeholder => t(:email), :size => 16 %>
</div>
</li>
<li>
+3 -1
View File
@@ -76,4 +76,6 @@ module Orbit
end
end
Orbit_Apps = []
VALID_LOCALES = ["en", "zh_tw"]
VALID_LOCALES = ["en", "zh_tw"]
-2
View File
@@ -5,5 +5,3 @@ YAML::ENGINE.yamler = 'syck'
# Initialize the rails application
Orbit::Application.initialize!
Me = Site.first
OrbitJobLogger = OrbitJobLog.new
+1 -1
View File
@@ -21,7 +21,7 @@ Devise.setup do |config|
# parameters are used only when authenticating and not when retrieving from
# session. If you need permissions, you should implement that in a before filter.
# config.authentication_keys = [ :email ]
config.authentication_keys = [ :user_id ]
config.authentication_keys = [ :email ]
# Tell if authentication through request.params is enabled. True by default.
@@ -1,13 +0,0 @@
module OrbitSystemPreference
ArchiveDbListPath = "#{Rails.root}/log/archive_db.list.log"
GitCommitListPath = "#{Rails.root}/log/git_commit.list.log"
ResqueLogFile ="#{Rails.root}/log/orbit_job.log"
GitLogCommend = 'git log --pretty=format:"%x09%ad%x09%s" --date=short'
DiskFree= 'df -h /'
DefaultDiskSpaceLimit = 3 #in GB
module SystemPackage
MongodbVersion = "mongod --version"
NginxVersion = "nginx -V"
SystemVersion = "uname -a"
end
end
+2 -44
View File
@@ -4,7 +4,6 @@ en:
access:
denied:
ajax_401_error: "User session has been expired,please login again."
app:
not_authed_user: Access Denied for you are not User for this app
not_manager: Access Denied for you are not Manager for this app
@@ -53,7 +52,7 @@ en:
zip: ZIP
addthis_tools:
add_to_bookmark: Add this to bookmark
admin: Super Admin
admin: Admin
all: All
all_content: All Content
all_file: All File
@@ -347,7 +346,6 @@ en:
related_links: Related Links
role: Role
role_field: Role Field
role_info: " Role Info."
roles: Roles
ruling_site: Ruling Site
rulingcom:
@@ -372,36 +370,21 @@ en:
summary: Summary
thumbnail: Thumbnail
site:
backend_openness_on: Backend Openness
default_image: Site default image
description: Site description
description_help: Description Guide
footer: Site footer
footer_help: Footer Guide
frontend_closed: Frontend Closed
header: Site header
info: Site information
keywords: Site keywords
keywords_help: Keyword Guide
language: Site language
mobile_version: Mobile version
openness: Openness
search: Site Search
search_help: Please Enter the search argument for Google search.
settings: Site setting
sub_menu: Site sub-menu
system_preference: System Preference
system_preference_:
tab_backups: Backups
tab_commits: Commits
tab_summary: Summary
tab_logs: Logs
summary:
code_update_at: Code Update histroy
disk_space: Disk Free
no_data: No Data
version: Version
weekness_report: Weekness Report
title: Site Title
title_help: Site Title Guide
site_: Site
@@ -428,8 +411,7 @@ en:
module_page_lang_not_support: "We are sorry, this page is not available for English"
not_previewable: "Preview not support"
preview_only_for_img: "Preview only supprt with file type: jpg, png, gif, bmp"
sys_basic_form: System Default Basic Field
sys_basic_id_form: System Account Info.
sys_basic_form: User system info
system_info: System information
tag_cloud: Tag cloud
tags: Tags
@@ -464,30 +446,6 @@ en:
url: URL
use_status: Use Statue
user: User
users:
admin_change_password: You cannot change your own password here!
avatar: Profile Picture
change_passwd: Change password
email: Email
first_name: First Name
last_name: Last Name
male: Male
name: Name
new_password: New password
new_password_note: At least 6 characters
new_password_confirmation: Confirm new password
female: Female
unknown: Information Not Available
office_tel: Office Tel No.
office_tel_note: Public available
sid: ID No.
sid_note: Faculty ID No. or Student ID No.
sex: Gender
user_id: User Account
user_id_note: Should be more than 3 characters and less than 50 characters
user_id_not_null: User account cannot be null
user_id_length: User account should be more than 3 characters
user_id_error: Someone already use that user account
version: Version
vertical: Vertical
view: View
+15
View File
@@ -0,0 +1,15 @@
en:
ntu:
site_names:
"00": "Dean of General Affairs"
"01": "Documentation Division"
"02": "Cashier Division"
"03": "General Service Division"
"04": "General Affairs Division, College of Social Science"
"05": "Property Management Division"
"06": "Procurement Division"
"07": "Facilities Service Division"
"08": "General Service Division"
"09": "Campus Security"
"10": "Construction and Maintenance Division"
+15
View File
@@ -0,0 +1,15 @@
zh_tw:
ntu:
site_names:
"00": "總務處"
"01": "文書組"
"02": "出納組"
"03": "事務組"
"04": "社科院總務分處"
"05": "保管組"
"06": "採購組"
"07": "經營管理組"
"08": "事務組"
"09": "駐警隊"
"10": "營繕組"
+2 -44
View File
@@ -4,7 +4,6 @@ zh_tw:
access:
denied:
ajax_401_error: 使用者已逾時或是登出,請重新登入
app:
not_authed_user: 拒絕存取,因你不是此應用程式授權使用者
not_manager: 拒絕存取,因你不是此應用程式管理員
@@ -53,7 +52,7 @@ zh_tw:
zip: 郵遞區號
addthis_tools:
add_to_bookmark: 加入書籤
admin: 系統管理者
admin: 管理員
all: 全部
all_content: 所有內容
all_file: 所有檔案
@@ -347,7 +346,6 @@ zh_tw:
related_links: 相關連結
role: 身份
role_field: 身份欄位
role_info: 身份資料
Roles: 身份
ruling_site: 銳綸網站
rulingcom:
@@ -372,8 +370,6 @@ zh_tw:
summary: 摘要
thumbnail: 縮圖
site:
frontend_closed: 前台關閉?
backend_openness_on: 開啟開放式後台(訪客可遊覽)
default_image: 預設圖像
description: 網站描述
description_help: 網站描述說明
@@ -385,23 +381,10 @@ zh_tw:
keywords_help: 關鍵字說明
language: 網站語言
mobile_version: 手機版
openness: 開放模式
search: 網站搜尋
search_help: 請輸入送交Google搜尋的參數
settings: 基本設定
sub_menu: 次選單
system_preference: 系統狀態
system_preference_:
tab_backups: 備份記錄
tab_commits: 程式版本
tab_summary: 總覽
tab_logs: 登錄檔
summary:
code_update_at: 程式更新紀錄
disk_space: 硬碟空間
no_data: 沒有資訊
version: 版本
weekness_report: 弱點掃瞄資訊
title: 網站標題
title_help: 網站標題說明
site_: 網站
@@ -428,8 +411,7 @@ zh_tw:
module_page_lang_not_support: "很抱歉,此頁面沒有開放中文版本"
not_previewable: "不支援預覽"
preview_only_for_img: "預覽僅支援:jpg,png,gif,bmp等圖片格式"
sys_basic_form: 系統預設基本欄位
sys_basic_id_form: 系統帳號資料
sys_basic_form: 系統使用者資訊
system_info: 系統資訊
tag_cloud: 標籤雲
tags: 標籤
@@ -464,30 +446,6 @@ zh_tw:
url: 網址
use_status: 使用狀態
user: 使用者
users:
admin_change_password: 您不能在此處修改自己的密碼!
avatar: 大頭貼照
change_passwd: 變更密碼
email: 電子郵件
first_name: 名字
male: 男性
name: 姓名
new_password: 新密碼
new_password_note: 至少6個字元
new_password_confirmation: 確認新密碼
female: 女性
unknown: 未知
last_name: 姓氏
office_tel: 辦公室電話
office_tel_note: 將公開於網頁
sid: 編號
sid_note: 教職員工編號或學生學號
sex: 性別
user_id: 使用者帳號
user_id_note: 需介於3個字元至50個字元之間
user_id_not_null: 使用者帳號不能是空值
user_id_length: 使用者帳號至少需要3個字元
user_id_error: 該使用者帳號已被使用
version: 版本
vertical: 垂直的
view: 檢視
+15 -20
View File
@@ -1,36 +1,31 @@
rails_env = ENV['RAILS_ENV'] || "production"
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/..'
user_home = ENV['HOME'] || File.dirname(__FILE__) + '/../..'
development_uid = ''
development_gid = ''
#developer pls change here
rails_root = "/home/nccu/stage/NCCU" #keep this blank when development
development_uid = 'kaito' #when dev
development_gid = 'staff' #when dev
#rails_env = "developement"
rails_env = "production"
development_rails_root = File.expand_path("..",File.dirname(__FILE__))
#rails_root = (rails_env == 'production' )? production_rails_root : development_rails_root
num_workers = rails_env == 'production' ? 5 : 2
num_workers.times do |num|
God.watch do |w|
w.dir = rails_root
w.name = "worker-#{num}"
w.group = 'resque'
w.name = "resque-#{num}"
w.group = 'resque-stage'
w.interval = 30.seconds
queue = case num
when 0
'critical'
when 1..2
'high,low'
when 3..num_workers
'low'
end
w.env = {"QUEUE"=>queue, "RAILS_ENV"=>rails_env}
w.start = "HOME=#{user_home} QUEUE=* RAILS_ENV=#{rails_env}" rake -f #{rails_root}/Rakefile resque:work
w.env = {"QUEUE"=>"critical,high,low", "RAILS_ENV"=>rails_env}
w.start = "rake -f #{rails_root}/Rakefile resque:work QUEUE=* RAILS_ENV=#{rails_env}"
w.uid = (rails_env == 'production' )? "root" : development_uid
w.gid = (rails_env == 'production' )? "root" : development_gid
w.log = (rails_env == 'production' )? "/var/log/#{w.group}/#{w.name}.log":"#{rails_root}/log/dev_resque-#{w.name}.log"
w.log = (rails_env == 'production' )? "/var/log/#{w.name}-stage.log":"#{rails_root}/log/#{w.name}.log"
# restart if memory gets too high
w.transition(:up, :restart) do |on|
+14 -8
View File
@@ -1,21 +1,27 @@
rails_env = ENV['RAILS_ENV'] || "production"
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/..'
user_home = ENV['HOME'] || File.dirname(__FILE__) + '/../..'
development_uid = ''
development_gid = ''
#developer pls change here
rails_root = "/home/nccu/NCCU/" #keep this blank when development
development_uid = 'kaito' #when dev
development_gid = 'staff' #when dev
#rails_env = "developement"
rails_env = "production"
development_rails_root = File.expand_path("..",File.dirname(__FILE__))
#rails_root = (rails_env == 'production' )? production_rails_root : development_rails_root
God.watch do |w|
w.dir = rails_root
w.name = "scheduler"
w.name = "resque-scheduler"
w.group = 'resque'
w.interval = 30.seconds
w.env = {"QUEUE"=>"critical,high,low", "RAILS_ENV"=>rails_env}
w.start = "HOME= #{user_home} QUEUE=* RAILS_ENV=#{rails_env}" rake -f #{rails_root}/Rakefile resque:scheduler
w.start = "rake -f #{rails_root}/Rakefile resque:scheduler RAILS_ENV=#{rails_env}"
w.uid = (rails_env == 'production' )? "root" : development_uid
w.gid = (rails_env == 'production' )? "root" : development_gid
w.log = (rails_env == 'production' )? "/var/log/#{w.group}/#{w.name}.log":"#{rails_root}/log/dev_resque-#{w.name}.log"
w.log = (rails_env == 'production' )? "/var/log/#{w.name}.log":"#{rails_root}/log/#{w.name}.log"
# restart if memory gets too high
w.transition(:up, :restart) do |on|
+6 -6
View File
@@ -1,11 +1,11 @@
# do_mail_matt:
# every: 10s
# class: FetchTime
# args:
# description: Runs the perform method in FetchTime
update_tag_cloud:
cron: 0 0 [0,12] * * *
class: UpdateTagCloud
args:
description: UpdateTagCloud
generate_system_summary:
cron: 0 0 12 * * *
class: GenerateSystemSummary
args:
description: Generate the system status such as disk free space,package version list for showing at site tab
-9
View File
@@ -6,7 +6,6 @@ Orbit::Application.routes.draw do
end
mount Resque::Server, :at => "/admin/resque"
mount Rack::GridFS::Endpoint.new(:db => Mongoid.database,:lookup=>:path), :at => "gridfs"
# routes for sinatra app
match '/site/set_registered', :to => CentralServerExchangeApp
@@ -18,7 +17,6 @@ Orbit::Application.routes.draw do
# routes for admin
namespace :admin do
match 'system_preference' => "sites#show_system_preference",:as=>"system_preference"
mount Resque::Server.new, :at => "/resque"
resources :assets do
collection do
@@ -136,18 +134,12 @@ Orbit::Application.routes.draw do
resources :roles do
get 'role_field'
get 'sub_role_field'
get 'role_status'
get 'role_category'
get 'sub_role'
get 'add_sub_role'
get 'edit_sub_role'
get 'add_attribute_field'
end
resources :role_filters
resources :role_statuses
resources :role_categorys
resources :sites do
get 'mail_setting'
get 'site_info'
@@ -166,7 +158,6 @@ Orbit::Application.routes.draw do
member do
get 'temp_edit'
end
match "edit_passwd" => "users_new_interface#edit_passwd" ,:as => :edit_passwd
end
resources :member_selects do
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-32
View File
@@ -1,32 +0,0 @@
class OrbitJobLog < Logger
FORMAT = "%m/%d/%Y %H:%M%p: "
def initialize
case Rails.env
when 'production'
# Logger::Syslog.new("orbit_routine", Syslog::LOG_LOCAL5)
super(Orbit::Application.config.root.to_s+'/log/orbit_job.log','daily')
when 'development'
super(Orbit::Application.config.root.to_s+'/log/orbit_job.dev.log','daily')
end
end
def debug(msg)
super(Time.now.strftime()+msg)
end
def info(msg)
super(Time.now.strftime(FORMAT)+msg)
end
def warn(msg)
super(Time.now.strftime(FORMAT)+msg)
end
def error(msg)
super(Time.now.strftime(FORMAT)+msg)
end
def fatal(msg)
super(Time.now.strftime(FORMAT)+msg)
end
end
+2 -2
View File
@@ -242,7 +242,7 @@ module ParserCommon
categories_str = "&#{categories_str}" unless categories_str.blank?
tags_str = "&#{tags_str}" unless tags_str.blank?
ret << "?inner=true&page_id=#{page.id}#{categories_str}#{tags_str}&preview=#{params[:preview]}&page_main=#{params[:page_main]}&search_query=#{params[:search_query]}&clicked_field_name=#{params[:clicked_field_name]}&name=#{params[:name]}&item_type=page"
ret << "?inner=true&page_id=#{page.id}#{categories_str}#{tags_str}&preview=#{params[:preview]}&page_main=#{params[:page_main]}&search_query=#{params[:search_query]}&name=#{params[:name]}&item_type=page"
ret << "'></div>"
else
part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil
@@ -270,7 +270,7 @@ module ParserCommon
categories_str = "&#{categories_str}" unless categories_str.blank?
tags_str = "&#{tags_str}" unless tags_str.blank?
options = "&part_id=#{part.id}#{categories_str}#{tags_str}&page=#{params[:page]}&search_query=#{params[:search_query]}&clicked_field_name=#{params[:clicked_field_name]}&part_title=#{Rack::Utils.escape(part_title).gsub("+", "%20") rescue nil}&item_type=page_part"
options = "&part_id=#{part.id}#{categories_str}#{tags_str}&page=#{params[:page]}&search_query=#{params[:search_query]}&part_title=#{Rack::Utils.escape(part_title).gsub("+", "%20") rescue nil}&item_type=page_part"
ret << "<div class='dymanic_load widget' path='#{url + options}'></div>"
when 'public_r_tag'
ret << "<r:#{part.public_r_tag} id='#{part.public_r_tag_object_id}'/>"
Loaded 100 of 283 files, more files were not shown because too many files have changed in this diff. Show more