duplicate error fixed and css inside widgets fixed, duplicate location fixed
This commit is contained in:
1 parent
dc94283af9
commit
ae8033ea1b
5 files changed
+69
-219
No files matched your search
+1
-83
@@ -62,51 +62,11 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
|
||||
});
|
||||
}
|
||||
|
||||
var tokesplits = function(){
|
||||
$("#writing_conference_author_tokens").select2({
|
||||
multiple: true,
|
||||
minimumInputLength: 1,
|
||||
width: "300px;",
|
||||
formatResult: function movieFormatResult(coAuthor) {
|
||||
var markup = "";
|
||||
if (coAuthor.text !== undefined && coAuthor.email !== undefined) {
|
||||
if(!coAuthor.email){
|
||||
markup += coAuthor.text + " -- none email";
|
||||
} else {
|
||||
markup += coAuthor.text + " -- " + coAuthor.email;
|
||||
}
|
||||
}else if (coAuthor.email !== undefined) {
|
||||
markup += coAuthor.text;
|
||||
}
|
||||
return markup;
|
||||
},
|
||||
ajax: {
|
||||
url: "/panel/personal_conference/desktop/conference_pages/new.json",
|
||||
dataType: 'json',
|
||||
quietMillis: 100,
|
||||
tokenSeparators: [","],
|
||||
data: function (search, page) {
|
||||
return {q: search};
|
||||
},
|
||||
results: function (data, page) {
|
||||
return {results: data.results};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
$("#writing_conference_author_tokens").select2("container").find("ul.select2-choices").sortable({
|
||||
containment: 'parent',
|
||||
start: function() { $("#writing_conference_author_tokens").select2("onSortStart"); },
|
||||
update: function() { $("#writing_conference_author_tokens").select2("onSortEnd"); }
|
||||
});
|
||||
}
|
||||
|
||||
var preData = function(){
|
||||
$("#writing_conference_author_tokens").select2('data', JSON.parse($("#writing_conference_author_tokens").attr('data-pre')));
|
||||
}
|
||||
|
||||
uploadFiles();
|
||||
tokesplits();
|
||||
preData();
|
||||
}
|
||||
|
||||
@@ -130,53 +90,11 @@ orbitDesktop.prototype.initializeConferencePapers = function(target,url,cache){
|
||||
});
|
||||
}
|
||||
|
||||
console.log("hi");
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
}
|
||||
|
||||
var tokesplits = function(){
|
||||
$("#writing_conference_author_tokens").select2({
|
||||
multiple: true,
|
||||
minimumInputLength: 1,
|
||||
width: "300px;",
|
||||
formatResult: function movieFormatResult(coAuthor) {
|
||||
var markup = "";
|
||||
if (coAuthor.text !== undefined && coAuthor.email !== undefined) {
|
||||
if(!coAuthor.email){
|
||||
markup += coAuthor.text + " -- none email";
|
||||
} else {
|
||||
markup += coAuthor.text + " -- " + coAuthor.email;
|
||||
}
|
||||
}else if (coAuthor.email !== undefined) {
|
||||
markup += coAuthor.text;
|
||||
}
|
||||
return markup;
|
||||
},
|
||||
ajax: {
|
||||
url: "/panel/personal_conference/desktop/conference_pages/new.json",
|
||||
dataType: 'json',
|
||||
quietMillis: 100,
|
||||
tokenSeparators: [","],
|
||||
data: function (search, page) {
|
||||
return {q: search};
|
||||
},
|
||||
results: function (data, page) {
|
||||
return {results: data.results};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
$("#writing_conference_author_tokens").select2("container").find("ul.select2-choices").sortable({
|
||||
containment: 'parent',
|
||||
start: function() { $("#writing_conference_author_tokens").select2("onSortStart"); },
|
||||
update: function() { $("#writing_conference_author_tokens").select2("onSortEnd"); }
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
bindHandlers();
|
||||
uploadFiles();
|
||||
tokesplits();
|
||||
}
|
||||
|
||||
this.initializeConferencePapers.conference = function(){ // to open add pages in conference papers page
|
||||
|
||||
+4
-1
@@ -50,7 +50,8 @@
|
||||
size: "20",
|
||||
placeholder: t("personal_conference.conference_title"),
|
||||
class: "s_grid_12 s_grid",
|
||||
# "autocomplete-list" => "conference_title_autocomplete_list",
|
||||
"autocomplete" => "/panel/personal_conference/desktop/conference_pages/new.json",
|
||||
"autocomplete-format" => "--:[text,email]",
|
||||
value: (@writing_conference.conference_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
|
||||
@@ -109,6 +110,8 @@
|
||||
class: "s_grid_12 s_grid",
|
||||
size: "20x2",
|
||||
placeholder: t("personal_conference.authors"),
|
||||
"autocomplete" => "/panel/personal_conference/desktop/conference_pages/new.json",
|
||||
"autocomplete-format" => "--:[text,email]",
|
||||
"data-pre" => generate_authors_name(@writing_conference.conference_co_author_ids) %>
|
||||
<%#= f.fields_for :authors_translations do |f| %>
|
||||
<%#= f.text_area locale,
|
||||
|
||||
+3
-83
@@ -63,51 +63,11 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
});
|
||||
}
|
||||
|
||||
var tokesplits = function(){
|
||||
$("#writing_journal_author_tokens").select2({
|
||||
multiple: true,
|
||||
minimumInputLength: -1,
|
||||
width: "off",
|
||||
formatResult: function movieFormatResult(coAuthor) {
|
||||
var markup = "";
|
||||
if (coAuthor.text !== undefined && coAuthor.email !== undefined) {
|
||||
if(!coAuthor.email){
|
||||
markup += coAuthor.text + " -- none email";
|
||||
} else {
|
||||
markup += coAuthor.text + " -- " + coAuthor.email;
|
||||
}
|
||||
}else if (coAuthor.email !== undefined) {
|
||||
markup += coAuthor.text;
|
||||
}
|
||||
return markup;
|
||||
},
|
||||
ajax: {
|
||||
url: "/panel/personal_journal/desktop/journal_pages/new.json",
|
||||
dataType: 'json',
|
||||
quietMillis: 100,
|
||||
tokenSeparators: [","],
|
||||
data: function (search, page) {
|
||||
return {q: search};
|
||||
},
|
||||
results: function (data, page) {
|
||||
return {results: data.results};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
$("#writing_journal_author_tokens").select2("container").find("ul.select2-choices").sortable({
|
||||
containment: 'parent',
|
||||
start: function() { $("#writing_journal_author_tokens").select2("onSortStart"); },
|
||||
update: function() { $("#writing_journal_author_tokens").select2("onSortEnd"); }
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var preData = function(){
|
||||
$("#writing_journal_author_tokens").select2('data', JSON.parse($("#writing_journal_author_tokens").attr('data-pre')));
|
||||
}
|
||||
o.use_select2();
|
||||
uploadFiles();
|
||||
tokesplits();
|
||||
preData();
|
||||
}
|
||||
|
||||
@@ -134,51 +94,11 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
|
||||
// console.log("hi");
|
||||
var bindHandlers = function(){
|
||||
o.simple_drop_down();
|
||||
o.use_select2();
|
||||
|
||||
}
|
||||
|
||||
var tokesplits = function(){
|
||||
$("#writing_journal_author_tokens").select2({
|
||||
multiple: true,
|
||||
minimumInputLength: -1,
|
||||
width: "off",
|
||||
formatResult: function movieFormatResult(coAuthor, container, query, escapeMarkup) {
|
||||
var markup = "";
|
||||
if (coAuthor.text !== undefined && coAuthor.email !== undefined) {
|
||||
if(!coAuthor.email){
|
||||
markup += coAuthor.text + " -- none email";
|
||||
} else {
|
||||
markup += coAuthor.text + " -- " + coAuthor.email;
|
||||
}
|
||||
}else if (coAuthor.email !== undefined) {
|
||||
markup += coAuthor.text;
|
||||
}
|
||||
return markup;
|
||||
},
|
||||
ajax: {
|
||||
url: "/panel/personal_journal/desktop/journal_pages/new.json",
|
||||
dataType: 'json',
|
||||
quietMillis: 100,
|
||||
tokenSeparators: [","],
|
||||
data: function (search, page) {
|
||||
return {q: search};
|
||||
},
|
||||
results: function (data, page) {
|
||||
return {results: data.results};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
$("#writing_journal_author_tokens").select2("container").find("ul.select2-choices").sortable({
|
||||
containment: 'parent',
|
||||
start: function() { $("#writing_journal_author_tokens").select2("onSortStart"); },
|
||||
update: function() { $("#writing_journal_author_tokens").select2("onSortEnd"); }
|
||||
});
|
||||
}
|
||||
|
||||
bindHandlers();
|
||||
uploadFiles();
|
||||
tokesplits();
|
||||
|
||||
}
|
||||
|
||||
this.initializeJournalPapers.journal = function(){ // to open add pages in journal papers page
|
||||
|
||||
+4
-20
@@ -51,7 +51,8 @@
|
||||
size: "20",
|
||||
placeholder: t("personal_journal.journal_title"),
|
||||
class: "s_grid_12 s_grid",
|
||||
"autocomplete-list" => "journal_title_autocomplete_list",
|
||||
"autocomplete" => "/panel/personal_journal/desktop/journal_pages/new.json",
|
||||
"autocomplete-format" => "--:[text,email]",
|
||||
value: (@writing_journal.journal_title_translations[locale.to_s] rescue nil) %>
|
||||
<% end %>
|
||||
|
||||
@@ -104,6 +105,8 @@
|
||||
class: "s_grid_12 s_grid",
|
||||
size: "20x2",
|
||||
placeholder: t("personal_journal.authors"),
|
||||
"autocomplete" => "/panel/personal_journal/desktop/journal_pages/new.json",
|
||||
"autocomplete-format" => "--:[text,email]",
|
||||
"data-pre" => generate_authors_name(@writing_journal.journal_co_author_ids) %>
|
||||
<%#= f.fields_for :authors_translations do |f| %>
|
||||
<%#= f.text_area locale,
|
||||
@@ -232,25 +235,6 @@
|
||||
</div>
|
||||
-->
|
||||
|
||||
<script>
|
||||
$(document).ready(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">
|
||||
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 %>;
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var get_html = function(old_id,new_id){
|
||||
return ("<%= escape_javascript(add_attribute 'form_file', f, :writing_journal_files) %>").replace(old_id, new_id);
|
||||
|
||||
Reference in new issue
Block a user