merging
This commit is contained in:
commit
3182f5c9a8
|
@ -16,3 +16,4 @@
|
||||||
//= require orbitdesktop
|
//= require orbitdesktop
|
||||||
//= require jquery.gridster
|
//= require jquery.gridster
|
||||||
//= require desktop/books_pages
|
//= require desktop/books_pages
|
||||||
|
//= require jquery.tokeninput
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -310,11 +310,16 @@ var orbitDesktop = function(dom){
|
||||||
column_container.empty();
|
column_container.empty();
|
||||||
$("div[container=true]").html(h);
|
$("div[container=true]").html(h);
|
||||||
$("div[container=true] div.overview").html(temp_div.html());
|
$("div[container=true] div.overview").html(temp_div.html());
|
||||||
|
if(isNaN(base_width)){
|
||||||
|
o.tinyscrollbar_ext({
|
||||||
|
main : ".tinycanvas",
|
||||||
|
})
|
||||||
|
}else{
|
||||||
o.tinyscrollbar_ext({
|
o.tinyscrollbar_ext({
|
||||||
main : ".tinycanvas",
|
main : ".tinycanvas",
|
||||||
fill : base_width * total_columns
|
fill : base_width * total_columns
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.menu_item = function(dom,customload,submenuitem){
|
this.menu_item = function(dom,customload,submenuitem){
|
||||||
if(!customload)customload=false;
|
if(!customload)customload=false;
|
||||||
|
@ -395,8 +400,21 @@ var orbitDesktop = function(dom){
|
||||||
|
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
|
// $('*[content-type=menu] a').removeClass('thmc1 thmtxt active');
|
||||||
|
// dom.addClass('thmc1 thmtxt active');
|
||||||
|
o.highlight_sub_menu_item(dom);
|
||||||
|
}
|
||||||
|
this.highlight_sub_menu_item = function(no){
|
||||||
$('*[content-type=menu] a').removeClass('thmc1 thmtxt active');
|
$('*[content-type=menu] a').removeClass('thmc1 thmtxt active');
|
||||||
|
var dom;
|
||||||
|
if(typeof no == "number"){
|
||||||
|
dom = $('*[content-type=menu] a').eq(no);
|
||||||
dom.addClass('thmc1 thmtxt active');
|
dom.addClass('thmc1 thmtxt active');
|
||||||
|
}else if(typeof no == "object"){
|
||||||
|
dom = no;
|
||||||
|
dom.addClass('thmc1 thmtxt active');
|
||||||
|
}
|
||||||
|
return dom;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initializeDesktop = function(target,url,cache){ //this is for initializing main desktops that are sections and tiles
|
this.initializeDesktop = function(target,url,cache){ //this is for initializing main desktops that are sections and tiles
|
||||||
|
|
|
@ -0,0 +1,122 @@
|
||||||
|
/* Example tokeninput style #2: Facebook style */
|
||||||
|
ul.token-input-list-facebook {
|
||||||
|
overflow: hidden;
|
||||||
|
height: auto !important;
|
||||||
|
height: 1%;
|
||||||
|
width: 400px;
|
||||||
|
border: 1px solid #8496ba;
|
||||||
|
cursor: text;
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: Verdana, sans-serif;
|
||||||
|
min-height: 1px;
|
||||||
|
z-index: 999;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
list-style-type: none;
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.token-input-list-facebook li input {
|
||||||
|
border: 0;
|
||||||
|
width: 100px;
|
||||||
|
padding: 3px 8px;
|
||||||
|
background-color: white;
|
||||||
|
margin: 2px 0;
|
||||||
|
-webkit-appearance: caret;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-token-facebook {
|
||||||
|
overflow: hidden;
|
||||||
|
height: auto !important;
|
||||||
|
height: 15px;
|
||||||
|
margin: 3px;
|
||||||
|
padding: 1px 3px;
|
||||||
|
background-color: #eff2f7;
|
||||||
|
color: #000;
|
||||||
|
cursor: default;
|
||||||
|
border: 1px solid #ccd5e4;
|
||||||
|
font-size: 11px;
|
||||||
|
border-radius: 5px;
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
-webkit-border-radius: 5px;
|
||||||
|
float: left;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-token-facebook p {
|
||||||
|
display: inline;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-token-facebook span {
|
||||||
|
color: #a6b3cf;
|
||||||
|
margin-left: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-selected-token-facebook {
|
||||||
|
background-color: #5670a6;
|
||||||
|
border: 1px solid #3b5998;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-input-token-facebook {
|
||||||
|
float: left;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-facebook {
|
||||||
|
position: absolute;
|
||||||
|
width: 400px;
|
||||||
|
background-color: #fff;
|
||||||
|
overflow: hidden;
|
||||||
|
border-left: 1px solid #ccc;
|
||||||
|
border-right: 1px solid #ccc;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
cursor: default;
|
||||||
|
font-size: 11px;
|
||||||
|
font-family: Verdana, sans-serif;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-facebook p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #777;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-facebook ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-facebook ul li {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 3px;
|
||||||
|
margin: 0;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-facebook ul li.token-input-dropdown-item-facebook {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-facebook ul li.token-input-dropdown-item2-facebook {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-facebook ul li em {
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-facebook ul li.token-input-selected-dropdown-item-facebook {
|
||||||
|
background-color: #3b5998;
|
||||||
|
color: #fff;
|
||||||
|
}
|
|
@ -0,0 +1,204 @@
|
||||||
|
/* Example tokeninput style #2: Mac Style */
|
||||||
|
fieldset.token-input-mac {
|
||||||
|
position: relative;
|
||||||
|
padding: 0;
|
||||||
|
margin: 5px 0;
|
||||||
|
background: #fff;
|
||||||
|
width: 400px;
|
||||||
|
border: 1px solid #A4BDEC;
|
||||||
|
border-radius: 10px;
|
||||||
|
-moz-border-radius: 10px;
|
||||||
|
-webkit-border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
fieldset.token-input-mac.token-input-dropdown-mac {
|
||||||
|
border-radius: 10px 10px 0 0;
|
||||||
|
-moz-border-radius: 10px 10px 0 0;
|
||||||
|
-webkit-border-radius: 10px 10px 0 0;
|
||||||
|
box-shadow: 0 5px 20px 0 rgba(0,0,0,0.25);
|
||||||
|
-moz-box-shadow: 0 5px 20px 0 rgba(0,0,0,0.25);
|
||||||
|
-webkit-box-shadow: 0 5px 20px 0 rgba(0,0,0,0.25);
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.token-input-list-mac {
|
||||||
|
overflow: hidden;
|
||||||
|
height: auto !important;
|
||||||
|
height: 1%;
|
||||||
|
cursor: text;
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: Verdana, sans-serif;
|
||||||
|
min-height: 1px;
|
||||||
|
z-index: 999;
|
||||||
|
margin: 0;
|
||||||
|
padding: 3px;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.token-input-list-mac.error {
|
||||||
|
border: 1px solid #C52020;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.token-input-list-mac li {
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-token-mac p {
|
||||||
|
display: inline;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-token-mac span {
|
||||||
|
color: #a6b3cf;
|
||||||
|
margin-left: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TOKENS */
|
||||||
|
|
||||||
|
li.token-input-token-mac {
|
||||||
|
font-family: "Lucida Grande", Arial, sans-serif;
|
||||||
|
font-size: 9pt;
|
||||||
|
line-height: 12pt;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 16px;
|
||||||
|
margin: 3px;
|
||||||
|
padding: 0 10px;
|
||||||
|
background: none;
|
||||||
|
background-color: #dee7f8;
|
||||||
|
color: #000;
|
||||||
|
cursor: default;
|
||||||
|
border: 1px solid #a4bdec;
|
||||||
|
border-radius: 15px;
|
||||||
|
-moz-border-radius: 15px;
|
||||||
|
-webkit-border-radius: 15px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-highlighted-token-mac {
|
||||||
|
background-color: #bbcef1;
|
||||||
|
border: 1px solid #598bec;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-selected-token-mac {
|
||||||
|
background-color: #598bec;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-highlighted-token-mac span.token-input-delete-token-mac {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-selected-token-mac span.token-input-delete-token-mac {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-input-token-mac {
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
float: left;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-input-token-mac input {
|
||||||
|
border: 0;
|
||||||
|
width: 100px;
|
||||||
|
padding: 3px;
|
||||||
|
background-color: transparent;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-mac {
|
||||||
|
position: absolute;
|
||||||
|
border: 1px solid #A4BDEC;
|
||||||
|
border-top: none;
|
||||||
|
left: -1px;
|
||||||
|
right: -1px;
|
||||||
|
background-color: #fff;
|
||||||
|
overflow: hidden;
|
||||||
|
cursor: default;
|
||||||
|
font-size: 10pt;
|
||||||
|
font-family: "Lucida Grande", Arial, sans-serif;
|
||||||
|
padding: 5px;
|
||||||
|
border-radius: 0 0 10px 10px;
|
||||||
|
-moz-border-radius: 0 0 10px 10px;
|
||||||
|
-webkit-border-radius: 0 0 10px 10px;
|
||||||
|
box-shadow: 0 5px 20px 0 rgba(0,0,0,0.25);
|
||||||
|
-moz-box-shadow: 0 5px 20px 0 rgba(0,0,0,0.25);
|
||||||
|
-webkit-box-shadow: 0 5px 20px 0 rgba(0,0,0,0.25);
|
||||||
|
clip:rect(0px, 1000px, 1000px, -10px);
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-mac p {
|
||||||
|
font-size: 8pt;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 5px;
|
||||||
|
font-style: italic;
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-mac h3.token-input-dropdown-category-mac {
|
||||||
|
font-family: "Lucida Grande", Arial, sans-serif;
|
||||||
|
font-size: 10pt;
|
||||||
|
font-weight: bold;
|
||||||
|
border: none;
|
||||||
|
padding: 0 5px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-mac ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-mac ul li {
|
||||||
|
list-style-type: none;
|
||||||
|
cursor: pointer;
|
||||||
|
background: none;
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 0 0 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-mac ul li.token-input-dropdown-item-mac {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-mac ul li.token-input-dropdown-item-mac.odd {
|
||||||
|
background-color: #ECF4F9;
|
||||||
|
border-radius: 15px;
|
||||||
|
-moz-border-radius: 15px;
|
||||||
|
-webkit-border-radius: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-mac ul li.token-input-dropdown-item-mac span.token-input-dropdown-item-description-mac {
|
||||||
|
float: right;
|
||||||
|
font-size: 8pt;
|
||||||
|
font-style: italic;
|
||||||
|
padding: 0 10px 0 0;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-mac ul li strong {
|
||||||
|
font-weight: bold;
|
||||||
|
text-decoration: underline;
|
||||||
|
font-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-mac ul li.token-input-selected-dropdown-item-mac,
|
||||||
|
div.token-input-dropdown-mac ul li.token-input-selected-dropdown-item-mac.odd {
|
||||||
|
background-color: #598bec;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 15px;
|
||||||
|
-moz-border-radius: 15px;
|
||||||
|
-webkit-border-radius: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown-mac ul li.token-input-selected-dropdown-item-mac span.token-input-dropdown-item-description-mac,
|
||||||
|
div.token-input-dropdown-mac ul li.token-input-selected-dropdown-item-mac.odd span.token-input-dropdown-item-description-mac {
|
||||||
|
color: #fff;
|
||||||
|
}
|
|
@ -0,0 +1,127 @@
|
||||||
|
/* Example tokeninput style #1: Token vertical list*/
|
||||||
|
ul.token-input-list {
|
||||||
|
overflow: hidden;
|
||||||
|
height: auto !important;
|
||||||
|
height: 1%;
|
||||||
|
width: 400px;
|
||||||
|
border: 1px solid #999;
|
||||||
|
cursor: text;
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: Verdana, sans-serif;
|
||||||
|
z-index: 999;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
list-style-type: none;
|
||||||
|
clear: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.token-input-list li {
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.token-input-list li input {
|
||||||
|
border: 0;
|
||||||
|
width: 350px;
|
||||||
|
padding: 3px 8px;
|
||||||
|
background-color: white;
|
||||||
|
-webkit-appearance: caret;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.token-input-disabled,
|
||||||
|
ul.token-input-disabled li input {
|
||||||
|
background-color: #E8E8E8;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.token-input-disabled li.token-input-token {
|
||||||
|
background-color: #D9E3CA;
|
||||||
|
color: #7D7D7D
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.token-input-disabled li.token-input-token span {
|
||||||
|
color: #CFCFCF;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-token {
|
||||||
|
overflow: hidden;
|
||||||
|
height: auto !important;
|
||||||
|
height: 1%;
|
||||||
|
margin: 3px;
|
||||||
|
padding: 3px 5px;
|
||||||
|
background-color: #d0efa0;
|
||||||
|
color: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
cursor: default;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-token p {
|
||||||
|
float: left;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-token span {
|
||||||
|
float: right;
|
||||||
|
color: #777;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-selected-token {
|
||||||
|
background-color: #08844e;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.token-input-selected-token span {
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown {
|
||||||
|
position: absolute;
|
||||||
|
width: 400px;
|
||||||
|
background-color: #fff;
|
||||||
|
overflow: hidden;
|
||||||
|
border-left: 1px solid #ccc;
|
||||||
|
border-right: 1px solid #ccc;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
cursor: default;
|
||||||
|
font-size: 12px;
|
||||||
|
font-family: Verdana, sans-serif;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #777;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown ul li {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 3px;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown ul li.token-input-dropdown-item {
|
||||||
|
background-color: #fafafa;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown ul li.token-input-dropdown-item2 {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown ul li em {
|
||||||
|
font-weight: bold;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.token-input-dropdown ul li.token-input-selected-dropdown-item {
|
||||||
|
background-color: #d0efa0;
|
||||||
|
}
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="tinycanvas vp">
|
<div class="tinycanvas vp">
|
||||||
<div class="scrollbar sb_v vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
<div class="scrollbar sb_v vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||||
<div class="viewport">
|
<div class="viewport">
|
||||||
<div class="overview" content-layout="simple" base-width="1000">
|
<div class="overview" content-layout="simple">
|
||||||
<div id="st1" class="st_c">
|
<div id="st1" class="st_c">
|
||||||
<div class="theme_list ssl">
|
<div class="theme_list ssl">
|
||||||
<% @themes.each do |theme| %>
|
<% @themes.each do |theme| %>
|
||||||
|
|
4
vendor/built_in_modules/gallery/app/assets/stylesheets/gallery_frontend.css
vendored
Executable file → Normal file
4
vendor/built_in_modules/gallery/app/assets/stylesheets/gallery_frontend.css
vendored
Executable file → Normal file
|
@ -231,7 +231,7 @@
|
||||||
.slidelist {
|
.slidelist {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 30px;
|
bottom: 30px;
|
||||||
z-index: 99;
|
z-index: 98;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 0;
|
height: 0;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
@ -251,7 +251,7 @@
|
||||||
border: solid 2px #fff;
|
border: solid 2px #fff;
|
||||||
display: block;
|
display: block;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
height: 90px;
|
height: 96px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
box-shadow: 0 0 6px rgba(0,0,0,0.7);
|
box-shadow: 0 0 6px rgba(0,0,0,0.7);
|
||||||
|
|
8
vendor/built_in_modules/gallery/app/assets/stylesheets/widget_gallery.css
vendored
Executable file → Normal file
8
vendor/built_in_modules/gallery/app/assets/stylesheets/widget_gallery.css
vendored
Executable file → Normal file
|
@ -32,9 +32,13 @@
|
||||||
.w1.c4 li { width: 23%; }
|
.w1.c4 li { width: 23%; }
|
||||||
.w1.c5 li { width: 18%; }
|
.w1.c5 li { width: 18%; }
|
||||||
.w1.c6 li { width: 14.6666%; }
|
.w1.c6 li { width: 14.6666%; }
|
||||||
|
.w1 li a {
|
||||||
|
-webkit-transition: opacity 0.3s ease;
|
||||||
|
-moz-transition: opacity 0.3s ease;
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
}
|
||||||
.w1 li a:hover {
|
.w1 li a:hover {
|
||||||
box-shadow: 0 0 20px rgba(0,0,0,0.9);
|
opacity: 0.8;
|
||||||
outline: solid 4px #429DFF;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.w1 li a img {
|
.w1 li a img {
|
||||||
|
|
|
@ -23,13 +23,24 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
|
||||||
@writing_conference = WritingConference.new
|
@writing_conference = WritingConference.new
|
||||||
@paper_types = ConferencePaperType.all
|
@paper_types = ConferencePaperType.all
|
||||||
@author_types = ConferenceAuthorType.all
|
@author_types = ConferenceAuthorType.all
|
||||||
#@co_author_candidate =
|
|
||||||
# CoAuthor.where(name_id: current_user.id).map{|c|c.co_author}
|
@conference_candidate =
|
||||||
#@conference_candidate =
|
WritingConference.where(create_user_id: current_user.id).map{|j|j.conference_title}.uniq
|
||||||
# WritingConference.where(create_user_id: current_user.id).map{|j|j.conference_title}.uniq
|
|
||||||
|
if (not params[:q].nil?) and (current_user.name.include?params[:q])
|
||||||
|
@user = [{ :id => 0, :name => current_user.name}] # self account name
|
||||||
|
else
|
||||||
|
@user = []
|
||||||
|
end
|
||||||
|
|
||||||
|
@co_authors = ConferenceCoAuthor.where(name_id: current_user.id, :co_author => /#{params[:q]}/)
|
||||||
|
@co_authors = [{ :id => params[:q], :name => params[:q] }] + # search string
|
||||||
|
@user + # self account name
|
||||||
|
@co_authors.map{|m| { :id => m.id, :name => m.co_author } } # match pattern
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :layout => false}
|
format.html { render :layout => false}
|
||||||
|
format.json { render :json => @co_authors.to_json }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -47,7 +58,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
|
||||||
@writing_conference = WritingConference.new(params[:writing_conference])
|
@writing_conference = WritingConference.new(params[:writing_conference])
|
||||||
|
|
||||||
if @writing_conference.save
|
if @writing_conference.save
|
||||||
render json: {success: true, msg: t('create.success.paper')}.to_json
|
render json: {success: true, msg: t('create_success')}.to_json
|
||||||
else
|
else
|
||||||
error_msg = @writing_conference.errors.full_messages.join("<br />")
|
error_msg = @writing_conference.errors.full_messages.join("<br />")
|
||||||
render json: {success: false, msg: error_msg}.to_json
|
render json: {success: false, msg: error_msg}.to_json
|
||||||
|
@ -59,7 +70,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
|
||||||
@writing_conference= WritingConference.find(params[:id])
|
@writing_conference= WritingConference.find(params[:id])
|
||||||
|
|
||||||
if @writing_conference.update_attributes(params[:writing_conference])
|
if @writing_conference.update_attributes(params[:writing_conference])
|
||||||
render json: {success: true, msg: t('update.success.paper')}.to_json
|
render json: {success: true, msg: t('update_success')}.to_json
|
||||||
else
|
else
|
||||||
error_msg = @writing_conference.errors.full_messages.join("<br />")
|
error_msg = @writing_conference.errors.full_messages.join("<br />")
|
||||||
render json: {success: false, msg: error_msg}.to_json
|
render json: {success: false, msg: error_msg}.to_json
|
||||||
|
@ -69,7 +80,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
|
||||||
def destroy
|
def destroy
|
||||||
@writing_conference = WritingConference.find(params[:id])
|
@writing_conference = WritingConference.find(params[:id])
|
||||||
@writing_conference.destroy
|
@writing_conference.destroy
|
||||||
render :json => {success: true, msg: t('delete.success.paper')}
|
render :json => {success: true, msg: t('delete_success')}
|
||||||
end
|
end
|
||||||
|
|
||||||
def conference_type
|
def conference_type
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
module Panel::PersonalConference::Desktop::ConferencePagesHelper
|
module Panel::PersonalConference::Desktop::ConferencePagesHelper
|
||||||
def publication_record publication, view
|
def publication_record publication, view
|
||||||
content_tag :li,
|
content_tag :li,
|
||||||
|
"item" => "true",
|
||||||
:class => "list_t_item" do
|
:class => "list_t_item" do
|
||||||
marker + \
|
marker + \
|
||||||
content(publication, view) + \
|
content(publication, view) + \
|
||||||
|
@ -11,8 +12,14 @@ module Panel::PersonalConference::Desktop::ConferencePagesHelper
|
||||||
def marker
|
def marker
|
||||||
content_tag :div,
|
content_tag :div,
|
||||||
:class => "list_item_action"
|
:class => "list_item_action"
|
||||||
content_tag(:a, "", :class => "icon-check-empty") + \
|
content_tag(:a, "",:href=>"",
|
||||||
content_tag(:a, "", :class => "icon-star-empty")
|
:class => "icon-check-empty",
|
||||||
|
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||||
|
"ajax-remote"=>"false") + \
|
||||||
|
content_tag(:a, "",:href=>"",
|
||||||
|
:class => "icon-star-empty",
|
||||||
|
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||||
|
"ajax-remote"=>"false")
|
||||||
end
|
end
|
||||||
|
|
||||||
def content publication, view
|
def content publication, view
|
||||||
|
@ -71,4 +78,16 @@ module Panel::PersonalConference::Desktop::ConferencePagesHelper
|
||||||
file_type = ""
|
file_type = ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def generate_authors_name ids
|
||||||
|
author_name = ids.map{|m|
|
||||||
|
if m == "0"
|
||||||
|
{:id => 0, :name => current_user.name}
|
||||||
|
else
|
||||||
|
{:id => m, :name => ConferenceCoAuthor.find(m).co_author}
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
author_name.to_json
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,11 +3,12 @@ class ConferenceCoAuthor
|
||||||
|
|
||||||
LANGUAGE_TYPES = [ "English", "Chinese" ]
|
LANGUAGE_TYPES = [ "English", "Chinese" ]
|
||||||
|
|
||||||
field :name_id, type: BSON::ObjectId
|
field :name_id, type: BSON::ObjectId # this is author
|
||||||
field :co_author, localize: true
|
field :co_author, localize: true
|
||||||
field :email
|
field :email
|
||||||
|
|
||||||
belongs_to :conference_co_author_relations
|
belongs_to :conference_co_author_relations
|
||||||
|
has_and_belongs_to_many :writing_conferences
|
||||||
|
|
||||||
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/
|
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/
|
||||||
validates :email, format: { with: VALID_EMAIL_REGEX },
|
validates :email, format: { with: VALID_EMAIL_REGEX },
|
||||||
|
|
|
@ -16,6 +16,7 @@ class WritingConference
|
||||||
has_and_belongs_to_many :tags, :class_name => "PersonalConferenceTag"
|
has_and_belongs_to_many :tags, :class_name => "PersonalConferenceTag"
|
||||||
has_and_belongs_to_many :conference_author_types
|
has_and_belongs_to_many :conference_author_types
|
||||||
has_and_belongs_to_many :conference_paper_types
|
has_and_belongs_to_many :conference_paper_types
|
||||||
|
has_and_belongs_to_many :conference_co_authors
|
||||||
|
|
||||||
field :year
|
field :year
|
||||||
field :language
|
field :language
|
||||||
|
@ -43,6 +44,25 @@ class WritingConference
|
||||||
after_save :save_writing_conference_files
|
after_save :save_writing_conference_files
|
||||||
validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?}
|
validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?}
|
||||||
|
|
||||||
|
attr_reader :author_tokens
|
||||||
|
|
||||||
|
def author_tokens=(ids)
|
||||||
|
authors_ids = ids.split(",").map{|id|
|
||||||
|
begin
|
||||||
|
ConferenceCoAuthor.find(m).id
|
||||||
|
rescue
|
||||||
|
if id != "0"
|
||||||
|
new_co_author = ConferenceCoAuthor.new(:co_author => id, :name_id => create_user_id)
|
||||||
|
new_co_author.save
|
||||||
|
new_co_author.id
|
||||||
|
else
|
||||||
|
id
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
|
self.conference_co_author_ids = authors_ids
|
||||||
|
end
|
||||||
|
|
||||||
def self.search( category_id = nil )
|
def self.search( category_id = nil )
|
||||||
if category_id.to_s.size > 0
|
if category_id.to_s.size > 0
|
||||||
find(:all, :conditions => {writing_conference_category_id: category_id}).desc( :is_top, :title )
|
find(:all, :conditions => {writing_conference_category_id: category_id}).desc( :is_top, :title )
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
<ul>
|
<ul>
|
||||||
<% @conference_co_author_relations.each_with_index do |conference_co_author_relation,i| %>
|
<% @conference_co_author_relations.each_with_index do |conference_co_author_relation,i| %>
|
||||||
|
|
||||||
<li class="s_grid_row" item="true">
|
<li class="s_grid_row" item="true">
|
||||||
<div class="form_space" id="form_space_<%= i.to_s %>"><%= conference_co_author_relation.relation %></div>
|
<div class="form_space" id="form_space_<%= i.to_s %>"><%= conference_co_author_relation.relation %></div>
|
||||||
<div class="list_item_function">
|
<div class="list_item_function">
|
||||||
<%= link_to 'Edit', edit_panel_personal_conference_desktop_conference_co_author_relation_path(conference_co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %>
|
<%= link_to t('edit'), edit_panel_personal_conference_desktop_conference_co_author_relation_path(conference_co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %>
|
||||||
<%= link_to 'Destroy', panel_personal_conference_desktop_conference_co_author_relation_path(conference_co_author_relation), "confirm-message"=>'Are you sure?', "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %>
|
<%= link_to t('delete'), panel_personal_conference_desktop_conference_co_author_relation_path(conference_co_author_relation), "confirm-message"=>t('sure?'), "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
|
@ -7,28 +7,24 @@
|
||||||
<div id="co_author" class="tinycanvas vp">
|
<div id="co_author" class="tinycanvas vp">
|
||||||
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||||
<div class="viewport">
|
<div class="viewport">
|
||||||
<div class="overview">
|
<div class="overview" content-layout="datalist" per-column="4" base-width="300">
|
||||||
<% @conference_co_authors.each_with_index do |co_author,i| %>
|
<% @conference_co_authors.each_with_index do |co_author,i| %>
|
||||||
<% if ( i % 4 ) == 0 %>
|
|
||||||
<div class="g_col">
|
<div class="g_col">
|
||||||
<ul>
|
<ul>
|
||||||
<% end %>
|
<li class="list_t_item" item="true">
|
||||||
<li class="list_t_item">
|
|
||||||
<ul class="info">
|
<ul class="info">
|
||||||
<li><div class="name"><%= co_author.co_author %></div></li>
|
<li><div class="name"><%= co_author.co_author %></div></li>
|
||||||
<li><div class="email"><i class="icon-envelope"></i> <%= co_author.email %></div></li>
|
<li><div class="email"><i class="icon-envelope"></i> <%= co_author.email %></div></li>
|
||||||
<li><div class="relations"><i class="icon-user"></i> <%= @conference_co_author_relations.find(co_author.conference_co_author_relations_id).relation unless co_author.conference_co_author_relations_id.nil?%></div></li>
|
<li><div class="relations"><i class="icon-user"></i> <%= @conference_co_author_relations.find(co_author.conference_co_author_relations_id).relation unless co_author.conference_co_author_relations_id.nil?%></div></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="list_item_function">
|
<div class="list_item_function">
|
||||||
<%= link_to 'Edit', edit_panel_personal_conference_desktop_conference_co_author_path(co_author), :class => "bt-edit admbg2 admtxt", "ajax-remote"=>"get" %>
|
<%= link_to t('edit'), edit_panel_personal_conference_desktop_conference_co_author_path(co_author), :class => "bt-edit admbg2 admtxt", "ajax-remote"=>"get" %>
|
||||||
<%= link_to 'Destroy', panel_personal_conference_desktop_conference_co_author_path(co_author), "ajax-remote"=>"delete", "confirm-message"=>'Are you sure?', "callback-method"=>"paperDelete", :class=>"bt-delete admbg2 admtxt" %>
|
<%= link_to t('delete'), panel_personal_conference_desktop_conference_co_author_path(co_author), "ajax-remote"=>"delete", "confirm-message"=>t('sure?'), "callback-method"=>"paperDelete", :class=>"bt-delete admbg2 admtxt" %>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<% if ( i % 4 ) == 3 %>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,8 +25,9 @@
|
||||||
<div id="paper_add" class="tinycanvas vp">
|
<div id="paper_add" class="tinycanvas vp">
|
||||||
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||||
<div class="viewport">
|
<div class="viewport">
|
||||||
<div class="overview">
|
<div class="overview" content-layout="column" base-width="450">
|
||||||
<div class="s_grid_con s_form">
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.fields_for :paper_title_translations do |f| %>
|
<%= f.fields_for :paper_title_translations do |f| %>
|
||||||
|
@ -37,7 +38,6 @@
|
||||||
value: (@writing_conference.paper_title_translations[locale.to_s] rescue nil) %>
|
value: (@writing_conference.paper_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.fields_for :conference_title_translations do |f| %>
|
<%= f.fields_for :conference_title_translations do |f| %>
|
||||||
<%= f.text_field locale,
|
<%= f.text_field locale,
|
||||||
|
@ -49,7 +49,6 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<span class="icon-plus input_append"></span>
|
<span class="icon-plus input_append"></span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<div>
|
<div>
|
||||||
<%= label_tag("", t("personal_conference.paper_type")) %>
|
<%= label_tag("", t("personal_conference.paper_type")) %>
|
||||||
|
@ -66,11 +65,9 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.text_field :keywords, size: "20", placeholder: t("personal_conference.keywords"), class: "s_grid_6 s_grid"%>
|
<%= f.text_field :keywords, size: "20", placeholder: t("personal_conference.keywords"), class: "s_grid_6 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<div>
|
<div>
|
||||||
<%= label_tag("", t("personal_conference.conference_time")) %>
|
<%= label_tag("", t("personal_conference.conference_time")) %>
|
||||||
|
@ -87,31 +84,36 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_conference.sponsor"), class: "s_grid_2 s_grid") %><%= f.text_field :sponsor, size: "20", placeholder: "Sponsor", class: "s_grid_4 s_grid"%>
|
<%= label_tag("", t("personal_conference.sponsor"), class: "s_grid_2 s_grid") %><%= f.text_field :sponsor, size: "20", placeholder: "Sponsor", class: "s_grid_4 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_conference.location"), class: "s_grid_2 s_grid") %><%= f.text_field :location, size: "20", placeholder: "Location", class: "s_grid_4 s_grid"%>
|
<%= label_tag("", t("personal_conference.location"), class: "s_grid_2 s_grid") %><%= f.text_field :location, size: "20", placeholder: "Location", class: "s_grid_4 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= label_tag("", t("personal_conference.url"), class: "s_grid_2 s_grid") %><%= f.text_field :url, size: "20", placeholder: "www.sample.com", class: "s_grid_4 s_grid"%>
|
<%= label_tag("", t("personal_conference.url"), class: "s_grid_2 s_grid") %><%= f.text_field :url, size: "20", placeholder: "www.sample.com", class: "s_grid_4 s_grid"%>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="s_grid_con s_form">
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.fields_for :authors_translations do |f| %>
|
<%= f.label :author_tokens, t("personal_conference.authors") %><br />
|
||||||
<%= f.text_area locale,
|
<%= f.text_area :author_tokens,
|
||||||
|
class: "s_grid_6 s_grid",
|
||||||
|
size: "20x2",
|
||||||
|
placeholder: t("personal_conference.authors"),
|
||||||
|
"data-pre" => generate_authors_name(@writing_conference.conference_co_author_ids) %>
|
||||||
|
<%#= f.fields_for :authors_translations do |f| %>
|
||||||
|
<%#= f.text_area locale,
|
||||||
class: "s_grid_6 s_grid",
|
class: "s_grid_6 s_grid",
|
||||||
size: "20x2",
|
size: "20x2",
|
||||||
placeholder: t("personal_conference.authors"),
|
placeholder: t("personal_conference.authors"),
|
||||||
# "autocomplete-list" => "coauthor_autocomplete_list",
|
# "autocomplete-list" => "coauthor_autocomplete_list",
|
||||||
value: (@writing_conference.authors_translations[locale.to_s] rescue nil) %>
|
value: (@writing_conference.authors_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<%# end %>
|
||||||
<span class="icon-plus input_append"></span>
|
<span class="icon-plus input_append"></span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -153,7 +155,9 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="s_grid_con s_form">
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<table class="s_table">
|
<table class="s_table">
|
||||||
|
@ -169,7 +173,7 @@
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<div id='add_plugin_file' class="info_input plugin_files_block s_action">
|
<div id='add_plugin_file' class="info_input plugin_files_block s_action">
|
||||||
<%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %>
|
<%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %>
|
||||||
<a class="add setting_btn thmc1 thmtxt w1 hh1 hp" href=""><i class="icon-plus icon-white"></i> add</a>
|
<a class="add setting_btn thmc1 thmtxt w1 hh2 hp" href=""><i class="icon-plus icon-white"></i> add</a>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -184,7 +188,9 @@
|
||||||
</table>
|
</table>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
<div class="s_grid_con s_form">
|
</div>
|
||||||
|
<div column="true">
|
||||||
|
<div class="s_form">
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<ul>
|
<ul>
|
||||||
<%= f.text_area :note, size: "20x22", placeholder: t("personal_conference.note"), class: "s_grid_6 s_grid full_height"%>
|
<%= f.text_area :note, size: "20x22", placeholder: t("personal_conference.note"), class: "s_grid_6 s_grid full_height"%>
|
||||||
|
@ -193,10 +199,28 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= stylesheet_link_tag "token-input-facebook" %>
|
||||||
|
<%= javascript_include_tag :defaults, "jquery.tokeninput" %>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$("#writing_conference_author_tokens").tokenInput("/panel/personal_conference/desktop/conference_pages/new.json", {
|
||||||
|
crossDomain: false,
|
||||||
|
prePopulate: $("#writing_conference_author_tokens").data("pre"),
|
||||||
|
theme: "facebook",
|
||||||
|
hintText: "<%=t("hintText")%>",
|
||||||
|
noResultsText: "<%=t("noResultsText")%>",
|
||||||
|
searchingText: "<%=t("searchingText")%>"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
orbitDesktop.prototype.initializeJournalPapers.conference_title_autocomplete_list = <%= @conference_candidate.to_json.html_safe %>;
|
orbitDesktop.prototype.initializeJournalPapers.conference_title_autocomplete_list = <%= @conference_candidate.to_json.html_safe %>;
|
||||||
orbitDesktop.prototype.initializeJournalPapers.coauthor_autocomplete_list = <%= @co_author_candidate.to_json.html_safe %>;
|
// orbitDesktop.prototype.initializeJournalPapers.coauthor_autocomplete_list = <%= @co_author_candidate.to_json.html_safe %>;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -16,13 +16,11 @@
|
||||||
<div id="conference_list" class="tinycanvas vp">
|
<div id="conference_list" class="tinycanvas vp">
|
||||||
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
||||||
<div class="viewport">
|
<div class="viewport">
|
||||||
<div class="overview">
|
<div class="overview" content-layout="datalist" per-column="5" base-width="300">
|
||||||
<% @conference_lists.each_with_index do |conference_list,i| %>
|
<% @conference_lists.each_with_index do |conference_list,i| %>
|
||||||
<% if ( i % 5 ) == 0 %>
|
|
||||||
<div class="g_col">
|
<div class="g_col">
|
||||||
<ul>
|
<ul>
|
||||||
<% end %>
|
<li class="list_t_item" item="true">
|
||||||
<li class="list_t_item">
|
|
||||||
<div class="list_item_action">
|
<div class="list_item_action">
|
||||||
<i class="icon-file"></i>
|
<i class="icon-file"></i>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,11 +28,9 @@
|
||||||
<div class="list_t_title"><%= title %></div>
|
<div class="list_t_title"><%= title %></div>
|
||||||
<div class="list_t_desc"><%= level.join(",") %></div>
|
<div class="list_t_desc"><%= level.join(",") %></div>
|
||||||
</li>
|
</li>
|
||||||
<% if ( i % 5 ) == 4 %>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,11 +28,13 @@ en:
|
||||||
file_name : "File Name"
|
file_name : "File Name"
|
||||||
description : "File Description"
|
description : "File Description"
|
||||||
|
|
||||||
|
create_success : "Successfully Create"
|
||||||
|
update_success : "Successfully Update"
|
||||||
|
delete_success : "Successfully Delete"
|
||||||
add: "Add"
|
add: "Add"
|
||||||
back: "Back"
|
back: "Back"
|
||||||
delete: "Delete"
|
delete: "Delete"
|
||||||
edit: "Edit"
|
edit: "Edit"
|
||||||
no_: "No"
|
|
||||||
nothing: "Nothing"
|
nothing: "Nothing"
|
||||||
show: "Show"
|
show: "Show"
|
||||||
sure?: "Are you sure?"
|
sure?: "Are you sure?"
|
||||||
|
@ -41,6 +43,9 @@ en:
|
||||||
no_: "No"
|
no_: "No"
|
||||||
cancel : "Cancel"
|
cancel : "Cancel"
|
||||||
save: "save"
|
save: "save"
|
||||||
|
hintText: "Type in a search term"
|
||||||
|
noResultsText: "No results"
|
||||||
|
searchingText: "Searching…"
|
||||||
|
|
||||||
error_msg:
|
error_msg:
|
||||||
time_series_illegal: "must be before end time"
|
time_series_illegal: "must be before end time"
|
||||||
|
|
|
@ -28,11 +28,12 @@ zh_tw:
|
||||||
file_name : "檔案名稱"
|
file_name : "檔案名稱"
|
||||||
description : "描述"
|
description : "描述"
|
||||||
|
|
||||||
|
create_success : "新增完成!!"
|
||||||
|
update_success : "更新完成!!"
|
||||||
add: "新增"
|
add: "新增"
|
||||||
back: "返回"
|
back: "返回"
|
||||||
delete: "刪除"
|
delete: "刪除"
|
||||||
edit: "編輯"
|
edit: "編輯"
|
||||||
no_: "No"
|
|
||||||
nothing: "無"
|
nothing: "無"
|
||||||
show: "顯示"
|
show: "顯示"
|
||||||
sure?: "您肯定嗎?"
|
sure?: "您肯定嗎?"
|
||||||
|
@ -41,6 +42,9 @@ zh_tw:
|
||||||
no_: "否"
|
no_: "否"
|
||||||
cancel : "取消"
|
cancel : "取消"
|
||||||
save: "儲存"
|
save: "儲存"
|
||||||
|
hintText: "請輸入搜尋關鍵字"
|
||||||
|
noResultsText: "沒有相關的比對結果"
|
||||||
|
searchingText: "搜尋中…"
|
||||||
|
|
||||||
error_msg:
|
error_msg:
|
||||||
time_series_illegal: "啟始時間必須早於結束時間"
|
time_series_illegal: "啟始時間必須早於結束時間"
|
||||||
|
|
|
@ -51,6 +51,23 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||||
this.initializeJournalPapers.addpaper = function(){ // to open add pages in journal papers page
|
this.initializeJournalPapers.addpaper = function(){ // to open add pages in journal papers page
|
||||||
var bindHandlers = function(){ // to bind handlers for add page
|
var bindHandlers = function(){ // to bind handlers for add page
|
||||||
o.simple_drop_down();
|
o.simple_drop_down();
|
||||||
|
$('#add_plugin_file a.add').click(function(){
|
||||||
|
var new_id = $(this).prev().attr('value');
|
||||||
|
var old_id = new RegExp("new_writing_journal_files", "g");
|
||||||
|
$(this).prev().attr('value', parseInt(new_id) + 1);
|
||||||
|
var x = get_html(old_id,new_id);
|
||||||
|
var newfield = $(x);
|
||||||
|
$(this).parents('table').append(newfield);
|
||||||
|
newfield.find('.action a.delete').click(function(){
|
||||||
|
newfield.remove();
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.action a.remove_existing_record').click(function(){
|
||||||
|
$(this).next('.should_destroy').attr('value', 1);
|
||||||
|
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
bindHandlers();
|
bindHandlers();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,13 +22,24 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr
|
||||||
@level_types = JournalLevelType.all
|
@level_types = JournalLevelType.all
|
||||||
@author_types = JournalAuthorType.all
|
@author_types = JournalAuthorType.all
|
||||||
@paper_types= JournalPaperType.all
|
@paper_types= JournalPaperType.all
|
||||||
@journal_co_author_candidate =
|
#@journal_co_author_candidate =
|
||||||
JournalCoAuthor.where(name_id: current_user.id).map{|c|c.co_author}
|
# JournalCoAuthor.where(name_id: current_user.id).map{|c|c.co_author}
|
||||||
@journal_candidate =
|
@journal_candidate =
|
||||||
WritingJournal.where(create_user_id: current_user.id).map{|j|j.journal_title}.uniq
|
WritingJournal.where(create_user_id: current_user.id).map{|j|j.journal_title}.uniq
|
||||||
|
|
||||||
|
if (not params[:q].nil?) and (current_user.name.include?params[:q])
|
||||||
|
@user = [{ :id => 0, :name => current_user.name}] # self account name
|
||||||
|
else
|
||||||
|
@user = []
|
||||||
|
end
|
||||||
|
|
||||||
|
@co_authors = JournalCoAuthor.where(name_id: current_user.id, :co_author => /#{params[:q]}/)
|
||||||
|
@co_authors = [{ :id => params[:q], :name => params[:q] }] + # search string
|
||||||
|
@user + # self account name
|
||||||
|
@co_authors.map{|m| { :id => m.id, :name => m.co_author } } # match pattern
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :layout => false}
|
format.html { render :layout => false}
|
||||||
|
format.json { render :json => @co_authors.to_json }
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -48,7 +59,7 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr
|
||||||
@writing_journal = WritingJournal.new(params[:writing_journal])
|
@writing_journal = WritingJournal.new(params[:writing_journal])
|
||||||
|
|
||||||
if @writing_journal.save
|
if @writing_journal.save
|
||||||
render json: {success: true, msg: t('create.success.paper')}.to_json
|
render json: {success: true, msg: t('create_success')}.to_json
|
||||||
else
|
else
|
||||||
error_msg = @writing_journal.errors.full_messages.join("<br />")
|
error_msg = @writing_journal.errors.full_messages.join("<br />")
|
||||||
render json: {success: false, msg: error_msg}.to_json
|
render json: {success: false, msg: error_msg}.to_json
|
||||||
|
@ -60,31 +71,23 @@ class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationContr
|
||||||
@writing_journal= WritingJournal.find(params[:id])
|
@writing_journal= WritingJournal.find(params[:id])
|
||||||
|
|
||||||
if @writing_journal.update_attributes(params[:writing_journal])
|
if @writing_journal.update_attributes(params[:writing_journal])
|
||||||
render json: {success: true, msg: t('update.success.paper')}.to_json
|
render json: {success: true, msg: t('update_success')}.to_json
|
||||||
else
|
else
|
||||||
error_msg = @writing_journal.errors.full_messages.join("<br />")
|
error_msg = @writing_journal.errors.full_messages.join("<br />")
|
||||||
render json: {success: false, msg: error_msg}.to_json
|
render json: {success: false, msg: error_msg}.to_json
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_file_type file
|
|
||||||
if not file.nil?
|
|
||||||
file_type = MIME::Types.type_for(file).first.to_s.split("/")[1]
|
|
||||||
file_type = "/assets/ft-icons/#{file_type}/#{file_type}-48_32.png"
|
|
||||||
else
|
|
||||||
file_type = ""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@writing_journal = WritingJournal.find(params[:id])
|
@writing_journal = WritingJournal.find(params[:id])
|
||||||
@writing_journal.destroy
|
@writing_journal.destroy
|
||||||
render :json => {success: true, msg: t('delete.success.paper')}
|
render :json => {success: true, msg: t('delete_success')}
|
||||||
end
|
end
|
||||||
|
|
||||||
def journal_type
|
def journal_type
|
||||||
level_types = JournalLevelType.all
|
level_types = JournalLevelType.all
|
||||||
all_journal_lists = WritingJournal.where(create_user_id: current_user.id)
|
all_journal_lists = WritingJournal.where(create_user_id: current_user.id)
|
||||||
|
all_journal_lists = all_journal_lists.asc(:journal_title)
|
||||||
all_journal_lists = all_journal_lists.map do |j|
|
all_journal_lists = all_journal_lists.map do |j|
|
||||||
[ j.journal_title,
|
[ j.journal_title,
|
||||||
j.journal_level_type_ids.map do |type|
|
j.journal_level_type_ids.map do |type|
|
||||||
|
|
|
@ -6,15 +6,20 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
|
||||||
marker + \
|
marker + \
|
||||||
content(publication, view) + \
|
content(publication, view) + \
|
||||||
edit_or_delete(publication)
|
edit_or_delete(publication)
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def marker
|
def marker
|
||||||
content_tag :div,
|
content_tag :div,
|
||||||
:class => "list_item_action"
|
:class => "list_item_action"
|
||||||
content_tag(:a, "",:href=>"", :class => "icon-check-empty", "toggle-onclick"=>"icon-check-empty icon-check", "ajax-remote"=>"false") + \
|
content_tag(:a, "",:href=>"",
|
||||||
content_tag(:a, "",:href=>"", :class => "icon-star-empty", "toggle-onclick"=>"icon-star-empty icon-star", "ajax-remote"=>"false")
|
:class => "icon-check-empty",
|
||||||
|
"toggle-onclick"=>"icon-check-empty icon-check",
|
||||||
|
"ajax-remote"=>"false") + \
|
||||||
|
content_tag(:a, "",:href=>"",
|
||||||
|
:class => "icon-star-empty",
|
||||||
|
"toggle-onclick"=>"icon-star-empty icon-star",
|
||||||
|
"ajax-remote"=>"false")
|
||||||
end
|
end
|
||||||
|
|
||||||
def content publication, view
|
def content publication, view
|
||||||
|
@ -73,4 +78,16 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
|
||||||
file_type = ""
|
file_type = ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def generate_authors_name ids
|
||||||
|
author_name = ids.map{|m|
|
||||||
|
if m == "0"
|
||||||
|
{:id => 0, :name => current_user.name}
|
||||||
|
else
|
||||||
|
{:id => m, :name => ConferenceCoAuthor.find(m).co_author}
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
author_name.to_json
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,6 +8,7 @@ class JournalCoAuthor
|
||||||
field :email
|
field :email
|
||||||
|
|
||||||
belongs_to :journal_co_author_relations
|
belongs_to :journal_co_author_relations
|
||||||
|
has_and_belongs_to_many :writing_journals
|
||||||
|
|
||||||
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/
|
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/
|
||||||
validates :email, format: { with: VALID_EMAIL_REGEX },
|
validates :email, format: { with: VALID_EMAIL_REGEX },
|
||||||
|
|
|
@ -12,6 +12,7 @@ class WritingJournal
|
||||||
has_and_belongs_to_many :tags, :class_name => "PersonalJournalTag"
|
has_and_belongs_to_many :tags, :class_name => "PersonalJournalTag"
|
||||||
has_and_belongs_to_many :journal_author_types
|
has_and_belongs_to_many :journal_author_types
|
||||||
has_and_belongs_to_many :journal_level_types
|
has_and_belongs_to_many :journal_level_types
|
||||||
|
has_and_belongs_to_many :journal_co_authors
|
||||||
has_many :writing_journal_files, :autosave => true, :dependent => :destroy
|
has_many :writing_journal_files, :autosave => true, :dependent => :destroy
|
||||||
belongs_to :journal_paper_type
|
belongs_to :journal_paper_type
|
||||||
|
|
||||||
|
@ -35,25 +36,44 @@ class WritingJournal
|
||||||
accepts_nested_attributes_for :writing_journal_files, :allow_destroy => true
|
accepts_nested_attributes_for :writing_journal_files, :allow_destroy => true
|
||||||
after_save :save_writing_journal_files
|
after_save :save_writing_journal_files
|
||||||
before_validation :add_http
|
before_validation :add_http
|
||||||
before_save :save_co_author
|
#before_save :save_co_author
|
||||||
validates :paper_title, :at_least_one => true
|
validates :paper_title, :at_least_one => true
|
||||||
validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?}
|
validates :url, :format => /^(http|https):\/\/(([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})|((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))(:[0-9]{1,5})?(\/.*)?/i, :unless => Proc.new{self.url.blank?}
|
||||||
|
|
||||||
def save_co_author
|
attr_reader :author_tokens
|
||||||
authors_list = authors.split(",").map{|n| n.strip.gsub(/\s+/," ")}.reject{|n| n.empty? }
|
|
||||||
if new_record?
|
|
||||||
current_user = create_user_id
|
|
||||||
else
|
|
||||||
current_user = update_user_id
|
|
||||||
end
|
|
||||||
|
|
||||||
authors_db = JournalCoAuthor.where(:name_id => current_user).map(&:co_author)
|
def author_tokens=(ids)
|
||||||
authors_list.delete(User.find(current_user).name)
|
authors_ids = ids.split(",").map{|id|
|
||||||
authors_list = authors_list.delete_if{|author| authors_db.include?author}
|
begin
|
||||||
authors_list.each do |author|
|
JournalCoAuthor.find(m).id
|
||||||
JournalCoAuthor.new(:co_author => author, :name_id => current_user).save
|
rescue
|
||||||
|
if id != "0"
|
||||||
|
new_co_author = JournalCoAuthor.new(:co_author => id, :name_id => create_user_id)
|
||||||
|
new_co_author.save
|
||||||
|
new_co_author.id
|
||||||
|
else
|
||||||
|
id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
}
|
||||||
|
self.journal_co_author_ids = authors_ids
|
||||||
|
end
|
||||||
|
# old method
|
||||||
|
#def save_co_author
|
||||||
|
# authors_list = authors.split(",").map{|n| n.strip.gsub(/\s+/," ")}.reject{|n| n.empty? }
|
||||||
|
# if new_record?
|
||||||
|
# current_user = create_user_id
|
||||||
|
# else
|
||||||
|
# current_user = update_user_id
|
||||||
|
# end
|
||||||
|
|
||||||
|
# authors_db = JournalCoAuthor.where(:name_id => current_user).map(&:co_author)
|
||||||
|
# authors_list.delete(User.find(current_user).name)
|
||||||
|
# authors_list = authors_list.delete_if{|author| authors_db.include?author}
|
||||||
|
# authors_list.each do |author|
|
||||||
|
# JournalCoAuthor.new(:co_author => author, :name_id => current_user).save
|
||||||
|
# end
|
||||||
|
#end
|
||||||
|
|
||||||
def self.search( category_id = nil )
|
def self.search( category_id = nil )
|
||||||
if category_id.to_s.size > 0
|
if category_id.to_s.size > 0
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
<li class="s_grid_row" item="true">
|
<li class="s_grid_row" item="true">
|
||||||
<div class="form_space" id="form_space_<%= i.to_s %>"><%= journal_co_author_relation.relation %></div>
|
<div class="form_space" id="form_space_<%= i.to_s %>"><%= journal_co_author_relation.relation %></div>
|
||||||
<div class="list_item_function">
|
<div class="list_item_function">
|
||||||
<%= link_to 'Edit', edit_panel_personal_journal_desktop_journal_co_author_relation_path(journal_co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %>
|
<%= link_to t('edit'), edit_panel_personal_journal_desktop_journal_co_author_relation_path(journal_co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %>
|
||||||
<%= link_to 'Destroy', panel_personal_journal_desktop_journal_co_author_relation_path(journal_co_author_relation), "confirm-message"=>'Are you sure?', "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %>
|
<%= link_to t('delete'), panel_personal_journal_desktop_journal_co_author_relation_path(journal_co_author_relation), "confirm-message"=>t('sure?'), "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
<div class="overview" content-layout="datalist" per-column="4" base-width="300">
|
<div class="overview" content-layout="datalist" per-column="4" base-width="300">
|
||||||
<ul>
|
<ul>
|
||||||
<% @journal_co_authors.each_with_index do |co_author,i| %>
|
<% @journal_co_authors.each_with_index do |co_author,i| %>
|
||||||
|
|
||||||
<li class="list_t_item" item="true">
|
<li class="list_t_item" item="true">
|
||||||
<ul class="info">
|
<ul class="info">
|
||||||
<li><div class="name"><%= co_author.co_author %></div></li>
|
<li><div class="name"><%= co_author.co_author %></div></li>
|
||||||
|
@ -18,11 +17,10 @@
|
||||||
<li><div class="relations"><i class="icon-user"></i> <%= @journal_co_author_relations.find(co_author.journal_co_author_relations_id).relation unless co_author.journal_co_author_relations_id.nil?%></div></li>
|
<li><div class="relations"><i class="icon-user"></i> <%= @journal_co_author_relations.find(co_author.journal_co_author_relations_id).relation unless co_author.journal_co_author_relations_id.nil?%></div></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="list_item_function">
|
<div class="list_item_function">
|
||||||
<%= link_to 'Edit', edit_panel_personal_journal_desktop_journal_co_author_path(co_author), :class => "bt-edit admbg2 admtxt", "ajax-remote"=>"get" %>
|
<%= link_to t('edit'), edit_panel_personal_journal_desktop_journal_co_author_path(co_author), :class => "bt-edit admbg2 admtxt", "ajax-remote"=>"get" %>
|
||||||
<%= link_to 'Destroy', panel_personal_journal_desktop_journal_co_author_path(co_author), "ajax-remote"=>"delete", "confirm-message"=>'Are you sure?', "callback-method"=>"paperDelete", :class=>"bt-delete admbg2 admtxt" %>
|
<%= link_to t('delete'), panel_personal_journal_desktop_journal_co_author_path(co_author), "ajax-remote"=>"delete", "confirm-message"=>t('sure?'), "callback-method"=>"paperDelete", :class=>"bt-delete admbg2 admtxt" %>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
class: "s_grid_6 s_grid",
|
class: "s_grid_6 s_grid",
|
||||||
size: "20x2",
|
size: "20x2",
|
||||||
placeholder: t("personal_journal.paper_title"),
|
placeholder: t("personal_journal.paper_title"),
|
||||||
value: (@writing_journal.paper_title_translations[locale] rescue nil) %>
|
value: (@writing_journal.paper_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
placeholder: t("personal_journal.journal_title"),
|
placeholder: t("personal_journal.journal_title"),
|
||||||
class: "s_grid_6 s_grid",
|
class: "s_grid_6 s_grid",
|
||||||
"autocomplete-list" => "journal_title_autocomplete_list",
|
"autocomplete-list" => "journal_title_autocomplete_list",
|
||||||
value: (@writing_journal.journal_title_translations[locale] rescue nil) %>
|
value: (@writing_journal.journal_title_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<span class="icon-plus input_append"></span>
|
<span class="icon-plus input_append"></span>
|
||||||
</li>
|
</li>
|
||||||
|
@ -91,14 +91,20 @@
|
||||||
<div class="s_form">
|
<div class="s_form">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<%= f.fields_for :authors_translations do |f| %>
|
<%= f.label :author_tokens, t("personal_journal.authors") %><br />
|
||||||
<%= f.text_area locale,
|
<%= f.text_area :author_tokens,
|
||||||
|
class: "s_grid_6 s_grid",
|
||||||
|
size: "20x2",
|
||||||
|
placeholder: t("personal_journal.authors"),
|
||||||
|
"data-pre" => generate_authors_name(@writing_journal.journal_co_author_ids) %>
|
||||||
|
<%#= f.fields_for :authors_translations do |f| %>
|
||||||
|
<%#= f.text_area locale,
|
||||||
class: "s_grid_6 s_grid",
|
class: "s_grid_6 s_grid",
|
||||||
size: "20x2",
|
size: "20x2",
|
||||||
placeholder: t("personal_journal.authors"),
|
placeholder: t("personal_journal.authors"),
|
||||||
"autocomplete-list" => "coauthor_autocomplete_list",
|
"autocomplete-list" => "coauthor_autocomplete_list",
|
||||||
value: (@writing_journal.authors_translations[locale] rescue nil) %>
|
value: (@writing_journal.authors_translations[locale.to_s] rescue nil) %>
|
||||||
<% end %>
|
<%# end %>
|
||||||
<span class="icon-plus input_append"></span>
|
<span class="icon-plus input_append"></span>
|
||||||
</li>
|
</li>
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
|
@ -143,7 +149,6 @@
|
||||||
class: "s_grid s_grid_4" %>
|
class: "s_grid s_grid_4" %>
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="s_grid_row">
|
<li class="s_grid_row">
|
||||||
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" placeholder=<%= t("personal_journal.tags") %>><span class="icon-plus input_append"></li>
|
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" placeholder=<%= t("personal_journal.tags") %>><span class="icon-plus input_append"></li>
|
||||||
<span class="icon-plus input_append"></span>
|
<span class="icon-plus input_append"></span>
|
||||||
|
@ -216,27 +221,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
orbitDesktop.prototype.initializeJournalPapers.journal_title_autocomplete_list = <%= @journal_candidate.to_json.html_safe %>;
|
orbitDesktop.prototype.initializeJournalPapers.journal_title_autocomplete_list = <%= @journal_candidate.to_json.html_safe %>;
|
||||||
orbitDesktop.prototype.initializeJournalPapers.coauthor_autocomplete_list = <%= @co_author_candidate.to_json.html_safe %>;
|
// orbitDesktop.prototype.initializeJournalPapers.coauthor_autocomplete_list = <%= @co_author_candidate.to_json.html_safe %>;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('#add_plugin_file a.add').click(function(){
|
var get_html = function(old_id,new_id){
|
||||||
var new_id = $(this).prev().attr('value');
|
return ("<%= escape_javascript(add_attribute 'form_file', f, :writing_journal_files) %>").replace(old_id, new_id);
|
||||||
var old_id = new RegExp("new_writing_journal_files", "g");
|
}
|
||||||
$(this).prev().attr('value', parseInt(new_id) + 1);
|
|
||||||
var newfield = $(("<%= escape_javascript(add_attribute 'form_file', f, :writing_journal_files) %>").replace(old_id, new_id));
|
|
||||||
$(this).parents('table').append(newfield);
|
|
||||||
newfield.find('.action a.delete').click(function(){
|
|
||||||
newfield.remove();
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.action a.remove_existing_record').click(function(){
|
|
||||||
$(this).next('.should_destroy').attr('value', 1);
|
|
||||||
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -18,11 +18,9 @@
|
||||||
<div class="viewport">
|
<div class="viewport">
|
||||||
<div class="overview" content-layout="datalist" base-width="300" per-column="5">
|
<div class="overview" content-layout="datalist" base-width="300" per-column="5">
|
||||||
<% @journal_lists.each_with_index do |journal_list,i| %>
|
<% @journal_lists.each_with_index do |journal_list,i| %>
|
||||||
<% if ( i % 5 ) == 0 %>
|
|
||||||
<div class="g_col">
|
<div class="g_col">
|
||||||
<ul>
|
<ul>
|
||||||
<% end %>
|
<li class="list_t_item" item="true">
|
||||||
<li class="list_t_item">
|
|
||||||
<div class="list_item_action">
|
<div class="list_item_action">
|
||||||
<i class="icon-file"></i>
|
<i class="icon-file"></i>
|
||||||
</div>
|
</div>
|
||||||
|
@ -30,11 +28,9 @@
|
||||||
<div class="list_t_title"><%= title %></div>
|
<div class="list_t_title"><%= title %></div>
|
||||||
<div class="list_t_desc"><%= level.join(",") %></div>
|
<div class="list_t_desc"><%= level.join(",") %></div>
|
||||||
</li>
|
</li>
|
||||||
<% if ( i % 5 ) == 4 %>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,6 +24,25 @@ en:
|
||||||
file : "File"
|
file : "File"
|
||||||
file_name : "File name"
|
file_name : "File name"
|
||||||
description : "File Description"
|
description : "File Description"
|
||||||
|
|
||||||
|
create_success : "Successfully Create"
|
||||||
|
update_success : "Successfully Update"
|
||||||
|
delete_success : "Successfully Delete"
|
||||||
add: "Add"
|
add: "Add"
|
||||||
|
back: "Back"
|
||||||
|
delete: "Delete"
|
||||||
edit: "Edit"
|
edit: "Edit"
|
||||||
delete : "Destory"
|
nothing: "Nothing"
|
||||||
|
show: "Show"
|
||||||
|
sure?: "Are you sure?"
|
||||||
|
update: "Update"
|
||||||
|
yes_: "Yes"
|
||||||
|
no_: "No"
|
||||||
|
cancel : "Cancel"
|
||||||
|
save: "save"
|
||||||
|
hintText: "Type in a search term"
|
||||||
|
noResultsText: "No results"
|
||||||
|
searchingText: "Searching…"
|
||||||
|
|
||||||
|
error_msg:
|
||||||
|
time_series_illegal: "must be before end time"
|
||||||
|
|
|
@ -26,6 +26,25 @@ zh_tw:
|
||||||
file : "檔案"
|
file : "檔案"
|
||||||
file_name : "檔案名稱"
|
file_name : "檔案名稱"
|
||||||
description : "描述"
|
description : "描述"
|
||||||
|
|
||||||
|
create_success : "新增完成!!"
|
||||||
|
update_success : "更新完成!!"
|
||||||
|
delete_success : "刪除成功!!"
|
||||||
add: "新增"
|
add: "新增"
|
||||||
edit : "編輯"
|
back: "返回"
|
||||||
delete: "刪除"
|
delete: "刪除"
|
||||||
|
edit: "編輯"
|
||||||
|
nothing: "無"
|
||||||
|
show: "顯示"
|
||||||
|
sure?: "您肯定嗎?"
|
||||||
|
update: "更新"
|
||||||
|
yes_: "是"
|
||||||
|
no_: "否"
|
||||||
|
cancel : "取消"
|
||||||
|
save: "儲存"
|
||||||
|
hintText: "請輸入搜尋關鍵字"
|
||||||
|
noResultsText: "沒有相關的比對結果"
|
||||||
|
searchingText: "搜尋中…"
|
||||||
|
|
||||||
|
error_msg:
|
||||||
|
time_series_illegal: "啟始時間必須早於結束時間"
|
||||||
|
|
Loading…
Reference in New Issue