all none fixed

This commit is contained in:
Harry Bomrah 2013-03-06 11:32:53 +08:00 committed by Matt K. Fu
parent 3e96cfe514
commit 0189d1c2c0
5 changed files with 34 additions and 11 deletions

View File

@ -164,13 +164,16 @@ var orbitDesktop = function(dom){
var $e = $(this);
var t = $e.attr("ajax-remote");
var classes_to_toggle = $e.attr("toggle-onclick");
var exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : "");
if(classes_to_toggle){
$e.toggleClass(classes_to_toggle);
}
if(t == "false"){
if(exe){
window.o[o.data_method][exe](null,$e);
}
return false;
}
var exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : "");
var ca = $e.attr("content-holder");
var a = function(){

View File

@ -1,8 +1,9 @@
<div class="toolbar hh1">
<div class="fn_g hp">
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
<%= f.submit t("save"), name: "commit", value: "Save", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
<!-- class: bt-cancle can't be remove -->
<% if not @writing_conference.new_record? %>
<%= submit_tag t("cancel"), :type => "button", "ajax-remote" => "get", :href => panel_personal_conference_desktop_conference_pages_path, class: "ini_input hp hh1 thmadm thmtxt" %>
<%= submit_tag t("cancel"), :type => "button", "ajax-remote" => "get", :href => panel_personal_conference_desktop_conference_pages_path, class: "bt-cancel ini_input hp hh1 thmadm thmtxt" %>
<% end %>
</div>
<div class="hh1 hp sdm">

View File

@ -57,10 +57,12 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
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();
});
$('.action a.remove_existing_record').click(function(){
$(this).next('.should_destroy').attr('value', 1);
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
});
}
bindHandlers();
}
@ -102,4 +104,14 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ //
o.notify(data.msg,"alert");
}
}
this.initializeJournalPapers.allnone = function(d,o){
switch(o.attr("href")){
case "all":
$("div.overview a.icon-check-empty").removeClass("icon-check-empty").addClass("icon-check");
break;
case "none":
$("div.overview a.icon-check").removeClass("icon-check").addClass("icon-check-empty");
break;
}
}
};

View File

@ -1,8 +1,10 @@
<div class="toolbar hh1">
<div class="fn_g hp">
<%= f.submit t("save"), name: "commit", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
<%= f.submit "Save", name: "commit", value: "Save", class: "fn_btn ini_input hp hh1 thmc2 thmtxt" %>
<% if not @writing_journal.new_record? %>
<%= submit_tag t("cancel"), :type => "button", "ajax-remote" => "get", :href => panel_personal_journal_desktop_journal_pages_path, class: "ini_input hp hh1 thmadm thmtxt" %>
<%= submit_tag "Cancel", :type => "button", "ajax-remote" => "get", :href => panel_personal_journal_desktop_journal_pages_path, class: "ini_input hp hh1 thmadm thmtxt" %>
<% end %>
</div>
<div class="hh1 hp sdm">
@ -188,7 +190,12 @@
<td colspan="3">
<div id='add_plugin_file' class="info_input plugin_files_block s_action">
<%= hidden_field_tag 'plugin_file_field_count', @writing_journal.writing_journal_files.count %>
<<<<<<< Updated upstream
<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>
>>>>>>> Stashed changes
</div>
</td>
</tr>

View File

@ -3,8 +3,8 @@
<div class="sdm_t hh1"><span class="icon-check"></span></div>
<div class="admbg sdm_o">
<ul id="journal_selection_options">
<li><a class="hp hh1 admtxt" href="all">All</a></li>
<li><a class="hp hh1 admtxt" href="none">None</a></li>
<li><a class="hp hh1 admtxt" href="all" ajax-remote="false" callback-method="allnone">All</a></li>
<li><a class="hp hh1 admtxt" href="none" ajax-remote="false" callback-method="allnone">None</a></li>
</ul>
</div>
</div>