url handling modified.. tinyscrollbar modified… star checkbox fixed..

This commit is contained in:
Harry Bomrah 2013-03-01 14:45:20 +08:00 committed by Rueshyna
parent 23c8c28b52
commit 2ead541733
2 changed files with 13 additions and 4 deletions

View File

@ -159,11 +159,20 @@ var orbitDesktop = function(dom){
$("body").on("click","*[ajax-remote]",function(){ $("body").on("click","*[ajax-remote]",function(){
var $e = $(this); var $e = $(this);
var t = $e.attr("ajax-remote");
var classes_to_toggle = $e.attr("toggle-onclick");
if(classes_to_toggle){
$e.toggleClass(classes_to_toggle);
}
if(t == "false"){
return false;
}
var exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : ""); var exe = $e.attr("callback-method"); // (typeof $e.attr("callback-method") == "function"? $e.attr("callback-method") : "");
var ca = $e.attr("content-holder"); var ca = $e.attr("content-holder");
var a = function(){ var a = function(){
$.ajax({ $.ajax({
type : $e.attr("ajax-remote"), type : t,
url : $e.attr("href"), url : $e.attr("href"),
success : function(data){ success : function(data){
if(typeof data == "string"){ if(typeof data == "string"){
@ -300,7 +309,7 @@ var orbitDesktop = function(dom){
$("div[container=true] div.overview").html(temp_div.html()); $("div[container=true] div.overview").html(temp_div.html());
o.tinyscrollbar_ext({ o.tinyscrollbar_ext({
main : ".tinycanvas", main : ".tinycanvas",
fill : base_width * total_columns fill : base_width * (total_columns++) + 250
}) })
} }

View File

@ -11,8 +11,8 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
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=>"", :class => "icon-check-empty", "toggle-onclick"=>"icon-check-empty icon-check", "ajax-remote"=>"false") + \
content_tag(:a, "", :class => "icon-star-empty") 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