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/README.md | 6 - 97suifang-front/assets/ajax/getCardDataTable | 26 ++-- 97suifang-front/assets/css/new_delete_index.css | 146 +++++++++++++++++++-- 97suifang-front/assets/css/sheet_default.css | 144 ++++++++++++++++---- 97suifang-front/assets/css/sidebar.css | 20 ++- 97suifang-front/assets/images/curve.png | Bin 1443 -> 1483 bytes 97suifang-front/assets/images/gradient_bar.png | Bin 0 -> 2444 bytes 97suifang-front/assets/images/icon_down.png | Bin 0 -> 3133 bytes .../assets/images/login-menu-popup-pointer.png | Bin 0 -> 299 bytes 97suifang-front/assets/images/userPhoto.jpg | Bin 0 -> 2965 bytes 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 +++ 97suifang-front/assets/pages/NewDeleteIndex.html | 93 ++++++++++++- 97suifang-front/assets/pages/SheetDefault.html | 22 +++- 97suifang-front/assets/pages/SideBar.html | 25 +--- .../assets/pages/popup/EditHistoryData.html | 1 + .../assets/plugins/datepicker/datepicker.css | 8 +- .../assets/plugins/datepicker/datepicker.js | 2 +- 97suifangqa/apps/indicator/models.py | 13 +- .../indicator/static/css/edit_history_data.css | 27 ++++ .../static/javascripts/edit_history_data.js | 47 ++++++- .../templates/indicator/popup/EditHistoryData.html | 31 +++-- 97suifangqa/apps/indicator/views.py | 9 +- 97suifangqa/isuifangqa.db | Bin 403456 -> 403456 bytes 26 files changed, 588 insertions(+), 118 deletions(-) create mode 100644 97suifang-front/assets/images/gradient_bar.png create mode 100644 97suifang-front/assets/images/icon_down.png create mode 100644 97suifang-front/assets/images/login-menu-popup-pointer.png create mode 100644 97suifang-front/assets/images/userPhoto.jpg diff --git a/97suifang-front/README.md b/97suifang-front/README.md index 6c57dad..a9e8320 100644 --- a/97suifang-front/README.md +++ b/97suifang-front/README.md @@ -2,9 +2,3 @@ =============== 97suifang pages - -VERSION: 2013/08/12 - -https://github.com/mjymjydark/97suifang-front - - diff --git a/97suifang-front/assets/ajax/getCardDataTable b/97suifang-front/assets/ajax/getCardDataTable index ac9b3f6..7152d35 100644 --- a/97suifang-front/assets/ajax/getCardDataTable +++ b/97suifang-front/assets/ajax/getCardDataTable @@ -1,13 +1,13 @@ -2013-08-1011:20100x10^4拷贝/mL -2013-08-0911:20100x10^4拷贝/mL -2013-08-0811:20100x10^4拷贝/mL -2013-08-0811:20100x10^4拷贝/mL -2013-08-0711:20100x10^4拷贝/mL -2013-08-0611:20100x10^4拷贝/mL -2013-08-0511:20100x10^4拷贝/mL -2013-08-0411:20100x10^4拷贝/mL -2013-08-0311:20100x10^4拷贝/mL -2013-08-0211:20100x10^4拷贝/mL -2013-08-0111:20100x10^4拷贝/mL -2013-07-3111:20100x10^4拷贝/mL -2013-07-3011:20100x10^4拷贝/mL \ No newline at end of file +2013-08-10100x10^4拷贝/mL正常 +2013-08-09100x10^4拷贝/mL异常 +2013-08-08100x10^4拷贝/mL正常 +2013-08-08100x10^4拷贝/mL异常 +2013-08-07100x10^4拷贝/mL正常 +2013-08-06100x10^4拷贝/mL异常 +2013-08-05100x10^4拷贝/mL正常 +2013-08-04100x10^4拷贝/mL异常 +2013-08-03100x10^4拷贝/mL正常 +2013-08-02100x10^4拷贝/mL异常 +2013-08-01100x10^4拷贝/mL正常 +2013-07-31100x10^4拷贝/mL异常 +2013-07-30100x10^4拷贝/mL正常 \ No newline at end of file diff --git a/97suifang-front/assets/css/new_delete_index.css b/97suifang-front/assets/css/new_delete_index.css index aaee1a6..64f2b41 100644 --- a/97suifang-front/assets/css/new_delete_index.css +++ b/97suifang-front/assets/css/new_delete_index.css @@ -1,9 +1,107 @@ +#login_container { + float: left; + position: relative; + z-index: 999; + width: 865px; + height: 85px; + margin-left: 490px; +} +.logged-in { + float: right; + margin-top: 26px; + right: 16px; + width: 160px; +} +#login.logged-in .user-name, #login.logged-in .user-level, #login.logged-in .user-photo, #login.logged-in .drop-down-menu-button { + vertical-align: bottom; +} +#login.logged-in .user-photo { + position: relative; + top: 2px; + display: none; +} +#login.logged-in .user-level { + font-size: 1em; + line-height: 1em; + padding: 0.05em 0.25em 0.05em 0.2em; + display: none; +} +.green-block { + background-color: #7BB81B; + color: #FFFFFF; +} +.number-block { + border-radius: 3px 3px 3px 3px; + font-family: "Courier New","DejaVu Sans Mono",monospace,sans-serif,"STHeiti","WenQuanYi Micro Hei","Microsoft YaHei",SimSun,sans-serif; + text-align: center; + width: 1.3em; +} +#login.logged-in .drop-down-area { + cursor: pointer; +} +#login.logged-in .user-name { + font-size: 1.14286em; + font-weight: bold; + line-height: 1em; +} +#login.logged-in .drop-down-menu { + background-color: #FFFFFF; + border: 1px solid #C9C9C9; + border-radius: 2px 2px 2px 2px; + box-shadow: 0 0 10px rgba(85, 85, 85, 0.5); + color: #000000; + display: none; + margin-top: 10px; + position: absolute; + z-index: 999; + width: 168px; + height: 91px; +} +#login.logged-in .drop-down-menu .text-pointer { + background: url("../images/login-menu-popup-pointer.png") no-repeat scroll 0 0 transparent; + height: 8px; + left: 100px; + margin-left: -10px; + position: absolute; + top: -8px; + width: 20px; +} +#login.logged-in .drop-down-menu ul { + margin: 0; + padding: 0; + list-style: none outside none; +} +#login.logged-in .drop-down-menu ul li { + border-bottom: 1px solid #EFEFEF; + padding: 2px; +} +#login.logged-in .drop-down-menu ul li a { + border-radius: 2px 2px 2px 2px; + color: inherit; + display: block; + padding-bottom: 0.2em; + padding-left: 1em; + padding-top: 0.2em; + text-decoration: none; + width: 150px; +} +#login.logged-in .drop-down-menu ul li.last { + border-bottom: medium none; +} +#login.logged-in .drop-down-menu.open { + display: block; +} + + + #new_delete_container { float: left; - margin-left: 37px; + margin-left: 457px; + position: absolute; + margin-top: 85px; } .new_delete_title { - width: 596px; + width: 696px; height: 26px; } .new_delete_title .content { @@ -19,10 +117,12 @@ height: 26px; line-height: 26px; position: relative; + width: 158px; } .new_delete_title .search input { float: left; height: 20px; + line-height: normal; width: 127px; border: 1px solid #CACACA; background-color: #FFFFFF; @@ -48,12 +148,12 @@ } .index_navigation .index_type { float: left; - width: 63px; + width: 72px; height: 20px; text-align: center; border: 1px solid #B5B5B5; border-radius: 2px; - margin-right: 11px; + margin-right: 15px; } .index_navigation .index_type a{ color: #7E7E7E; @@ -62,6 +162,8 @@ } .index_navigation #index_all { margin-right: 0; + float: right; + width: 71px; } .index_navigation .selected { background-color: #99CC33; @@ -75,13 +177,12 @@ } .show_indexes .index_container { float: left; - width: 252px; + width: 302px; height: 437px; border: 1px solid #b6b6b6; z-index: 1; position: relative; padding: 6px 12px 0 12px; - overflow: hidden; } .show_indexes .add_concerned_icon { float: left; @@ -108,10 +209,12 @@ color: #4A4A4A; float: left; } -.show_indexes .index_container .index_title_container .example_sheet { +.show_indexes .index_container .index_title_container .example_sheet a{ float: right; color: #4A4A4A; margin-top: 4px; + cursor: pointer; + text-decoration: none; } .show_indexes .index_container .index_title_container .index_btn { float: right; @@ -128,6 +231,7 @@ .index_line .index_name, .index_line .index_category { float: left; font-size: 14px; + width: 45px; height: 20px; line-height: 20px; color: #4A4A4A; @@ -137,10 +241,10 @@ .index_lines .add .icon { width: 20px; height: 20px; - float: right; background: url("../images/addicon.png"); - margin-right: 2px; cursor: pointer; + position: absolute; + left: 260px; } .index_lines .add .index_name, .index_lines .add .index_category, .index_lines .minus .index_name { color: #FFFFFF; @@ -148,10 +252,10 @@ .index_lines .minus .icon { width: 20px; height: 20px; - float: right; background: url("../images/minusicon.png"); - margin-right: 2px; cursor: pointer; + position: absolute; + left: 260px; } .index_lines .add, .index_lines .minus { background: #8FC31F; @@ -177,9 +281,17 @@ float: left; color: #8F8F8F; font-size: 15px; - margin-right: 4px; + margin-right: 7px; cursor: pointer; } +.all_condition .index_all_letter .letter_selected{ + color: #99CC33; +} +.index_letter_container { + height: 360px; + position: relative; + overflow: auto; +} .index_letter_container .index_lines { margin-bottom: 46px; } @@ -189,4 +301,14 @@ color: #4A4A4A; border-bottom: 1px solid #BFBFBF; height: 24px; +} +.show_indexes .index_container .right { + position: relative; + height: 405px; + overflow: auto; +} +.show_indexes .index_container .left { + position: relative; + height: 405px; + overflow: auto; } \ No newline at end of file diff --git a/97suifang-front/assets/css/sheet_default.css b/97suifang-front/assets/css/sheet_default.css index aca021c..996ee08 100644 --- a/97suifang-front/assets/css/sheet_default.css +++ b/97suifang-front/assets/css/sheet_default.css @@ -1,10 +1,106 @@ +#login_container { + float: left; + position: relative; + width: 865px; + height: 85px; + margin-left: 490px; +} +.logged-in { + float: right; + margin-top: 26px; + right: 16px; + width: 160px; +} +#login.logged-in .user-name, #login.logged-in .user-level, #login.logged-in .user-photo, #login.logged-in .drop-down-menu-button { + vertical-align: bottom; +} +#login.logged-in .user-photo { + position: relative; + top: 2px; + display: none; +} +#login.logged-in .user-level { + font-size: 1em; + line-height: 1em; + padding: 0.05em 0.25em 0.05em 0.2em; + display: none; +} +.green-block { + background-color: #7BB81B; + color: #FFFFFF; +} +.number-block { + border-radius: 3px 3px 3px 3px; + font-family: "Courier New","DejaVu Sans Mono",monospace,sans-serif,"STHeiti","WenQuanYi Micro Hei","Microsoft YaHei",SimSun,sans-serif; + text-align: center; + width: 1.3em; +} +#login.logged-in .drop-down-area { + cursor: pointer; +} +#login.logged-in .user-name { + font-size: 1.14286em; + font-weight: bold; + line-height: 1em; +} +#login.logged-in .drop-down-menu { + background-color: #FFFFFF; + border: 1px solid #C9C9C9; + border-radius: 2px 2px 2px 2px; + box-shadow: 0 0 10px rgba(85, 85, 85, 0.5); + color: #000000; + display: none; + margin-top: 10px; + position: absolute; + z-index: 999; + width: 168px; + height: 91px; +} +#login.logged-in .drop-down-menu .text-pointer { + background: url("../images/login-menu-popup-pointer.png") no-repeat scroll 0 0 transparent; + height: 8px; + left: 100px; + margin-left: -10px; + position: absolute; + top: -8px; + width: 20px; +} +#login.logged-in .drop-down-menu ul { + margin: 0; + padding: 0; + list-style: none outside none; +} +#login.logged-in .drop-down-menu ul li { + border-bottom: 1px solid #EFEFEF; + padding: 2px; +} +#login.logged-in .drop-down-menu ul li a { + border-radius: 2px 2px 2px 2px; + color: inherit; + display: block; + padding-bottom: 0.2em; + padding-left: 1em; + padding-top: 0.2em; + text-decoration: none; + width: 150px; +} +#login.logged-in .drop-down-menu ul li.last { + border-bottom: medium none; +} +#login.logged-in .drop-down-menu.open { + display: block; +} + + #right_container { - width: 596px; + width: 696px; float: left; - margin-left: 457px; + position: absolute; + margin : 85px 0 0 490px; + padding-bottom: 50px; } #index_status_container { - width: 596px; + width: 696px; } .index_title { color: #4a4a4a; @@ -31,7 +127,7 @@ cursor: pointer; } .detail_card_info { - width: 562px; + width: 662px; border: 1px solid #CACACA; position: relative; float: left; @@ -61,10 +157,10 @@ .detail_card_info .search_data_div { margin-top: 9px; margin-bottom: 17px; - width: 562px; + width: 662px; } .detail_card_info .search_data_div input[type='button'] { - width: 80px; + width: 100px; height: 23px; line-height: 23px; float: left; @@ -83,13 +179,13 @@ float: right; } .detail_card_info .search_data_div .end_date_container { - margin-left: 10px; + margin-left: 25px; } .detail_card_info .search_data_div .datepicker_container .datepicker { background: #FFFFFF; border: 1px solid #9C9C9C; color: #B9B9B9; - width: 107px; + width: 117px; height: 17px; line-height: 17px; position: relative; @@ -126,8 +222,8 @@ line-height: 24px; } .index_card { - width: 278px; - height: 375px; + width: 328px; + height: 434px; border: 1px solid #CACACA; margin-top: 9px; border-radius: 2px; @@ -155,7 +251,7 @@ } .index_card .edit_data, .index_card .editing_data { height: 25px; - margin-top: 7px; + margin-top: 25px; } .index_card .edit_data .explain_icon { margin-right: 2px; @@ -234,7 +330,7 @@ .index_card .refresh_data { height: 23px; line-height: 23px; - margin-top: 3px; + margin-top: 15px; } .index_card .refresh_data .refresh_text { float: left; @@ -251,7 +347,7 @@ width: 148px; height: 23px; position: relative; - margin-top: 3px; + margin-top: 15px; display: none; } .index_card .select_date .datepicker { @@ -275,13 +371,13 @@ height: 85px; width: 85px; float: left; - margin: 40px 0 0 95px; + margin: 45px 0 0 135px; cursor: pointer; } .index_card .edit_icon_container .curve_icon { background: url("../images/curve.png") no-repeat; height: 125px; - width: 97px; + width: 105px; float: left; } .index_card .edit_text { @@ -289,15 +385,17 @@ text-align: center; height: 20px; line-height: 20px; - margin-top: 11px; + margin-top: 20px; margin-bottom: 100px; } .index_card .chart { height: 230px; + margin-top: 10px; } .index_card .card_bottom { height: 30px; - width: 596px; + position: absolute; + bottom: 0; } .index_card .card_bottom .understand_index, .index_card .card_bottom .simulation_sheet, .index_card .card_bottom .detail_history { float: left; @@ -308,10 +406,10 @@ text-decoration: none; } .index_card .card_bottom .understand_index { - width: 99px; + width: 120px; } .index_card .card_bottom .simulation_sheet { - width: 96px; + width: 115px; } .index_card .card_delete { background: url('../images/closed.png') no-repeat; @@ -334,13 +432,13 @@ cursor: pointer; } .act_card_container { - width: 293px; + width: 343px; height: 380px; } .act_card{ - width: 290px; - height: 96px; - line-height: 96px; + width: 340px; + height: 118px; + line-height: 118px; text-align: center; border: 2px dashed #A0A0A0; margin-top: 9px; diff --git a/97suifang-front/assets/css/sidebar.css b/97suifang-front/assets/css/sidebar.css index 39a6ce0..9fed783 100644 --- a/97suifang-front/assets/css/sidebar.css +++ b/97suifang-front/assets/css/sidebar.css @@ -3,9 +3,10 @@ } #sidebar_container{ padding: 1.5em 0; + position: absolute; z-index: 10; width: 420px; - height: 720px; + height: 1020px; background-color: #F3F3F1; } @@ -85,6 +86,7 @@ #compare_container .post-question .searchdiv .question { width: 289px; height: 29px; + line-height: normal; border: 1px solid #c1b59d; } #compare_container .post-question .searchdiv .submit { @@ -162,7 +164,7 @@ #compare_container .similar_container .similar_content .similar_title { color: #a0a0a0; font-size: 14px; - margin-bottom: 25px; + margin-bottom: 21px; } #compare_container .similar_container .similar_content .specifix_content { background: url("../images/dialog-default.png") no-repeat; @@ -172,6 +174,12 @@ margin-bottom: 35px; line-height:47px; } +#compare_container .similar_container .similar_content #specifix_content1, #compare_container .similar_container .similar_content #specifix_content2 { + margin-bottom: 37px; +} +#compare_container .similar_container .similar_content #specifix_content3{ + margin-bottom: 31px; +} .specifix_content .specifix_text { padding-left: 25px; font-size: 15px; @@ -182,6 +190,7 @@ height: 37px; border-radius: 3px; margin-top: 8px; + cursor: pointer; } #compare_container .compare_btn .compare_btn_in{ border: 1px solid #b8db71; @@ -200,6 +209,13 @@ text-align: center; border-radius: 3px; } +#compare_container .compare_btn .compare_btn_in:hover { + background: #93C431; +} +#compare_container .compare_btn .compare_btn_in:active { + background: #8AB82E; + box-shadow: 0 0 10px rgba(85 85 85 0.5) inset; +} #compare_container .logo_container { margin-top: 30px; text-align: center; diff --git a/97suifang-front/assets/images/curve.png b/97suifang-front/assets/images/curve.png index 309f262..8464391 100644 Binary files a/97suifang-front/assets/images/curve.png and b/97suifang-front/assets/images/curve.png differ diff --git a/97suifang-front/assets/images/gradient_bar.png b/97suifang-front/assets/images/gradient_bar.png new file mode 100644 index 0000000..4e2bbb9 Binary files /dev/null and b/97suifang-front/assets/images/gradient_bar.png differ diff --git a/97suifang-front/assets/images/icon_down.png b/97suifang-front/assets/images/icon_down.png new file mode 100644 index 0000000..b3685d2 Binary files /dev/null and b/97suifang-front/assets/images/icon_down.png differ diff --git a/97suifang-front/assets/images/login-menu-popup-pointer.png b/97suifang-front/assets/images/login-menu-popup-pointer.png new file mode 100644 index 0000000..9728ea7 Binary files /dev/null and b/97suifang-front/assets/images/login-menu-popup-pointer.png differ diff --git a/97suifang-front/assets/images/userPhoto.jpg b/97suifang-front/assets/images/userPhoto.jpg new file mode 100644 index 0000000..a9a8380 Binary files /dev/null and b/97suifang-front/assets/images/userPhoto.jpg differ 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); } diff --git a/97suifang-front/assets/pages/NewDeleteIndex.html b/97suifang-front/assets/pages/NewDeleteIndex.html index 2f0aee6..fc5208b 100644 --- a/97suifang-front/assets/pages/NewDeleteIndex.html +++ b/97suifang-front/assets/pages/NewDeleteIndex.html @@ -11,7 +11,25 @@ - + +
+
+ + 6 + + mjymjydark + + + +
+
添加或删除关注指标
@@ -95,7 +113,7 @@
-
+ block
D
@@ -311,7 +329,7 @@
@@ -420,5 +504,4 @@ - - + \ No newline at end of file diff --git a/97suifang-front/assets/pages/SheetDefault.html b/97suifang-front/assets/pages/SheetDefault.html index 22dc954..993f159 100644 --- a/97suifang-front/assets/pages/SheetDefault.html +++ b/97suifang-front/assets/pages/SheetDefault.html @@ -17,7 +17,25 @@ - + +
+
+ + 6 + + mjymjydark + + + +
+
指标状态
@@ -172,8 +190,8 @@ - +
日期时间 记录状态
diff --git a/97suifang-front/assets/pages/SideBar.html b/97suifang-front/assets/pages/SideBar.html index 81068b9..e44425b 100644 --- a/97suifang-front/assets/pages/SideBar.html +++ b/97suifang-front/assets/pages/SideBar.html @@ -1,7 +1,7 @@ - + demo @@ -39,27 +39,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
经比对,下文中的被研究患者与您很像:
-
有 80% 的患者有感到头疼
-
有 10% 的患者有感到头疼并且也感觉到肌疼
-
有 20% 的患者ALT到达过正常值
-
有 3% 的患者有感到肌疼
+
有 80% 的患者有感到头疼
+
有 10% 的患者有感到头疼并且也感觉到肌疼
+
有 20% 的患者ALT到达过正常值
+
有 3% 的患者有感到肌疼
diff --git a/97suifang-front/assets/pages/popup/EditHistoryData.html b/97suifang-front/assets/pages/popup/EditHistoryData.html index 851b24e..972cb05 100644 --- a/97suifang-front/assets/pages/popup/EditHistoryData.html +++ b/97suifang-front/assets/pages/popup/EditHistoryData.html @@ -15,6 +15,7 @@
+
日期:2013-07-16 时间:11:20 diff --git a/97suifang-front/assets/plugins/datepicker/datepicker.css b/97suifang-front/assets/plugins/datepicker/datepicker.css index 5732386..45b7bfc 100644 --- a/97suifang-front/assets/plugins/datepicker/datepicker.css +++ b/97suifang-front/assets/plugins/datepicker/datepicker.css @@ -58,14 +58,14 @@ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } .ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } .ui-widget-content a { color: #333333; } -.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +.ui-widget-header { border: 1px solid #b8db71; background: #99CC33; color: #ffffff; font-weight: bold; } .ui-widget-header a { color: #ffffff; } /* Interaction states ----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #4c4948; } .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #006699; background: #cce0eb; font-weight: bold; color: #006699; } .ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } @@ -324,7 +324,7 @@ */ .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; cursor: pointer;} .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } .ui-datepicker .ui-datepicker-prev { left:2px; } .ui-datepicker .ui-datepicker-next { right:2px; } diff --git a/97suifang-front/assets/plugins/datepicker/datepicker.js b/97suifang-front/assets/plugins/datepicker/datepicker.js index 5c4ed85..8370ab4 100644 --- a/97suifang-front/assets/plugins/datepicker/datepicker.js +++ b/97suifang-front/assets/plugins/datepicker/datepicker.js @@ -2831,7 +2831,7 @@ return a } function bindHover(a) { - var b = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; + var b = "button, .ui-datepicker-calendar td a"; return a.bind("mouseout", function(a) { var c = $(a.target).closest(b); ! c.length || c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover") diff --git a/97suifangqa/apps/indicator/models.py b/97suifangqa/apps/indicator/models.py index 0a3c8a5..b992a1f 100644 --- a/97suifangqa/apps/indicator/models.py +++ b/97suifangqa/apps/indicator/models.py @@ -396,15 +396,16 @@ class IndicatorRecord(models.Model): # {{{ NOTE: convert record data to 'standard unit' before comparison """ sind = self.indicator - # unit relation - unit_rel = self.unit.relation - v = sympy.symbols('v') - rel_sym = sympy.sympify(unit_rel) - # error message - errmsg = u"'%s' 求值错误,请检查只含有变量 'v'" % unit_rel # check if sind.dataType in [sind.FLOAT_TYPE, sind.RANGE_TYPE, sind.FLOAT_RANGE_TYPE]: + # unit relation + unit_rel = self.unit.relation + v = sympy.symbols('v') + rel_sym = sympy.sympify(unit_rel) + # error message + errmsg = u"'%s' 求值错误,请检查只含有变量 'v'" % unit_rel + # check InnateConfine for the Indicator first if not sind.check_confine(): return False # InnateConfine is ok diff --git a/97suifangqa/apps/indicator/static/css/edit_history_data.css b/97suifangqa/apps/indicator/static/css/edit_history_data.css index 9775539..49005be 100644 --- a/97suifangqa/apps/indicator/static/css/edit_history_data.css +++ b/97suifangqa/apps/indicator/static/css/edit_history_data.css @@ -1,3 +1,26 @@ +/* + * How To Change Radio Button Checkbox Style in CSS: + * http://viralpatel.net/blogs/css-radio-button-checkbox-background/ + */ +input[type="radio"] { + display: none; + margin: 4px; + vertical-align: middle; +} +input[type="radio"] + label { + display: inline-block; + height: 17px; + line-height: 17px; + margin-right: 2px; + padding: 2px 7px; + background-color: #F3F3F1; + border: 1px solid #9C9C9C; +} +input[type="radio"]:checked + label { + background-image: none; + background-color: #99CC33; +} + #edit_history_data_container { width: 588px; height: 180px; @@ -147,6 +170,10 @@ .edit_history_data_content .editing_data .data .invalid { border: 2px solid red; } +.edit_history_data_content .editing_data .data .radio_input { + margin-right: 8px; + float: left; +} .edit_history_data_content .editing_data .data .data_input { width: 200px; height: 17px; diff --git a/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js b/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js index f4deafd..e0dff4a 100644 --- a/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js +++ b/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js @@ -74,10 +74,21 @@ $(document).ready(function(){ }); // }}} + // initalize // set datepicker 'date_input' value var date_init = $.datepicker.parseDate('yy-mm-dd', $(".date_input").attr('value')); $(".date_input").datepicker("setDate", date_init); + // select radio button according to the original value + if ($(".editing_data .radio_input").length) { + $(".radio_input input:radio").prop("checked", false); + } + if (record.value === '-') { + $(".radio_input #minus_r").prop("checked", true); + } + else { + $(".radio_input #plus_r").prop("checked", true); + } // record data validate {{{ // date {{{ @@ -314,9 +325,41 @@ $(document).ready(function(){ else if (data_type == DATA_TYPES.FLOAT_RANGE_TYPE) { // TODO } - else if (data_type == DATA_TYPES.PM_TYPE) { + else if (data_type == DATA_TYPES.PM_TYPE) { // {{{ // TODO - } + var radioinput_help = '

请直接点击选择

'; + // tooltip + $(".radio_input").qtip({ + id: 'radioinput', + prerender: false, + content: { + text: radioinput_help + }, + position: { + my: 'bottom left', + at: 'top right' + }, + show: { + event: 'mouseenter' + }, + hide: { + event: 'mouseleave unfocus' + } + }); + // validate + $(".radio_input").on('validate', null, function() { + if ($(".radio_input input:radio:checked").length != 1) { + var qtip_content = '

请选择化验结果

'; + $(this).qtip('api').set('content.text', + qtip_content); + $(this).qtip('api').show(); + } + else { + // valid + record_data.value = $(".radio_input input:radio:checked").val(); + } + }); + } // }}} else { // unknown return false; diff --git a/97suifangqa/apps/indicator/templates/indicator/popup/EditHistoryData.html b/97suifangqa/apps/indicator/templates/indicator/popup/EditHistoryData.html index 70ec582..340057b 100644 --- a/97suifangqa/apps/indicator/templates/indicator/popup/EditHistoryData.html +++ b/97suifangqa/apps/indicator/templates/indicator/popup/EditHistoryData.html @@ -44,15 +44,10 @@ 'PM_TYPE': '{{ indicator_obj.PM_TYPE }}' }; var data_type = '{{ indicator_obj.dataType }}'; + // indicator record + var record = $.parseJSON('{{ record_json|safe }}'); // indicator confine - var confine = { - 'val_norm': '{{ confine_dict|dict_get:"val_norm" }}', - 'human_min': {{ confine_dict|dict_get:"human_min" }}, - 'human_max': {{ confine_dict|dict_get:"human_max" }}, - 'math_min': {{ confine_dict|dict_get:"math_min" }}, - 'math_max': {{ confine_dict|dict_get:"math_max" }}, - 'math_range_html': '{{ confine_dict|dict_get:"math_range_html" }}' - }; + var confine = $.parseJSON('{{ confine_json|safe }}'); // range symbol: var range_symbol = '~'; @@ -133,14 +128,22 @@ {% elif indicator_obj.dataType == indicator_obj.PM_TYPE %} {# PM_TYPE #} -
- - 阴性(-) +
+ + + + +
+ {% else %} {# UNKNOWN TYPE #} ERROR: unknown data type diff --git a/97suifangqa/apps/indicator/views.py b/97suifangqa/apps/indicator/views.py index aa05ab4..aa51663 100644 --- a/97suifangqa/apps/indicator/views.py +++ b/97suifangqa/apps/indicator/views.py @@ -824,16 +824,21 @@ def indicator_edithistorydata(request): 'date': record_date.isoformat(), 'value_html': record_value_html, 'value_text': record_value_text, + 'value': record_value, + 'val_min': record_val_min, + 'val_max': record_val_max, 'unit_name': record_unit_name, 'unit_symbol': record_unit_symbol, 'is_normal': record_is_normal, } data = { 'confine_dict': confine_dict, + 'confine_json': json.dumps(confine_dict), 'indicator_obj': ind_obj, 'indicator_dict': ind_dict, 'record_obj': record_obj, 'record_dict': record_dict, + 'record_json': json.dumps(record_dict), } # return render(request, template, data) @@ -1310,8 +1315,8 @@ def ajax_modify_record(request): and add a 'RecordHistory' for the record """ data = {'failed': True, 'error_code': 1, 'error_string': 'unknown'} - if request.method == 'POST': - #if request.is_ajax() and request.method == 'POST': + #if request.method == 'POST': + if request.is_ajax() and request.method == 'POST': print request.POST.dict() record_id = request.POST.get('record_id') date_str = request.POST.get('date') diff --git a/97suifangqa/isuifangqa.db b/97suifangqa/isuifangqa.db index b1ac220..229fa8f 100644 Binary files a/97suifangqa/isuifangqa.db and b/97suifangqa/isuifangqa.db differ -- cgit v1.2.2