From 62efe8809e2cdfc84666dbd5e987a4ce473a047a Mon Sep 17 00:00:00 2001 From: Alvin Li Date: Mon, 9 Sep 2013 10:10:17 +0800 Subject: * finished modifying 'PM_TYPE' record for 'EditHistoryData' page * synced '97suifang-front' TODO: * to merge changes of '97suifang-front' --- 97suifang-front/assets/js/edit_history_data.js | 5 +++ 97suifang-front/assets/js/load_card.js | 9 +++-- 97suifang-front/assets/js/new_delete_index.js | 54 ++++++++++++++++++++++++-- 97suifang-front/assets/js/sheetdefault.js | 18 +++++++++ 4 files changed, 79 insertions(+), 7 deletions(-) (limited to '97suifang-front/assets/js') diff --git a/97suifang-front/assets/js/edit_history_data.js b/97suifang-front/assets/js/edit_history_data.js index e664a39..202ee27 100644 --- a/97suifang-front/assets/js/edit_history_data.js +++ b/97suifang-front/assets/js/edit_history_data.js @@ -80,4 +80,9 @@ $(document).ready(function(){ return false; }); + + $(".edit_history_data_close").bind("click", function(){ + parent.TB_remove(); + return false; + }); }); \ No newline at end of file diff --git a/97suifang-front/assets/js/load_card.js b/97suifang-front/assets/js/load_card.js index bea4f29..44de091 100644 --- a/97suifang-front/assets/js/load_card.js +++ b/97suifang-front/assets/js/load_card.js @@ -93,7 +93,7 @@ $(document).ready(function(){ renderTo: 'detail_chart', type: 'area', marginLeft: 25, - width: 562, + width: 672, height: 303, spacingTop: 10, spacingBottom: 0, @@ -177,9 +177,10 @@ $(document).ready(function(){ point: { events: { click: function() { - alert(this.x); - alert(this.y); - TB_show(false, '../pages/popup/EditHistoryData.html?TB_iframe=true&no1_title&transfer_params&height=351&width=630&card_id=3', false); + alert("This is x-axis timestamp: "+this.x); + alert("This is y-axis date: "+this.y); + alert("Above parameters will be send in the popup layer, please get the paremeters and apply it"); + TB_show(false, '../pages/popup/EditHistoryData.html?TB_iframe=true&no1_title&transfer_params&height=351&width=630&card_id=3&time='+this.x+'&data='+this.y, false); } } } diff --git a/97suifang-front/assets/js/new_delete_index.js b/97suifang-front/assets/js/new_delete_index.js index f3fc5de..8fc46e8 100644 --- a/97suifang-front/assets/js/new_delete_index.js +++ b/97suifang-front/assets/js/new_delete_index.js @@ -1,4 +1,39 @@ +var select_letter = ''; +var select_index_obj = null; $(document).ready(function(){ + $(".index_type").each(function(){ + if($(this).hasClass("selected")){ + select_index_obj = $(this); + return false; + } + }); + $(".index_type").hover( + function(){ + $(this).addClass("selected"); + }, + function(){ + if(!$(this).is(select_index_obj)){ + $(this).removeClass("selected"); + } + } + ); + + /************************ 登录控件交互 Start ********************************/ + $(".drop-down-area").bind("click", function(){ + var drop_down_menu = $(".drop-down-menu"); + if(drop_down_menu.hasClass("open")){ + drop_down_menu.removeClass("open"); + }else{ + drop_down_menu.addClass("open"); + } + return false; + }); + $("body").bind("click", function(){ + $(".drop-down-menu").removeClass("open"); + }); + /************************ 登录控件交互 Start ********************************/ + + $("#search_btn").bind("click", function(){ var kw = $("#search_kw").val(); window.location.href = '?kw='+kw; @@ -51,12 +86,25 @@ $(document).ready(function(){ return false; }); $(".all_condition>.index_all_letter>div").bind("click", function(){ - $(".index_letter_container>.index_lines").hide(); + $(".letter_selected").removeClass("letter_selected"); + $(this).addClass("letter_selected"); + var container = $(".index_letter_container"); var letterClass = $(this).text(); - $("."+letterClass).show(); - $("."+letterClass).nextAll().show(); + var scrollTo = $("."+letterClass); + container.scrollTop(scrollTo.offset().top - container.offset().top + container.scrollTop()); + select_letter = letterClass; return false; }); + $(".all_condition>.index_all_letter>div").hover( + function(){ + $(this).addClass("letter_selected"); + }, + function(){ + if(select_letter != $(this).text()){ + $(this).removeClass("letter_selected"); + } + } + ); $("#submitIndexBtn").bind("click", function(){ var commit_index = ''; $(".right>.index_line").each(function(){ diff --git a/97suifang-front/assets/js/sheetdefault.js b/97suifang-front/assets/js/sheetdefault.js index 51bd8fa..cda7a27 100644 --- a/97suifang-front/assets/js/sheetdefault.js +++ b/97suifang-front/assets/js/sheetdefault.js @@ -1,6 +1,21 @@ var card_2_delete_id; var card_detail_id; $(document).ready(function(){ + /************************ 登录控件交互 Start ********************************/ + $(".drop-down-area").bind("click", function(){ + var drop_down_menu = $(".drop-down-menu"); + if(drop_down_menu.hasClass("open")){ + drop_down_menu.removeClass("open"); + }else{ + drop_down_menu.addClass("open"); + } + return false; + }); + $("body").bind("click", function(){ + $(".drop-down-menu").removeClass("open"); + }); + /************************ 登录控件交互 Start ********************************/ + //不允许input框复制,减少验证粘帖的交互 $("input[type='text']").bind("paste", function(){ return false; @@ -160,6 +175,9 @@ $(document).ready(function(){ } }); $("#search_end_date").datepicker({ + showOn: "both", + buttonImage: "../plugins/datepicker/images/calendar.png", + buttonImageOnly: true, onClose: function( selectedDate ) { $("#search_start_date").datepicker("option", "maxDate", selectedDate); } -- cgit v1.2.2