From 1e4a9c0565c3d2f52ec205ae7627ebfc84278735 Mon Sep 17 00:00:00 2001 From: Alvin Li Date: Wed, 30 Oct 2013 10:16:21 +0800 Subject: * merged commits from 'maxwell lou' by time '20131028_09:52'; * moved 'ValueKind' model from 'recommend/models' to 'indicator/models' * added field 'type' for 'indicator.models.Indicator' * added field 'kind' for 'indicator.models.IndicatorRecord', 'InnateConfine' * updated methods for models 'Indicator', 'IndicatorRecord', 'InnateConfine' * updated views and templates for 'apps/indicator' * added 'INDICATOR_RECOMMEND_PERIOD' into 'settings.py' * added 'type' field for 'indicator.models.Indicator' in 'search_indexes.py' * added a confirm step for 'EditHistoryData' page when delete a record * removed dir 'backupdata'; 'queries.txt' moved to 'backup' dir * moved *.json to 'backup' dir * removed 'apps/managers*.py' * updated 'indicator/popup/IndexDesc.html' * created dir 'apps/indicator/obsolete'; * moved 'indicator/forms.py' to dir 'obsolete'; * splitted views related forms.py from 'views.py', and placed in 'obsolete/views_forms.py' * loadded newest data into database * cleaned pervious data files in 'backup' dir * updated 'README.txt'; added a solution to a redis problem * added field 'type' of 'indicator.models.Indicator'; for filtering search results and only returning 'NORMAL_TYPE' --- 97suifangqa/apps/__init__.py | 0 .../apps/indicator/fixtures_bak/initial_data.json | 862 -------------- 97suifangqa/apps/indicator/forms.py | 321 ------ 97suifangqa/apps/indicator/models.py | 318 +++-- 97suifangqa/apps/indicator/obsolete/forms.py | 321 ++++++ 97suifangqa/apps/indicator/obsolete/views_forms.py | 311 +++++ 97suifangqa/apps/indicator/search_indexes.py | 5 +- .../apps/indicator/static/css/delete_card_tip.css | 38 +- .../indicator/static/css/edit_history_data.css | 135 ++- 97suifangqa/apps/indicator/static/css/nav.css | 1213 ++++++++++++++++++++ .../apps/indicator/static/css/new_delete_index.css | 133 ++- .../apps/indicator/static/css/normalize.css | 32 +- .../apps/indicator/static/css/sheet_default.css | 167 ++- 97suifangqa/apps/indicator/static/css/sidebar.css | 41 +- .../apps/indicator/static/images/addicon.png | Bin 707 -> 4339 bytes .../apps/indicator/static/images/cancel_edit.png | Bin 768 -> 4431 bytes .../apps/indicator/static/images/confirm_edit.png | Bin 647 -> 4475 bytes .../indicator/static/images/last_edit_data.png | Bin 2057 -> 4748 bytes .../apps/indicator/static/images/minusicon.png | Bin 762 -> 4241 bytes 97suifangqa/apps/indicator/static/images/pen.png | Bin 3184 -> 4254 bytes .../apps/indicator/static/images/pen_large.png | Bin 1379 -> 4719 bytes .../apps/indicator/static/images/search.png | Bin 525 -> 4713 bytes .../apps/indicator/static/images/sheet/AFP.jpg | Bin 0 -> 70436 bytes .../apps/indicator/static/images/sheet/PCR.jpg | Bin 0 -> 68843 bytes .../apps/indicator/static/images/sheet/PT.jpg | Bin 0 -> 88070 bytes .../apps/indicator/static/images/sheet/gene.jpg | Bin 0 -> 88708 bytes .../\344\270\244\345\257\271\345\215\212.jpg" | Bin 0 -> 101053 bytes .../\350\202\235\345\212\237\350\203\275.jpg" | Bin 0 -> 179388 bytes ...0\274\345\275\242\345\274\217\344\272\2141.jpg" | Bin 0 -> 143002 bytes ...02\235\350\204\217\347\241\254\345\272\246.jpg" | Bin 0 -> 208302 bytes .../\350\241\200\347\273\206\350\203\236.jpg" | Bin 0 -> 164684 bytes .../images/sheet/\350\241\250\346\240\2741.jpg" | Bin 0 -> 101067 bytes .../images/sheet/\350\241\250\346\240\2745.jpg" | Bin 0 -> 88284 bytes .../static/javascripts/edit_history_data.js | 18 +- .../static/javascripts/new_delete_index.js | 15 +- .../templates/indicator/NewDeleteIndex.html | 102 +- .../templates/indicator/SheetDefault.html | 35 +- .../indicator/templates/indicator/SideBar.html | 80 +- .../apps/indicator/templates/indicator/index.html | 2 +- .../indicator/templates/indicator/nav-ribbon.html | 15 + .../templates/indicator/popup/DeleteCardTip.html | 2 +- .../templates/indicator/popup/EditHistoryData.html | 29 +- .../templates/indicator/popup/IndexDesc.html | 19 +- .../templates/indicator/show_indicator.html | 4 + .../indicator/templates/indicator/show_record.html | 4 + 97suifangqa/apps/indicator/tools.py | 87 +- 97suifangqa/apps/indicator/urls.py | 8 +- 97suifangqa/apps/indicator/views.py | 386 +------ .../apps/info/fixtures_bak/initial_data.json | 1094 ------------------ 97suifangqa/apps/info/models.py | 2 +- .../apps/location/fixtures_bak/initial_data.json | 81 -- 97suifangqa/apps/recommend/models.py | 48 +- 97suifangqa/apps/sciblog/admin.py | 28 +- .../apps/sciblog/fixtures/sciblogForTest.json | 49 + .../apps/sciblog/fixtures_bak/initial_data.json | 1042 ----------------- 97suifangqa/apps/sciblog/managers.py | 8 +- 97suifangqa/apps/sciblog/models.py | 16 +- 97suifangqa/apps/sciblog/signals.py | 2 +- 97suifangqa/apps/sciblog/views.py | 8 +- .../sfaccount/templates/sfaccount/activate.html | 4 +- .../templates/sfaccount/activate_done.html | 6 +- .../templates/sfaccount/activate_send_mail.html | 4 +- .../templates/sfaccount/activation_email_body.html | 6 +- .../templates/sfaccount/activation_email_body.txt | 6 +- .../sfaccount/activation_email_subject.txt | 2 +- .../apps/sfaccount/templates/sfaccount/login.html | 4 +- .../apps/sfaccount/templates/sfaccount/logout.html | 6 +- .../templates/sfaccount/password_change.html | 4 +- .../templates/sfaccount/password_change_done.html | 4 +- .../templates/sfaccount/password_reset.html | 4 +- .../sfaccount/password_reset_complete.html | 4 +- .../sfaccount/password_reset_confirm.html | 4 +- .../templates/sfaccount/password_reset_done.html | 4 +- .../templates/sfaccount/password_reset_email.html | 4 +- .../templates/sfaccount/password_reset_email.txt | 4 +- .../templates/sfaccount/password_reset_subject.txt | 2 +- .../apps/sfaccount/templates/sfaccount/signup.html | 4 +- 77 files changed, 2985 insertions(+), 4172 deletions(-) delete mode 100644 97suifangqa/apps/__init__.py delete mode 100644 97suifangqa/apps/indicator/fixtures_bak/initial_data.json delete mode 100644 97suifangqa/apps/indicator/forms.py create mode 100644 97suifangqa/apps/indicator/obsolete/forms.py create mode 100644 97suifangqa/apps/indicator/obsolete/views_forms.py create mode 100644 97suifangqa/apps/indicator/static/css/nav.css create mode 100644 97suifangqa/apps/indicator/static/images/sheet/AFP.jpg create mode 100644 97suifangqa/apps/indicator/static/images/sheet/PCR.jpg create mode 100644 97suifangqa/apps/indicator/static/images/sheet/PT.jpg create mode 100644 97suifangqa/apps/indicator/static/images/sheet/gene.jpg create mode 100644 "97suifangqa/apps/indicator/static/images/sheet/\344\270\244\345\257\271\345\215\212.jpg" create mode 100644 "97suifangqa/apps/indicator/static/images/sheet/\350\202\235\345\212\237\350\203\275.jpg" create mode 100644 "97suifangqa/apps/indicator/static/images/sheet/\350\202\235\347\251\277\345\210\272\350\241\250\346\240\274\345\275\242\345\274\217\344\272\2141.jpg" create mode 100644 "97suifangqa/apps/indicator/static/images/sheet/\350\202\235\350\204\217\347\241\254\345\272\246.jpg" create mode 100644 "97suifangqa/apps/indicator/static/images/sheet/\350\241\200\347\273\206\350\203\236.jpg" create mode 100644 "97suifangqa/apps/indicator/static/images/sheet/\350\241\250\346\240\2741.jpg" create mode 100644 "97suifangqa/apps/indicator/static/images/sheet/\350\241\250\346\240\2745.jpg" create mode 100644 97suifangqa/apps/indicator/templates/indicator/nav-ribbon.html delete mode 100644 97suifangqa/apps/info/fixtures_bak/initial_data.json delete mode 100644 97suifangqa/apps/location/fixtures_bak/initial_data.json create mode 100644 97suifangqa/apps/sciblog/fixtures/sciblogForTest.json delete mode 100644 97suifangqa/apps/sciblog/fixtures_bak/initial_data.json (limited to '97suifangqa/apps') diff --git a/97suifangqa/apps/__init__.py b/97suifangqa/apps/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/97suifangqa/apps/indicator/fixtures_bak/initial_data.json b/97suifangqa/apps/indicator/fixtures_bak/initial_data.json deleted file mode 100644 index d26f8b9..0000000 --- a/97suifangqa/apps/indicator/fixtures_bak/initial_data.json +++ /dev/null @@ -1,862 +0,0 @@ -[ - { - "pk": 4, - "model": "indicator.indicatorcategory", - "fields": { - "pinyin": "gan-chuan-ci", - "englishName": "Liver Puncture", - "addByUser": 1, - "name": "\u809d\u7a7f\u523a", - "description": "\u809d\u7a7f\u523a" - } - }, - { - "pk": 3, - "model": "indicator.indicatorcategory", - "fields": { - "pinyin": "gan-gong-neng", - "englishName": "Liver Function", - "addByUser": 1, - "name": "\u809d\u529f\u80fd", - "description": "\u809d\u529f\u80fd" - } - }, - { - "pk": 5, - "model": "indicator.indicatorcategory", - "fields": { - "pinyin": "lei-bie-5", - "englishName": "category5", - "addByUser": 1, - "name": "\u7c7b\u522b5", - "description": "\u7c7b\u522b5\r\n\u6d4b\u8bd5" - } - }, - { - "pk": 6, - "model": "indicator.indicatorcategory", - "fields": { - "pinyin": "lei-bie-6", - "englishName": "category6", - "addByUser": 1, - "name": "\u7c7b\u522b6", - "description": "\u7c7b\u522b6\r\n\r\n\u6d4b\u8bd5" - } - }, - { - "pk": 7, - "model": "indicator.indicatorcategory", - "fields": { - "pinyin": "lei-bie-7", - "englishName": "category7", - "addByUser": 1, - "name": "\u7c7b\u522b7", - "description": "\u7c7b\u522b7\r\n\r\n\u6d4b\u8bd5" - } - }, - { - "pk": 2, - "model": "indicator.indicatorcategory", - "fields": { - "pinyin": "liang-dui-ban", - "englishName": "TODO", - "addByUser": 1, - "name": "\u4e24\u5bf9\u534a", - "description": "\u4e59\u809d\u4e24\u5bf9\u534a" - } - }, - { - "pk": 1, - "model": "indicator.indicatorcategory", - "fields": { - "pinyin": "xie-chang-gui", - "englishName": "Blood Routine", - "addByUser": 1, - "name": "\u8840\u5e38\u89c4", - "description": "\u8840\u5e38\u89c4" - } - }, - { - "pk": 3, - "model": "indicator.indicator", - "fields": { - "addByUser": 1, - "name": "\u6d4b\u8bd51", - "dataType": "PM", - "pinyin": "ce-shi-1", - "helpText": "\u5e2e\u52a9 help", - "englishName": "test1", - "categories": [ - 2 - ], - "description": "forms \u6d4b\u8bd51\r\npm type" - } - }, - { - "pk": 4, - "model": "indicator.indicator", - "fields": { - "addByUser": 1, - "name": "\u5b9a\u503c2", - "dataType": "FL", - "pinyin": "ding-zhi-2", - "helpText": "\u6d6e\u70b9\u5b9a\u503c", - "englishName": "float2", - "categories": [ - 2, - 1 - ], - "description": "float type" - } - }, - { - "pk": 2, - "model": "indicator.indicator", - "fields": { - "addByUser": 1, - "name": "\u8303\u56f41", - "dataType": "RG", - "pinyin": "fan-wei-1", - "helpText": "\u8303\u56f4\u578b", - "englishName": "range1", - "categories": [ - 1 - ], - "description": "range type\r\n\r\n\u8303\u56f4\u578b" - } - }, - { - "pk": 1, - "model": "indicator.indicator", - "fields": { - "addByUser": 1, - "name": "\u8c37\u4e19\u8f6c\u6c28\u9176", - "dataType": "FL", - "pinyin": "gu-bing-zhuan-an-mei", - "helpText": "\u63a5\u53d7\u5b9a\u503c\u6570\u636e\uff0c\u5982: 45, 38.7", - "englishName": "Alanine Transaminase", - "categories": [ - 3 - ], - "description": "\u8c37\u4e19\u8f6c\u6c28\u9176\r\nAlanine transaminase (ALT)\r\n\r\n\u6d6e\u70b9\u5b9a\u503c\u578b\u6570\u636e" - } - }, - { - "pk": 1, - "model": "indicator.userindicator", - "fields": { - "followedHistories": [], - "followedIndicators": [ - 3, - 4, - 2, - 1 - ], - "user": 1 - } - }, - { - "pk": 2, - "model": "indicator.userindicator", - "fields": { - "followedHistories": [], - "followedIndicators": [], - "user": 2 - } - }, - { - "pk": 3, - "model": "indicator.userindicator", - "fields": { - "followedHistories": [], - "followedIndicators": [], - "user": 3 - } - }, - { - "pk": 4, - "model": "indicator.userindicator", - "fields": { - "followedHistories": [], - "followedIndicators": [], - "user": 4 - } - }, - { - "pk": 18, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 1, - "notes": "\u8865\u5145\r\n\u8bb0\u5f558", - "created_at": "2013-08-22T06:56:08.417Z", - "updated_at": "2013-08-22T06:56:08.417Z", - "value": "45", - "val_min": null, - "user": 1, - "date": "2013-06-29", - "val_max": null, - "unit": 4 - } - }, - { - "pk": 17, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 1, - "notes": "\u8865\u5145\r\n\u8bb0\u5f557", - "created_at": "2013-08-22T06:48:18.864Z", - "updated_at": "2013-08-22T06:55:36.704Z", - "value": "57", - "val_min": null, - "user": 1, - "date": "2013-07-04", - "val_max": null, - "unit": 1 - } - }, - { - "pk": 15, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 1, - "notes": "\u8865\u5145\r\n\u8bb0\u5f555", - "created_at": "2013-08-22T06:44:43.567Z", - "updated_at": "2013-08-22T06:44:43.567Z", - "value": "81", - "val_min": null, - "user": 1, - "date": "2013-07-07", - "val_max": null, - "unit": 1 - } - }, - { - "pk": 16, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 1, - "notes": "\u8865\u5145\r\n\u8bb0\u5f556", - "created_at": "2013-08-22T06:45:19.971Z", - "updated_at": "2013-08-22T06:47:19.645Z", - "value": "98", - "val_min": null, - "user": 1, - "date": "2013-07-13", - "val_max": null, - "unit": 1 - } - }, - { - "pk": 12, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 1, - "notes": "\u8865\u5145\r\n\u8bb0\u5f554", - "created_at": "2013-08-22T06:41:28.455Z", - "updated_at": "2013-08-22T06:41:28.455Z", - "value": "31", - "val_min": null, - "user": 1, - "date": "2013-07-18", - "val_max": null, - "unit": 1 - } - }, - { - "pk": 11, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 1, - "notes": "\u8865\u5145\r\n\u8bb0\u5f553", - "created_at": "2013-08-22T06:40:45.950Z", - "updated_at": "2013-08-22T06:40:54.585Z", - "value": "49", - "val_min": null, - "user": 1, - "date": "2013-07-21", - "val_max": null, - "unit": 1 - } - }, - { - "pk": 10, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 1, - "notes": "\u8865\u5145\r\n\u8bb0\u5f552", - "created_at": "2013-08-22T06:37:16.110Z", - "updated_at": "2013-08-22T06:39:16.251Z", - "value": "78", - "val_min": null, - "user": 1, - "date": "2013-07-27", - "val_max": null, - "unit": 1 - } - }, - { - "pk": 9, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 1, - "notes": "\u8865\u5145\r\n\u8bb0\u5f551", - "created_at": "2013-08-22T06:36:32.924Z", - "updated_at": "2013-08-22T06:36:32.924Z", - "value": "59", - "val_min": null, - "user": 1, - "date": "2013-08-01", - "val_max": null, - "unit": 1 - } - }, - { - "pk": 1, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 1, - "notes": "\u8c37\u4e19\u8f6c\u6c28\u9176\r\n\r\n\u7b2c1\u6761\u8bb0\u5f55\r\nmodified", - "created_at": "2013-08-05T15:48:00.035Z", - "updated_at": "2013-08-26T12:13:14.102Z", - "value": "50", - "val_min": null, - "user": 1, - "date": "2013-08-05", - "val_max": null, - "unit": 1 - } - }, - { - "pk": 2, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 1, - "notes": "\u8bb0\u5f552", - "created_at": "2013-08-09T10:53:15.927Z", - "updated_at": "2013-08-26T12:12:42.041Z", - "value": "100", - "val_min": null, - "user": 1, - "date": "2013-08-09", - "val_max": null, - "unit": 1 - } - }, - { - "pk": 4, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 1, - "notes": "\u8bb0\u5f553", - "created_at": "2013-08-18T13:33:20.569Z", - "updated_at": "2013-09-12T07:11:09.763Z", - "value": "78.3", - "val_min": null, - "user": 1, - "date": "2013-08-15", - "val_max": null, - "unit": 1 - } - }, - { - "pk": 13, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 1, - "notes": "\u8bb0\u5f554", - "created_at": "2013-08-22T06:42:44.782Z", - "updated_at": "2013-08-22T06:45:43.807Z", - "value": "89", - "val_min": null, - "user": 1, - "date": "2013-08-18", - "val_max": null, - "unit": 1 - } - }, - { - "pk": 14, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 1, - "notes": "\u8bb0\u5f555", - "created_at": "2013-08-22T06:43:32.415Z", - "updated_at": "2013-08-22T06:43:32.415Z", - "value": "56", - "val_min": null, - "user": 1, - "date": "2013-08-22", - "val_max": null, - "unit": 1 - } - }, - { - "pk": 6, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 2, - "notes": "", - "created_at": "2013-08-18T13:46:26.511Z", - "updated_at": "2013-08-18T13:46:26.511Z", - "value": "", - "val_min": 10000.0, - "user": 1, - "date": "2013-08-05", - "val_max": 23000.0, - "unit": 3 - } - }, - { - "pk": 5, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 2, - "notes": "", - "created_at": "2013-08-18T13:37:41.124Z", - "updated_at": "2013-08-26T16:04:54.703Z", - "value": "", - "val_min": 15000.0, - "user": 1, - "date": "2013-08-10", - "val_max": 20000.0, - "unit": 3 - } - }, - { - "pk": 7, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 2, - "notes": "range type\r\nrecord 3", - "created_at": "2013-08-19T11:30:26.675Z", - "updated_at": "2013-08-19T11:30:26.675Z", - "value": "", - "val_min": 15000.0, - "user": 1, - "date": "2013-08-17", - "val_max": 30000.0, - "unit": 3 - } - }, - { - "pk": 21, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 2, - "notes": "", - "created_at": "2013-09-12T07:21:24.976Z", - "updated_at": "2013-09-12T07:21:24.977Z", - "value": "", - "val_min": 50000.0, - "user": 1, - "date": "2013-09-01", - "val_max": 80000.0, - "unit": 3 - } - }, - { - "pk": 3, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 3, - "notes": "pm type\r\nrecord 1", - "created_at": "2013-08-16T16:07:00.547Z", - "updated_at": "2013-09-09T01:56:20.103Z", - "value": "+", - "val_min": null, - "user": 1, - "date": "2013-08-16", - "val_max": null, - "unit": null - } - }, - { - "pk": 20, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 4, - "notes": "", - "created_at": "2013-09-12T07:12:42.394Z", - "updated_at": "2013-09-12T07:12:42.394Z", - "value": "600", - "val_min": null, - "user": 1, - "date": "2013-09-02", - "val_max": null, - "unit": 4 - } - }, - { - "pk": 19, - "model": "indicator.indicatorrecord", - "fields": { - "indicator": 4, - "notes": "", - "created_at": "2013-09-11T16:35:15.307Z", - "updated_at": "2013-09-11T16:35:15.307Z", - "value": "710", - "val_min": null, - "user": 1, - "date": "2013-09-12", - "val_max": null, - "unit": 4 - } - }, - { - "pk": 1, - "model": "indicator.recordhistory", - "fields": { - "val_min_bak": null, - "created_at": "2013-08-05T16:07:01.832Z", - "indicatorRecord": 1, - "reason": "\u6d4b\u8bd5\r\nadmin\u754c\u9762\u76f4\u63a5\u4fee\u6539", - "unit_bak": 1, - "val_max_bak": null, - "value_bak": "250", - "date_bak": "2013-08-05", - "notes_bak": "\u6307\u68071\r\n\u7b2c1\u6761\u8bb0\u5f55" - } - }, - { - "pk": 2, - "model": "indicator.recordhistory", - "fields": { - "val_min_bak": null, - "created_at": "2013-08-10T11:40:23.170Z", - "indicatorRecord": 1, - "reason": "\u6d4b\u8bd5\u4fee\u6539", - "unit_bak": 1, - "val_max_bak": null, - "value_bak": "250", - "date_bak": "2013-08-05", - "notes_bak": "\u6307\u68071\r\n\u7b2c1\u6761\u8bb0\u5f55" - } - }, - { - "pk": 3, - "model": "indicator.recordhistory", - "fields": { - "val_min_bak": null, - "created_at": "2013-08-26T08:08:16.911Z", - "indicatorRecord": 1, - "reason": "test reason", - "unit_bak": 1, - "val_max_bak": null, - "value_bak": "50", - "date_bak": "2013-08-05", - "notes_bak": "\u8c37\u4e19\u8f6c\u6c28\u9176\r\n\r\n\u7b2c1\u6761\u8bb0\u5f55\r\n" - } - }, - { - "pk": 4, - "model": "indicator.recordhistory", - "fields": { - "val_min_bak": null, - "created_at": "2013-08-26T12:11:29.572Z", - "indicatorRecord": 1, - "reason": "test", - "unit_bak": 1, - "val_max_bak": null, - "value_bak": "50", - "date_bak": "2013-08-05", - "notes_bak": "\u8c37\u4e19\u8f6c\u6c28\u9176\r\n\r\n\u7b2c1\u6761\u8bb0\u5f55\r\nmodified" - } - }, - { - "pk": 5, - "model": "indicator.recordhistory", - "fields": { - "val_min_bak": null, - "created_at": "2013-08-26T12:20:54.790Z", - "indicatorRecord": 1, - "reason": "test", - "unit_bak": 1, - "val_max_bak": null, - "value_bak": "50", - "date_bak": "2013-08-05", - "notes_bak": "\u8c37\u4e19\u8f6c\u6c28\u9176\r\n\r\n\u7b2c1\u6761\u8bb0\u5f55\r\nmodified" - } - }, - { - "pk": 13, - "model": "indicator.recordhistory", - "fields": { - "val_min_bak": null, - "created_at": "2013-09-09T01:53:47.362Z", - "indicatorRecord": 3, - "reason": "test to modify pm_data 1", - "unit_bak": null, - "val_max_bak": null, - "value_bak": "+", - "date_bak": "2013-08-17", - "notes_bak": "pm type\r\nrecord 1" - } - }, - { - "pk": 14, - "model": "indicator.recordhistory", - "fields": { - "val_min_bak": null, - "created_at": "2013-09-09T01:54:44.215Z", - "indicatorRecord": 3, - "reason": "test to modify pm_data 2, modified date", - "unit_bak": null, - "val_max_bak": null, - "value_bak": "-", - "date_bak": "2013-08-17", - "notes_bak": "pm type\r\nrecord 1" - } - }, - { - "pk": 15, - "model": "indicator.recordhistory", - "fields": { - "val_min_bak": null, - "created_at": "2013-09-09T01:56:19.906Z", - "indicatorRecord": 3, - "reason": "test 3, modified date & value", - "unit_bak": null, - "val_max_bak": null, - "value_bak": "-", - "date_bak": "2013-08-18", - "notes_bak": "pm type\r\nrecord 1" - } - }, - { - "pk": 7, - "model": "indicator.recordhistory", - "fields": { - "val_min_bak": null, - "created_at": "2013-08-26T12:24:26.681Z", - "indicatorRecord": 4, - "reason": "modification test1", - "unit_bak": 1, - "val_max_bak": null, - "value_bak": "150", - "date_bak": "2013-08-15", - "notes_bak": "\u8bb0\u5f553" - } - }, - { - "pk": 8, - "model": "indicator.recordhistory", - "fields": { - "val_min_bak": null, - "created_at": "2013-08-26T12:29:57.344Z", - "indicatorRecord": 4, - "reason": "modification test2", - "unit_bak": 1, - "val_max_bak": null, - "value_bak": "0", - "date_bak": "2013-08-15", - "notes_bak": "\u8bb0\u5f553" - } - }, - { - "pk": 16, - "model": "indicator.recordhistory", - "fields": { - "val_min_bak": null, - "created_at": "2013-09-12T07:11:09.554Z", - "indicatorRecord": 4, - "reason": "test", - "unit_bak": 1, - "val_max_bak": null, - "value_bak": "81.3", - "date_bak": "2013-08-14", - "notes_bak": "\u8bb0\u5f553" - } - }, - { - "pk": 9, - "model": "indicator.recordhistory", - "fields": { - "val_min_bak": 15000.0, - "created_at": "2013-08-26T16:04:54.516Z", - "indicatorRecord": 5, - "reason": "modify1(popup)", - "unit_bak": 3, - "val_max_bak": 25000.0, - "value_bak": "", - "date_bak": "2013-08-10", - "notes_bak": "" - } - }, - { - "pk": 1, - "model": "indicator.unit", - "fields": { - "indicator": 1, - "description": "IU/L\r\n\r\n\u8c37\u4e19\u8f6c\u6c28\u9176\r\nAlanine transaminase (ALT)", - "symbol": "IU/L", - "addByUser": 1, - "standard": true, - "relation": "v", - "name": "\u62f7\u8d1d/\u5347" - } - }, - { - "pk": 2, - "model": "indicator.unit", - "fields": { - "indicator": 1, - "description": "", - "symbol": "unit12", - "addByUser": 1, - "standard": false, - "relation": "log10(v) + 10", - "name": "\u5355\u4f4d12" - } - }, - { - "pk": 3, - "model": "indicator.unit", - "fields": { - "indicator": 2, - "description": "", - "symbol": "\u62f7\u8d1d/mL", - "addByUser": 1, - "standard": true, - "relation": "v", - "name": "\u62f7\u8d1d/mL" - } - }, - { - "pk": 4, - "model": "indicator.unit", - "fields": { - "indicator": 4, - "description": "\u7b80\u5355\u63cf\u8ff0", - "symbol": "unit41", - "addByUser": 1, - "standard": true, - "relation": "v", - "name": "\u5355\u4f4d41" - } - }, - { - "pk": 1, - "model": "indicator.innateconfine", - "fields": { - "math_max": 200.0, - "indicator": 1, - "human_max": 64.0, - "description": "\u8c37\u4e19\u8f6c\u6c28\u9176\r\n\r\n\u6b63\u5e38\u503c\u8303\u56f4\r\n\u5141\u8bb8\u6570\u636e\u8303\u56f4", - "val_norm": "", - "addByUser": 1, - "human_min": 10.0, - "unit": 1, - "math_min": 0.0 - } - }, - { - "pk": 2, - "model": "indicator.innateconfine", - "fields": { - "math_max": 80000.0, - "indicator": 2, - "human_max": 50000.0, - "description": "\u6307\u6807\r\n\r\n\u6570\u636e\u7c7b\u578b\uff1a\u8303\u56f4\u578b\r\n\r\n\u6570\u636e\u8303\u56f4", - "val_norm": "", - "addByUser": 1, - "human_min": 10000.0, - "unit": 3, - "math_min": 5000.0 - } - }, - { - "pk": 3, - "model": "indicator.innateconfine", - "fields": { - "math_max": null, - "indicator": 3, - "human_max": null, - "description": "pm type", - "val_norm": "+", - "addByUser": 1, - "human_min": null, - "unit": null, - "math_min": null - } - }, - { - "pk": 4, - "model": "indicator.innateconfine", - "fields": { - "math_max": 15000.0, - "indicator": 4, - "human_max": 10000.0, - "description": "float type", - "val_norm": "", - "addByUser": 1, - "human_min": 500.0, - "unit": 4, - "math_min": 0.0 - } - }, - { - "pk": 1, - "model": "indicator.relatedindicator", - "fields": { - "indicator": 1, - "weight": 5.9, - "created_at": "2013-08-10T22:40:00.035Z", - "updated_at": "2013-08-10T22:40:00.326Z", - "blog": null, - "annotation": 2, - "objectType": "AN" - } - }, - { - "pk": 3, - "model": "indicator.relatedindicator", - "fields": { - "indicator": 1, - "weight": 8.0, - "created_at": "2013-08-11T00:56:08.080Z", - "updated_at": "2013-08-11T00:56:08.080Z", - "blog": null, - "annotation": 1, - "objectType": "AN" - } - }, - { - "pk": 2, - "model": "indicator.relatedindicator", - "fields": { - "indicator": 2, - "weight": 8.3, - "created_at": "2013-08-10T22:50:00.035Z", - "updated_at": "2013-08-10T22:50:00.326Z", - "blog": 3, - "annotation": null, - "objectType": "BL" - } - }, - { - "pk": 4, - "model": "indicator.relatedindicator", - "fields": { - "indicator": 1, - "weight": 4.0, - "created_at": "2013-08-11T00:56:49.463Z", - "updated_at": "2013-08-11T00:56:49.463Z", - "blog": 1, - "annotation": null, - "objectType": "BL" - } - }, - { - "pk": 5, - "model": "indicator.relatedindicator", - "fields": { - "indicator": 1, - "weight": 6.0, - "created_at": "2013-08-11T00:57:23.067Z", - "updated_at": "2013-08-11T00:57:23.067Z", - "blog": 3, - "annotation": null, - "objectType": "BL" - } - } -] \ No newline at end of file diff --git a/97suifangqa/apps/indicator/forms.py b/97suifangqa/apps/indicator/forms.py deleted file mode 100644 index 2e0b709..0000000 --- a/97suifangqa/apps/indicator/forms.py +++ /dev/null @@ -1,321 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -forms for apps/indicator -""" - -from django import forms -from django.utils.translation import ugettext as _ - -from indicator import models as im - -import sympy -from sympy.core.sympify import SympifyError - - -class IndicatorCategoryForm(forms.ModelForm): # {{{ - """ - form for 'models.IndicatorCategory' - """ - class Meta: - model = im.IndicatorCategory - exclude = ('addByUser',) -# }}} - - -class IndicatorForm(forms.ModelForm): # {{{ - """ - form for 'models.Indicator' - """ - class Meta: - model = im.Indicator - exclude = ('addByUser',) -# }}} - - -class UnitForm(forms.ModelForm): # {{{ - """ - form for 'models.Unit' - """ - class Meta: - model = im.Unit - exclude = ('addByUser',) - - def __init__(self, *args, **kwargs): - super(UnitForm, self).__init__(*args, **kwargs) - # store 'instance_id', for edting instance - self.instance_id = self.instance.id - - # 'clean_standard()' cannot raise Vali dationError correctly?? - # TODO: clean each field and generate errors accordingly. - - def clean(self): - cleaned_data = super(UnitForm, self).clean() - instance_id = self.instance_id - standard = cleaned_data['standard'] - indicator = cleaned_data['indicator'] - std_unit_list = indicator.get_unit(type="standard") - relation = cleaned_data.get('relation', u'') - if standard: - if std_unit_list and (instance_id != std_unit_list[0].id): - raise forms.ValidationError(_(u'标准单位已存在'), - code='standard') - cleaned_data['relation'] = u'v' - else: - try: - fsym = sympy.sympify(relation) - except SympifyError: - raise forms.ValidationError(_(u'"%(relation)s" 不是合法的表达式'), - code='relation_invalid', - params={'relation': relation}) - # always return the full collection of cleaned data - return cleaned_data -# }}} - - -class InnateConfineForm(forms.ModelForm): # {{{ - """ - form for 'models.InnateConfine' - """ - unit = forms.ModelChoiceField(label=u"标准单位", - queryset=im.Unit.objects.filter(standard=True)) - - class Meta: - model = im.InnateConfine - exclude = ('addByUser',) - - def clean(self): # {{{ - """ - check the validity of data - """ - cleaned_data = super(InnateConfineForm, self).clean() - indicator = cleaned_data['indicator'] - unit = cleaned_data.get('unit') - val_norm = cleaned_data.get('val_norm') - human_max = cleaned_data.get('human_max') - human_min = cleaned_data.get('human_min') - math_max = cleaned_data.get('math_max') - math_min = cleaned_data.get('math_min') - # check data - if indicator.dataType in [indicator.FLOAT_TYPE, - indicator.RANGE_TYPE, indicator.FLOAT_RANGE_TYPE]: - # check unit - if not (unit and unit.standard): - raise forms.ValidationError(_(u'unit 未填写/不是标准单位'), - code='unit') - if (human_max is None) or (human_min is None): - raise forms.ValidationError(_(u'human_max/human_min 未填写'), - code='human_empty') - if (human_max <= human_min): - raise forms.ValidationError(_(u'human_max <= human_min'), - code='human_relation') - # check 'math_max' and 'math_min' - if (math_max is None) or (math_min is None): - raise forms.ValidationError(_(u'math_max/math_min 未填写'), - code='math_empty') - if (math_max <= math_min): - raise forms.ValidationError(_(u'math_max <= math_min'), - code='math_relation') - # compare 'human*' and 'math*' - if (human_max > math_max) or (human_min < math_min): - raise forms.ValidationError(_(u'Error: human_max>math_max / human_min math_max): - raise forms.ValidationError(_(u'value(std) < math_min or value(std) > math_max'), - code='value_std_relation') - # val_max - if val_max is not None: - # unit conversion - try: - val_max_std = float(rel_sym.evalf( - subs={v: val_max})) - except ValueError: - raise forms.ValidationError(_(u'"%s" 求值错误,请检查只有变量"v"' % unit_rel), - code='val_max_evalf') - if (val_max_std <= math_min) or ( - val_max_std > math_max): - raise forms.ValidationError(_(u'val_max(std) <= math_min or val_max(std) > math_max'), - code='val_max_std_relation') - # val_min - if val_min is not None: - try: - val_min_std = float(rel_sym.evalf( - subs={v: val_min})) - except ValueError: - raise forms.ValidationError(_(u'"%s" 求值错误,请检查只有变量"v"' % unit_rel), - code='val_min_evalf') - if (val_min_std < math_min) or ( - val_min_std >= math_max): - raise forms.ValidationError(_(u'val_min(std) < math_min or val_min(std) >= math_max'), - code='val_min_std_relation') - # }}} - # return cleaned data - return cleaned_data - # }}} -# }}} - - -class RecordHistoryForm(forms.ModelForm): # {{{ - """ - form for 'models.RecordHistory' - """ - class Meta: - model = im.RecordHistory - exclude = ('indicatorRecord',) -# }}} - - -# vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=python.django: # diff --git a/97suifangqa/apps/indicator/models.py b/97suifangqa/apps/indicator/models.py index 87cd80f..cf9b716 100644 --- a/97suifangqa/apps/indicator/models.py +++ b/97suifangqa/apps/indicator/models.py @@ -79,6 +79,10 @@ class IndicatorCategory(models.Model): # {{{ class Indicator(models.Model): # {{{ """ 指标模型 + + type: + normal: 普通类别,用户可以follow/unfollow + basic: 基本信息指标,用于记录基本信息,不可以follow """ name = models.CharField(u"指标名称", max_length=100) pinyin = models.CharField(u"拼音", max_length=200, @@ -88,6 +92,16 @@ class Indicator(models.Model): # {{{ description = models.TextField(u"指标描述", blank=True) # Indicator 接受数据类型/格式等说明/示例 helpText = models.CharField(u"帮助", max_length=300, blank=True) + # indicator type + NORMAL_TYPE = u'NORM' + BASIC_TYPE = u'BASI' + INDICATOR_TYPES = ( + (NORMAL_TYPE, u"普通指标"), + (BASIC_TYPE, u"基本信息指标"), + ) + type = models.CharField(u"指标类型", max_length=4, + choices=INDICATOR_TYPES, + help_text=u"基本信息指标:用于记录用户的基本信息,不可以被用户关注") # 记录添加指标的用户,用户只能修改自己添加的指标 addByUser = models.ForeignKey(User, verbose_name=u"添加的用户", related_name="indicators") @@ -95,21 +109,23 @@ class Indicator(models.Model): # {{{ categories = models.ManyToManyField(IndicatorCategory, verbose_name=u"所属类别", related_name="indicators") # DATA_TYPES for indicator - INTEGER_TYPE = u'IN' # 整数型 - FLOAT_TYPE = u'FL' # 浮点型 - RANGE_TYPE = u'RG' # 范围型(eg. 250-500) + INTEGER_TYPE = u'IN' # 整数型 + FLOAT_TYPE = u'FL' # 浮点型 + RANGE_TYPE = u'RG' # 范围型(eg. 250-500) FLOAT_RANGE_TYPE = u'FR' # 浮点型/范围型,接受定值或范围 - PM_TYPE = u'PM' # +/- 型 - RADIO_TYPE = u'RD' # 单选型 - CHECKBOX_TYPE = u'CB' # 多选多 + PM_TYPE = u'PM' # +/- 型 + KIND_TYPE = u'KD' # 种类型 + RADIO_TYPE = u'RD' # 单选型 + CHECKBOX_TYPE = u'CB' # 多选多 DATA_TYPES = ( - (INTEGER_TYPE, u"整数型"), - (FLOAT_TYPE, u"浮点定值型"), - (RANGE_TYPE, u"浮点范围型"), + (INTEGER_TYPE, u"整数型"), + (FLOAT_TYPE, u"浮点定值型"), + (RANGE_TYPE, u"浮点范围型"), (FLOAT_RANGE_TYPE, u"定值或范围型"), - (PM_TYPE, u"阴阳型(+/-)"), - #(RADIO_TYPE, u"单选型"), - #(CHECKBOX_TYPE, u"多选型"), + (PM_TYPE, u"阴阳型(+/-)"), + (KIND_TYPE, u"种类型"), + #(RADIO_TYPE, u"单选型"), + #(CHECKBOX_TYPE, u"多选型"), ) dataType = models.CharField(u"数据类型", max_length=2, choices=DATA_TYPES) @@ -119,8 +135,8 @@ class Indicator(models.Model): # {{{ ordering = ['pinyin', 'id'] def __unicode__(self): - return u"< Indicator: #%s, %s, dataType %s addBy %s >"\ - % (self.id, self.name, self.dataType, + return u"< Indicator: #%s(%s), %s, dataType %s addBy %s >"\ + % (self.id, self.type, self.name, self.dataType, self.addByUser.username) def show(self): @@ -140,11 +156,11 @@ class Indicator(models.Model): # {{{ self.pinyin = p.get_pinyin(self.name) super(Indicator, self).save(**kwargs) - def check_unit(self, **kwargs): + def check_unit(self, **kwargs): # {{{ """ Check if the validity of the units specified for the indicator. A indicator must have one 'standard unit'. - if indicator.dataType in [INTEGER_TYPE, PM_TYPE], + if indicator.dataType in [INTEGER_TYPE, PM_TYPE, KIND_TYPE], then units are not needed. """ if self.dataType in [self.FLOAT_TYPE, self.RANGE_TYPE, @@ -153,13 +169,14 @@ class Indicator(models.Model): # {{{ if std_unit: return True else: - print u"Indicator id=%s 未指定标准单位" % self.id + print u"Indicator(id=%s)未指定标准单位" % self.id return False else: - print u"dataType=%s 不需要单位" % self.dataType + #print u"dataType='%s' 不需要单位" % self.dataType return True + # }}} - def _get_unit(self, type="standard"): + def _get_unit(self, type="standard"): # {{{ if type == "standard": _units = self.units.filter(standard=True) elif type == "other": @@ -167,8 +184,9 @@ class Indicator(models.Model): # {{{ else: _units = [] return list(_units) + # }}} - def get_unit(self, type="standard"): + def get_unit(self, type="standard"): # {{{ """ return a 'list' which contains the 'Unit's related to the indicator @@ -185,6 +203,17 @@ class Indicator(models.Model): # {{{ return _units else: return self._get_unit(type) + # }}} + + def get_kind(self): + """ + get the valid ValueKind's that can be used with this indicator + (1) general 'ValueKind's + (2) 'ValueKind's related to this indicator + """ + general_kinds = list(ValueKind.objects.filter(indicator=None)) + ind_kinds = list(ValueKind.objects.filter(indicator=self)) + return list(general_kinds + ind_kinds) def check_confine(self): """ @@ -225,6 +254,7 @@ class Indicator(models.Model): # {{{ 'englishName': self.englishName, 'description': self.description, 'helpText': self.helpText, + 'type': self.type, 'addByUser_id': self.addByUser.id, 'dataType': self.dataType, 'categories_id': [c.id @@ -291,6 +321,13 @@ class IndicatorRecord(models.Model): # {{{ null=True, blank=True) val_max = models.FloatField(u"数据范围上限", null=True, blank=True) + # kind (for KIND_TYPE) + kind = models.ForeignKey("ValueKind", + related_name="indicator_records", + verbose_name=u"指标种类值", + null=True, blank=True, + help_text=u"仅供'种类型'指标填写") + # notes notes = models.TextField(u"记录说明", blank=True) class Meta: @@ -309,7 +346,8 @@ class IndicatorRecord(models.Model): # {{{ if self.is_valid() and self.check_confine(): super(IndicatorRecord, self).save(**kwargs) else: - raise ValueError(u'您输入的数据不符合要求') + raise ValueError(u'Error: 您输入的数据不符合要求') + return self def is_valid(self, **kwargs): # {{{ """验证输入数据是否合法""" @@ -317,8 +355,8 @@ class IndicatorRecord(models.Model): # {{{ qs = IndicatorRecord.objects.filter(indicator=self.indicator, date=self.date) if qs and qs[0].id != self.id: - #raise ValueError(u'date="%s" 该日期已经存在记录' % self.date) - print u'date="%s" 该日期已经存在记录' % self.date + #raise ValueError(u'Error: date="%s" 该日期已经存在记录' % self.date) + print u'Error: date="%s" 该日期已经存在记录' % self.date return False # check unit sind = self.indicator @@ -327,12 +365,12 @@ class IndicatorRecord(models.Model): # {{{ # unit required ind_units = sind.get_unit(type="all") if not self.unit: - #raise ValueError(u'未填写单位') - print u'未填写单位' + #raise ValueError(u'Error: 未填写单位') + print u'Error: 未填写单位' return False elif self.unit not in ind_units: - #raise ValueError(u'所选单位与该指标不符') - print u'所选单位与该指标不符' + #raise ValueError(u'Error: 所选单位与该指标不符') + print u'Error: 所选单位与该指标不符' return False # check dataType if self.indicator.dataType == self.indicator.INTEGER_TYPE: @@ -341,8 +379,8 @@ class IndicatorRecord(models.Model): # {{{ value = int(self.value) return True except ValueError: - #raise ValueError(u'您提交的指标数据类型不正确') - print u'您提交的指标数据类型不正确' + #raise ValueError(u'Error: 您提交的指标数据类型不正确') + print u'Error: 您提交的指标数据类型不正确' return False elif self.indicator.dataType == self.indicator.FLOAT_TYPE: # 浮点型 @@ -350,17 +388,17 @@ class IndicatorRecord(models.Model): # {{{ value = float(self.value) return True except ValueError: - #raise ValueError(u'value 数据类型不正确') - print u'value 数据类型不正确' + #raise ValueError(u'Error: value 数据类型不正确') + print u'Error: value 数据类型不正确' return False elif self.indicator.dataType == self.indicator.RANGE_TYPE: # 范围型 if (self.val_max is None) or (self.val_min is None): - #raise ValueError(u'val_max 或 val_min 未填写') - print u'val_max 或 val_min 未填写' + #raise ValueError(u'Error: val_max 或 val_min 未填写') + print u'Error: val_max 或 val_min 未填写' return False if (self.val_max <= self.val_min): - #raise ValueError(u'val_max <= val_min') + #raise ValueError(u'Error: val_max <= val_min') print u'Error: val_max <= val_min' return False return True @@ -372,33 +410,44 @@ class IndicatorRecord(models.Model): # {{{ value = float(self.value) return True except ValueError: - #raise ValueError(u'value 数据类型不正确') - print u'value 数据类型不正确' + #raise ValueError(u'Error: value 数据类型不正确') + print u'Error: value 数据类型不正确' return False elif (self.val_max is not None) and (self.val_min is not None): # 范围值 if (self.val_max <= self.val_min): - #raise ValueError(u'val_max <= val_min') + #raise ValueError(u'Error: val_max <= val_min') print u'Error: val_max <= val_min' return False else: return True else: - #raise ValueError(u'您提交的指标数据不符合要求') - print u'您提交的指标数据不符合要求' + #raise ValueError(u'Error: 您提交的指标数据不符合要求') + print u'Error: 您提交的指标数据不符合要求' return False elif self.indicator.dataType == self.indicator.PM_TYPE: # +/- 型,无单位要求 if (len(self.value) == 1) and (self.value in [u'+', u'-']): return True else: - #raise ValueError(u'value 只接受 "+" 或 "-"') + #raise ValueError(u'Error: value 只接受 "+" 或 "-"') print u'Error: value 只接受 "+" 或 "-"' return False - ## TODO: RADIO_TYPE, CHECKBOX_TYPE + elif self.indicator.dataType == self.indicator.KIND_TYPE: + ## KIND_TYPE + ## only the general 'ValueKind's and the ones related + ## to this indicator can be used + valid_kinds = self.indicator.get_kind() + if self.kind in valid_kinds: + return True + else: + #raise ValueError(u'Error: kind 不符合要求') + print u'Error: kind 不符合要求' + return False elif self.indicator.dataType in [self.indicator.RADIO_TYPE, self.indicator.CHECKBOX_TYPE]: - #raise ValueError(u'RADIO_TYPE, CHECKBOX_TYPE 验证未实现') + ## TODO: RADIO_TYPE, CHECKBOX_TYPE + #raise ValueError(u'Error: RADIO_TYPE, CHECKBOX_TYPE 验证未实现') print u'Error: RADIO_TYPE, CHECKBOX_TYPE 验证未实现' return False else: @@ -478,7 +527,7 @@ class IndicatorRecord(models.Model): # {{{ # check finished return True else: - # INTEGER_TYPE or PM_TYPE + # INTEGER_TYPE or PM_TYPE or KIND_TYPE return True # }}} @@ -489,6 +538,12 @@ class IndicatorRecord(models.Model): # {{{ """ # check the indicator.dataType sind = self.indicator + # kind_dump + if self.kind: + kind_dump = self.kind.dump() + else: + kind_dump = {} + # if sind.dataType in [sind.FLOAT_TYPE, sind.RANGE_TYPE, sind.FLOAT_RANGE_TYPE]: # self.value @@ -514,6 +569,7 @@ class IndicatorRecord(models.Model): # {{{ 'val_max': val_max, 'val_min': val_min, 'unit': self.unit.dump(), + 'kind': kind_dump, 'notes': self.notes, 'record_histories_id': [rh.id for rh in self.record_histories.all()], @@ -526,6 +582,7 @@ class IndicatorRecord(models.Model): # {{{ 'val_max': self.val_max, 'val_min': self.val_min, 'unit': {}, + 'kind': kind_dump, 'notes': self.notes, 'record_histories_id': [rh.id for rh in self.record_histories.all()], @@ -586,6 +643,11 @@ class IndicatorRecord(models.Model): # {{{ raise ValueError(errmsg) else: val_min_std = None + # kind_dump + if self.kind: + kind_dump = self.kind.dump + else: + kind_dump = {} # output data data_std = { 'id': self.id, @@ -594,6 +656,7 @@ class IndicatorRecord(models.Model): # {{{ 'val_max': val_max_std, 'val_min': val_min_std, 'unit': std_unit.dump(), + 'kind': kind_dump, 'notes': self.notes, 'record_histories_id': [rh.id for rh in self.record_histories.all()], @@ -685,7 +748,15 @@ class IndicatorRecord(models.Model): # {{{ return True else: return False + elif sind.dataType == sind.KIND_TYPE: + ## KIND_TYPE + kind_id = data_std['kind_id'] + if kind_id == sic.kind.id: + return True + else: + return False elif sind.dataType in [sind.RADIO_TYPE, sind.CHECKBOX_TYPE]: + ## TODO: RADIO_TYPE, CHECKBOX_TYPE print u'Error: RADIO_TYPE, CHECKBOX_TYPE 验证未实现' #raise ValueError(u'RADIO_TYPE, CHECKBOX_TYPE 验证未实现') return None @@ -695,12 +766,17 @@ class IndicatorRecord(models.Model): # {{{ return None # }}} - def dump(self, **kwargs): + def dump(self, **kwargs): # {{{ # check if the indicator needs unit if self.unit: unit_id = self.unit.id else: unit_id = None + # kind_id + if self.kind: + kind_dump = self.kind.dump() + else: + kind_dump = {} # dump dump_data = { 'id': self.id, @@ -713,11 +789,13 @@ class IndicatorRecord(models.Model): # {{{ 'value': self.value, 'val_min': self.val_min, 'val_max': self.val_max, + 'kind': kind_dump, 'notes': self.notes, 'record_histories_id': [rh.id for rh in self.record_histories.all()], } return dump_data + # }}} # }}} @@ -744,6 +822,10 @@ class RecordHistory(models.Model): # {{{ null=True, blank=True, editable=False) val_max_bak = models.FloatField(u"原数据范围上限", null=True, blank=True, editable=False) + kind_bak = models.ForeignKey("ValueKind", + related_name="record_histories", + verbose_name=u"原种类值", + null=True, blank=True, editable=False) notes_bak = models.TextField(u"原记录说明", blank=True, editable=False) @@ -763,6 +845,7 @@ class RecordHistory(models.Model): # {{{ self.value_bak = sr.value self.val_min_bak = sr.val_min self.val_max_bak = sr.val_max + self.kind_bak = sr.kind self.notes_bak = sr.notes # save super(RecordHistory, self).save(**kwargs) @@ -773,6 +856,11 @@ class RecordHistory(models.Model): # {{{ unit_bak_id = self.unit_bak.id else: unit_bak_id = None + # kind_bak_id + if self.kind_bak: + kind_bak_id = self.kind_bak.id + else: + kind_bak_id = None # dump dump_data = { 'id': self.id, @@ -784,6 +872,7 @@ class RecordHistory(models.Model): # {{{ 'value_bak': self.value_bak, 'val_min_bak': self.val_min_bak, 'val_max_bak': self.val_max_bak, + 'kind_bak_id': kind_bak_id, 'notes_bak': self.notes_bak, } return dump_data @@ -829,23 +918,23 @@ class Unit(models.Model): # {{{ if self.id == std_unit.id: return True else: - print u"该指标已经指定了标准单位" - raise ValueError(u"该指标已经指定了标准单位") + print u"Error: 该指标已经指定了标准单位" + raise ValueError(u"Error: 该指标已经指定了标准单位") return False else: return True else: if (not self.relation): - print u"单位映射关系未填写" - raise ValueError(u"单位映射关系未填写") + print u"Error: 单位映射关系未填写" + raise ValueError(u"Error: 单位映射关系未填写") return False else: try: fsym = sympy.sympify(self.relation) return True except SympifyError: - print u"'%s' 不是合法的算术表达式" % self.relation - raise ValueError(u"'%s' 不是合法的算术表达式"\ + print u"Error: '%s' 不是合法的算术表达式" % self.relation + raise ValueError(u"Error: '%s' 不是合法的算术表达式"\ % self.relation) return False @@ -878,6 +967,10 @@ class InnateConfine(models.Model): # {{{ 如果数据类型需要单位,则必须使用"标准单位"; IndicatorRecord.is_normal() 方法需要如此; 因为 标准单位 到 其他单位 的换算没有实现。 + + KIND_TYPE: + 对于'种类型'指标,如果每个可选种类不区分正常和异常, + 且程序其他地方也不涉及是否正常,则可以随便选一个。 """ # indicator indicator = models.OneToOneField("Indicator", @@ -889,6 +982,12 @@ class InnateConfine(models.Model): # {{{ # normal value (for INTEGER_TYPE, PM_TYPE) val_norm = models.CharField(u"正常值", max_length=30, blank=True, help_text=u'填写"整数型","阴阳(+/-)型数据"') + # normal kind (for KIND_TYPE) + kind_norm = models.ForeignKey("ValueKind", + related_name="innate_confines", + verbose_name=u"正常种类值", + null=True, blank=True, + help_text=u"仅供'种类型'指标填写") # normal range human_min = models.FloatField(u"人体正常值下限", null=True, blank=True) @@ -929,10 +1028,15 @@ class InnateConfine(models.Model): # {{{ sind = self.indicator if sind.dataType in [sind.FLOAT_TYPE, sind.RANGE_TYPE, sind.FLOAT_RANGE_TYPE]: - # check unit - if not (self.unit and self.unit.standard): - raise ValueError(u'单位未填写/不是标准单位') + # check unit if given + # check the unit if related to the indicator + ind_std_unit = sind.get_unit(type="standard") + if self.unit and self.unit in ind_std_unit: + return True + else: + raise ValueError(u'ERROR: 单位未填写/不是该指标的标准单位') return False + # if (self.human_max is None) or (self.human_min is None): raise ValueError(u'Error: human_max 或 human_min 未填写') return False @@ -959,7 +1063,7 @@ class InnateConfine(models.Model): # {{{ val_norm = int(self.val_norm) return True except ValueError: - raise ValueError(u'val_norm="%s" 不是整数型值' + raise ValueError(u'ERROR: val_norm="%s" 不是整数型值' % self.val_norm) return False elif sind.dataType == sind.PM_TYPE: @@ -968,14 +1072,27 @@ class InnateConfine(models.Model): # {{{ self.val_norm in [u'+', u'-']): return True else: - raise ValueError(u'value 只接受 "+" 或 "-"') + raise ValueError(u'ERROR: value 只接受 "+" 或 "-"') + return False + elif sind.dataType == sind.KIND_TYPE: + ## KIND type + ## (KIND type indicator not need 'InnateConfine') + if not self.kind_norm: + raise ValueError(u'ERROR: kind_norm 未填写') return False - ## TODO: RADIO_TYPE, CHECKBOX_TYPE + else: + valid_kinds = self.indicator.get_kind() + if self.kind_norm in valid_kinds: + return True + else: + raise ValueError(u'ERROR: kind_norm 不符合要求') + return False elif sind.dataType in [sind.RADIO_TYPE, sind.CHECKBOX_TYPE]: - raise ValueError(u'RADIO_TYPE, CHECKBOX_TYPE 验证未实现') + ## TODO: RADIO_TYPE, CHECKBOX_TYPE + raise ValueError(u'ERROR: RADIO_TYPE, CHECKBOX_TYPE 验证未实现') return False else: - raise ValueError(u'数据不符合要求') + raise ValueError(u'ERROR: 数据不符合要求') return False # }}} @@ -985,12 +1102,18 @@ class InnateConfine(models.Model): # {{{ unit_dump = self.unit.dump() else: unit_dump = {} + # check 'kind_norm' + if self.kind_norm: + kind_norm_dump = self.kind_norm.dump() + else: + kind_norm_dump = {} # dump dump_data = { 'id': self.id, 'indicator_id': self.indicator.id, 'unit': unit_dump, 'val_norm': self.val_norm, + 'kind_norm': kind_norm_dump, 'human_min': self.human_min, 'human_max': self.human_max, 'math_min': self.math_min, @@ -1123,17 +1246,76 @@ class RelatedIndicator(models.Model): # {{{ # }}} +class ValueKind(models.Model): # {{{ + """ + 记录某指标可以可使用的"种类"值 + + 并为需要使用"种类"值的地方提供可选范围(e.g.: recommend.ResearchAtom) + 使用统一的符号(symbol)来寻找及匹配 + """ + name = models.CharField(u"名称", max_length=30) + symbol = models.CharField(u"符号", max_length=30, + help_text=u"仅能使用字母、数字和下划线,最长30字符") + description = models.TextField(u"描述", blank=True) + indicator = models.ForeignKey("Indicator", + related_name="value_kinds", verbose_name=u"关联的指标", + null=True, blank=True) + + class Meta: + verbose_name_plural = u"指标可用种类" + + def __unicode__(self): + if self.indicator: + indicator_name = self.indicator.name + else: + indicator_name = '*' + return u'< ValueKind: %s(%s) for indicator(%s) >' %\ + (self.name, self.symbol, indicator_name) + + def save(self, **kwargs): + if self.is_valid(): + super(ValueKind, self).save(**kwargs) + else: + return self + + def is_valid(self): + # check symbol + sym_regex = re.compile(r'^[_0-9a-zA-Z]+$') + if sym_regex.search(self.symbol): + return True + else: + raise ValueError(u"仅能使用字母、数字和下划线,最长30字符") + return False + + def dump(self, **kwargs): + if self.indicator: + indicator_id = self.indicator.id + else: + indicator_id = None + # + dump_data = { + 'id': self.id, + 'name': self.name, + 'symbol': self.symbol, + 'description': self.description, + 'indicator_id': indicator_id, + } + return dump_data +# }}} + + admin.site.register([ - IndicatorCategory, - Indicator, - UserIndicator, - IndicatorRecord, - RecordHistory, - Unit, - InnateConfine, - StatisticalConfine, - RelatedIndicator, - ]) + IndicatorCategory, + Indicator, + UserIndicator, + IndicatorRecord, + RecordHistory, + Unit, + InnateConfine, + StatisticalConfine, + RelatedIndicator, + ValueKind, +]) # vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=python: # diff --git a/97suifangqa/apps/indicator/obsolete/forms.py b/97suifangqa/apps/indicator/obsolete/forms.py new file mode 100644 index 0000000..2e0b709 --- /dev/null +++ b/97suifangqa/apps/indicator/obsolete/forms.py @@ -0,0 +1,321 @@ +# -*- coding: utf-8 -*- + +""" +forms for apps/indicator +""" + +from django import forms +from django.utils.translation import ugettext as _ + +from indicator import models as im + +import sympy +from sympy.core.sympify import SympifyError + + +class IndicatorCategoryForm(forms.ModelForm): # {{{ + """ + form for 'models.IndicatorCategory' + """ + class Meta: + model = im.IndicatorCategory + exclude = ('addByUser',) +# }}} + + +class IndicatorForm(forms.ModelForm): # {{{ + """ + form for 'models.Indicator' + """ + class Meta: + model = im.Indicator + exclude = ('addByUser',) +# }}} + + +class UnitForm(forms.ModelForm): # {{{ + """ + form for 'models.Unit' + """ + class Meta: + model = im.Unit + exclude = ('addByUser',) + + def __init__(self, *args, **kwargs): + super(UnitForm, self).__init__(*args, **kwargs) + # store 'instance_id', for edting instance + self.instance_id = self.instance.id + + # 'clean_standard()' cannot raise Vali dationError correctly?? + # TODO: clean each field and generate errors accordingly. + + def clean(self): + cleaned_data = super(UnitForm, self).clean() + instance_id = self.instance_id + standard = cleaned_data['standard'] + indicator = cleaned_data['indicator'] + std_unit_list = indicator.get_unit(type="standard") + relation = cleaned_data.get('relation', u'') + if standard: + if std_unit_list and (instance_id != std_unit_list[0].id): + raise forms.ValidationError(_(u'标准单位已存在'), + code='standard') + cleaned_data['relation'] = u'v' + else: + try: + fsym = sympy.sympify(relation) + except SympifyError: + raise forms.ValidationError(_(u'"%(relation)s" 不是合法的表达式'), + code='relation_invalid', + params={'relation': relation}) + # always return the full collection of cleaned data + return cleaned_data +# }}} + + +class InnateConfineForm(forms.ModelForm): # {{{ + """ + form for 'models.InnateConfine' + """ + unit = forms.ModelChoiceField(label=u"标准单位", + queryset=im.Unit.objects.filter(standard=True)) + + class Meta: + model = im.InnateConfine + exclude = ('addByUser',) + + def clean(self): # {{{ + """ + check the validity of data + """ + cleaned_data = super(InnateConfineForm, self).clean() + indicator = cleaned_data['indicator'] + unit = cleaned_data.get('unit') + val_norm = cleaned_data.get('val_norm') + human_max = cleaned_data.get('human_max') + human_min = cleaned_data.get('human_min') + math_max = cleaned_data.get('math_max') + math_min = cleaned_data.get('math_min') + # check data + if indicator.dataType in [indicator.FLOAT_TYPE, + indicator.RANGE_TYPE, indicator.FLOAT_RANGE_TYPE]: + # check unit + if not (unit and unit.standard): + raise forms.ValidationError(_(u'unit 未填写/不是标准单位'), + code='unit') + if (human_max is None) or (human_min is None): + raise forms.ValidationError(_(u'human_max/human_min 未填写'), + code='human_empty') + if (human_max <= human_min): + raise forms.ValidationError(_(u'human_max <= human_min'), + code='human_relation') + # check 'math_max' and 'math_min' + if (math_max is None) or (math_min is None): + raise forms.ValidationError(_(u'math_max/math_min 未填写'), + code='math_empty') + if (math_max <= math_min): + raise forms.ValidationError(_(u'math_max <= math_min'), + code='math_relation') + # compare 'human*' and 'math*' + if (human_max > math_max) or (human_min < math_min): + raise forms.ValidationError(_(u'Error: human_max>math_max / human_min math_max): + raise forms.ValidationError(_(u'value(std) < math_min or value(std) > math_max'), + code='value_std_relation') + # val_max + if val_max is not None: + # unit conversion + try: + val_max_std = float(rel_sym.evalf( + subs={v: val_max})) + except ValueError: + raise forms.ValidationError(_(u'"%s" 求值错误,请检查只有变量"v"' % unit_rel), + code='val_max_evalf') + if (val_max_std <= math_min) or ( + val_max_std > math_max): + raise forms.ValidationError(_(u'val_max(std) <= math_min or val_max(std) > math_max'), + code='val_max_std_relation') + # val_min + if val_min is not None: + try: + val_min_std = float(rel_sym.evalf( + subs={v: val_min})) + except ValueError: + raise forms.ValidationError(_(u'"%s" 求值错误,请检查只有变量"v"' % unit_rel), + code='val_min_evalf') + if (val_min_std < math_min) or ( + val_min_std >= math_max): + raise forms.ValidationError(_(u'val_min(std) < math_min or val_min(std) >= math_max'), + code='val_min_std_relation') + # }}} + # return cleaned data + return cleaned_data + # }}} +# }}} + + +class RecordHistoryForm(forms.ModelForm): # {{{ + """ + form for 'models.RecordHistory' + """ + class Meta: + model = im.RecordHistory + exclude = ('indicatorRecord',) +# }}} + + +# vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=python.django: # diff --git a/97suifangqa/apps/indicator/obsolete/views_forms.py b/97suifangqa/apps/indicator/obsolete/views_forms.py new file mode 100644 index 0000000..89af21f --- /dev/null +++ b/97suifangqa/apps/indicator/obsolete/views_forms.py @@ -0,0 +1,311 @@ +# -*- coding: utf-8 -*- + +""" +views for used with forms.py + +splitted from 'views.py' +""" + +from indicator.forms import * + +########################################################### +###### forms ###### + +## add_edit_category # {{{ +@login_required +def add_edit_category(request, category_id=None, template='indicator/simple.html'): + """ + add/edit category: 'models.IndicatorCategory' + for 'staff' or 'normal user' + """ + # get or create model instance + if category_id: + category_id = int(category_id) + category = get_object_or_404(im.IndicatorCategory, + id=category_id) + action = 'Edit' + # check the user + # 'staff' can edit all data; + # normal users can only edit their own. + if category.addByUser != request.user and ( + not request.user.is_staff): + return HttpResponseForbidden() + else: + category = im.IndicatorCategory(addByUser=request.user) + action = 'Add' + + if request.method == 'POST': + form = IndicatorCategoryForm(request.POST, instance=category) + if form.is_valid(): + # form posted and valid + # save form to create/update the model instance + form.save() + # redirect url, avoid page reload/refresh + return HttpResponseRedirect('/indicator/done/') + else: + # form with data of the specified instance + form = IndicatorCategoryForm(instance=category) + + return render(request, template, { + 'object': 'IndicatorCategory', + 'action': action, + 'form': form, + }) +# }}} + + +# add_edit_indicator # {{{ +@login_required +def add_edit_indicator(request, indicator_id=None, template='indicator/simple.html'): + """ + add/edit indicator: 'models.Indicator' + for 'staff' or 'normal user' + """ + if indicator_id: + indicator_id = int(indicator_id) + indicator = get_object_or_404(im.Indicator, + id=indicator_id) + action = 'Edit' + # check the user + # 'staff' can edit all data; + # normal users can only edit their own. + if indicator.addByUser != request.user and ( + not request.user.is_staff): + return HttpResponseForbidden() + else: + indicator = im.Indicator(addByUser=request.user) + action = 'Add' + + if request.method == 'POST': + form = IndicatorForm(request.POST, instance=indicator) + if form.is_valid(): + # form posted and valid + form.save() + # redirect url, avoid page reload/refresh + return HttpResponseRedirect('/indicator/done/') + else: + # form with instance + form = IndicatorForm(instance=indicator) + + return render(request, template, { + 'object': 'Indicator', + 'action': action, + 'form': form, + }) +# }}} + + +## add_edit_unit {{{ +@login_required +def add_edit_unit(request, unit_id=None, template='indicator/simple.html'): + """ + add unit for indicator + """ + if unit_id: + unit_id = int(unit_id) + unit = get_object_or_404(im.Unit, id=unit_id) + action = 'Edit' + # check the user + # 'staff' can edit all data; + # normal users can only edit their own. + if unit.addByUser != request.user and ( + not request.user.is_staff): + return HttpResponseForbidden() + else: + unit = im.Unit(addByUser=request.user) + action = 'Add' + + if request.method == 'POST': + form = UnitForm(request.POST, instance=unit) + if form.is_valid(): + # form posted and valid + form.save() + # redirect url, avoid page reload/refresh + return HttpResponseRedirect('/indicator/done/') + else: + # form with instance + form = UnitForm(instance=unit) + + return render(request, template, { + 'object': 'Unit', + 'action': action, + 'form': form, + }) +# }}} + + +## add_edit_confine {{{ +@login_required +def add_edit_confine(request, confine_id=None, template='indicator/simple.html'): + """ + InnateConfine + add confines for indicator + """ + if confine_id: + confine_id = int(confine_id) + confine = get_object_or_404(im.InnateConfine, id=confine_id) + action = 'Edit' + # check the user + # 'staff' can edit all data; + # normal users can only edit their own. + if confine.addByUser != request.user and ( + not request.user.is_staff): + return HttpResponseForbidden() + else: + confine = im.InnateConfine(addByUser=request.user) + action = 'Add' + + if request.method == 'POST': + form = InnateConfineForm(request.POST, instance=confine) + if form.is_valid(): + # form posted and valid + form.save() + # redirect url, avoid page reload/refresh + return HttpResponseRedirect('/indicator/done/') + else: + # form with instance + form = InnateConfineForm(instance=confine) + + return render(request, template, { + 'object': 'InnateConfine', + 'action': action, + 'form': form, + }) +# }}} + + +## add_edit_record {{{ +@login_required +def add_edit_record(request, record_id=None, template='indicator/simple.html'): + """ + add/edit 'IndicatorRecord' + + staff 能自由地修改所有的记录,并且无需填写"修改原因"; + 普通用户只能修改自己的记录,而且必须填写"修改原因" -> RecordHistory + + TODO: + * 当用户选择好"indicator"后,重新筛选"unit",只提供与"indicator" + 对应的"unit"供选择; + * 对"普通用户"增加限制,修改数据"记录"时必须同时提交"修改原因", + 对应模型"RecordHistory"。 + """ + if record_id: + record_id = int(record_id) + record = get_object_or_404(im.IndicatorRecord, id=record_id) + action = 'Edit' + # check the user + if request.user.is_staff: + # 'staff' can edit all data; + pass + elif request.user == record.user: + # user modify the record + return HttpResponse("Not finished yet ...") + #return modify_record(request, record_id) + else: + return HttpResponseForbidden() + else: + record = im.IndicatorRecord(user=request.user) + action = 'Add' + + if request.method == 'POST': + form = IndicatorRecordForm(request.POST, instance=record) + if form.is_valid(): + #raise ValueError + form.save() + # redirect url, avoid page reload/refresh + return HttpResponseRedirect('/indicator/done/') + else: + # form with instance + form = IndicatorRecordForm(instance=record) + + return render(request, template, { + 'object': 'IndicatorRecord', + 'action': action, + 'form': form, + }) +# }}} + + +## modify_record {{{ +@login_required +def modify_record(request, record_id=None, template='indicator/simple.html'): + """ + modify an existing IndicatorRecord + + TODO: + a new 'RecordHistory' is added to record the modification reason + and backup the original data + """ + if record_id: + record_id = int(record_id) + record = get_object_or_404(im.IndicatorRecord, id=record_id) + action = 'Edit' + # check the user + if request.user.is_staff: + # 'staff' can edit all data; + return add_edit_record(request, record_id) + elif request.user == record.user: + # user modify the record + action = 'Modify' + pass + else: + return HttpResponseForbidden() + else: + return add_edit_record(request) + + if request.method == 'POST': + form = IndicatorRecordForm(request.POST, instance=record) + if form.is_valid(): + # form posted and valid + # TODO + raise ValueError(u"该功能尚未完整实现") + form.save() + # redirect url, avoid page reload/refresh + return HttpResponseRedirect('/indicator/done/') + else: + # form with instance + form = IndicatorRecordForm(instance=record) + + return render(request, template, { + 'object': 'IndicatorRecord', + 'action': action, + 'form': form, + }) +## }}} + + +## add_recordhistory_view {{{ +@login_required +def add_recordhistory_view(request, record_id, template='indicator/simple.html'): + """ + add 'RecordHistory' for a record by given + + 'staff' should use the 'admin' interface. + """ + record_id = int(record_id) + record = get_object_or_404(im.IndicatorRecord, id=record_id) + recordhistory = im.RecordHistory(indicatorRecord=record) + action = 'Add' + # check the user + if request.user != record.user: + return HttpResponseForbidden() + + if request.method == 'POST': + form = RecordHistoryForm(request.POST, instance=recordhistory) + if form.is_valid(): + # form posted and valid + form.save() + # redirect url, avoid page reload/refresh + return HttpResponseRedirect('/indicator/done/') + else: + # form with instance + form = RecordHistoryForm(instance=recordhistory) + + return render(request, template, { + 'object': 'RecordHistory', + 'action': action, + 'form': form, + }) +# }}} + + diff --git a/97suifangqa/apps/indicator/search_indexes.py b/97suifangqa/apps/indicator/search_indexes.py index f225b2c..aa0653d 100644 --- a/97suifangqa/apps/indicator/search_indexes.py +++ b/97suifangqa/apps/indicator/search_indexes.py @@ -12,7 +12,7 @@ class IndicatorCategoryIndex(indexes.SearchIndex, indexes.Indexable): search index for 'Indicator' """ text = indexes.CharField(document=True, use_template=True) - # pinyin: for ordering the search result + # fields used to filter results pinyin = indexes.CharField(model_attr='pinyin') addByUser = indexes.CharField(model_attr='addByUser') @@ -33,8 +33,9 @@ class IndicatorIndex(indexes.SearchIndex, indexes.Indexable): search index for 'Indicator' """ text = indexes.CharField(document=True, use_template=True) - # pinyin: for ordering the search result + # fields used to filter results pinyin = indexes.CharField(model_attr='pinyin') + type = indexes.CharField(model_attr='type') addByUser = indexes.CharField(model_attr='addByUser') dataType = indexes.CharField(model_attr='dataType') categories_id = indexes.MultiValueField() diff --git a/97suifangqa/apps/indicator/static/css/delete_card_tip.css b/97suifangqa/apps/indicator/static/css/delete_card_tip.css index 89eee88..9fef26f 100644 --- a/97suifangqa/apps/indicator/static/css/delete_card_tip.css +++ b/97suifangqa/apps/indicator/static/css/delete_card_tip.css @@ -4,6 +4,7 @@ background-color: #FFFFFF; border: 1px solid #94C721; padding: 0 20px 0 20px; + border-radius: 3px; } .delete_card_tip_title_line { height: 42px; @@ -26,26 +27,49 @@ cursor: pointer; } .delete_card_tip_content { - height: 55px; + height: 60px; line-height: 55px; color: #4A4A4A; font-size: 14px; + text-align: center } .delete_card_tip_action { height: 67px; + margin-left: -20px; } -.delete_card_tip_action .action_confirm_cancel, .delete_card_tip_action .action_confirm_ignore { +.delete_card_tip_action .action_confirm_ignore { background-color: #99CC33; - border-radius: 2px; - width: 75px; + border-radius: 3px; + width: 100px; color: white; cursor: pointer; - height: 22px; - line-height: 22px; + height: 26px; display: inline-block; text-align: center; - margin-top: 13px; text-decoration: none; + font-size: 15px; + padding:2px; + padding-top:7px; + margin-right: 20px; + +} + +.delete_card_tip_action .action_confirm_cancel{ + background-color: #a8a8a8; + border-radius: 3px; + width: 100px; + color: white; + cursor: pointer; + height: 26px; + display: inline-block; + text-align: center; + text-decoration: none; + padding:2px; + font-size: 15px; + padding-top:7px; + margin-right: 40px; + + } .delete_card_tip_action .action_confirm_cancel { margin: 0 11px 0 213px; diff --git a/97suifangqa/apps/indicator/static/css/edit_history_data.css b/97suifangqa/apps/indicator/static/css/edit_history_data.css index e1caa9f..d3124de 100644 --- a/97suifangqa/apps/indicator/static/css/edit_history_data.css +++ b/97suifangqa/apps/indicator/static/css/edit_history_data.css @@ -23,16 +23,18 @@ input[type="radio"]:checked + label { #edit_history_data_container { width: 588px; - height: 180px; + height: 230px; background-color: #FFFFFF; border: 1px solid #94C721; padding: 0 20px 0 20px; + border-radius: 3px; } .edit_history_data_title_line { height: 42px; line-height: 42px; border-bottom: 1px solid #D6D0D6; width: 588px; + margin-top: 10px; } .edit_history_data_title_line .edit_history_data_title { font-weight: bold; @@ -51,6 +53,7 @@ input[type="radio"]:checked + label { .edit_history_data_content { color: #4A4A4A; font-size: 14px; + margin-top:10px; } .edit_history_data_content .refer_range { height: 26px; @@ -60,9 +63,11 @@ input[type="radio"]:checked + label { } .edit_history_data_content .refer_range .refer_text { margin-right: 8px; + margin-bottom:-5px; } .edit_history_data_content .refer_range .refer_value { margin-right: 8px; + margin-bottom:-10px; } .edit_history_data_content .edit_data { line-height: 26px; @@ -70,6 +75,7 @@ input[type="radio"]:checked + label { .edit_history_data_content .edit_data .date { height: 26px; line-height: 26px; + margin-top: -10px; } .edit_history_data_content .edit_data .date .date_text { margin-right: 8px; @@ -93,11 +99,11 @@ input[type="radio"]:checked + label { font-weight: bold; } .edit_history_data_content .edit_data .state .normal { - background-color: #B8DB70; + /*background-color: #B8DB70;*/ padding: 2px; } .edit_history_data_content .edit_data .state .abnormal { - background-color: #FFB3B3; + color: #99CC33; padding: 2px; } .edit_history_data_content .edit_data .state .unknown { @@ -105,19 +111,45 @@ input[type="radio"]:checked + label { padding: 2px; } .edit_history_data_content .edit_data #delete_btn { - float: right; - height: 26px; - line-height: 22px; - padding: 1px 26px; - margin-right: 8px; - background-color: #E64848; + background-color: rgb(50, 53, 61); + border-radius: 3px 3px 3px 3px; + color: rgb(255, 255, 255); + float: right; + font-size: 15px; + height: 35px; + margin-right: 15px; + margin-top: 5px; + padding: 1px 26px 1px 20px; + width: 100px; } .edit_history_data_content .edit_data #edit_btn, .edit_history_data_content .editing_data #save_btn { - float: right; - height: 26px; - line-height: 22px; - padding: 1px 26px; + border-radius: 3px 3px 3px 3px; + float: right; + font-size: 15px; + height: 35px; + margin-top: 5px; + padding: 1px 26px 1px 20px; + width: 100px +} +.edit_history_data_content .delete_prompt { + float: right; + height: 35px; + margin-top: 10px; +} +.edit_history_data_content .delete_prompt div { + float: right; + margin-right: 10px; +} +.edit_history_data_content .delete_prompt .prompt { + font-size: 16px; + line-height: 24px; + padding: 1px 10px 1px 10px; +} +.edit_history_data_content .delete_prompt .prompt_btns { + cursor: pointer; } + + .edit_history_data_content .editing_data { line-height: 26px; display: none; @@ -138,30 +170,40 @@ input[type="radio"]:checked + label { position: relative; } .edit_history_data_content .editing_data .date .datepicker { - background: #FFFFFF; - border: 1px solid #9C9C9C; - color: #B9B9B9; - width: 131px; - height: 17px; - line-height: 17px; - position: relative; - padding-top: 2px; - padding-bottom: 2px; + background: none repeat scroll 0 0 rgb(255, 255, 255); + border: 1px solid rgb(217, 217, 217); + border-radius: 3px 3px 3px 3px; + color: rgb(217, 217, 217); + height: 30px; + line-height: 17px; + margin: -3px 0 15px; + padding-top: 2px; + position: absolute; + width: 123px; } + +.edit_history_data_content .editing_data .date .datepicker:focus { + outline:0; + border-color:#99cc33; +} + .edit_history_data_content .editing_data .date .ui-datepicker-trigger { position: absolute; - top: 4px; - right: 8px; + top: 5px; + right: 20px; + /* margin-right: -10px; */ cursor: pointer; + margin-top: -1px; + /* margin-left: -50px; */ + } .edit_history_data_content .editing_data .date .datepicker_container .valid { - border: 2px solid green; + color:inherit; } .edit_history_data_content .editing_data .date .datepicker_container .invalid { border: 2px solid red; } .edit_history_data_content .editing_data .data { - height: 26px; line-height: 26px; float: left; top: 1px; @@ -169,14 +211,24 @@ input[type="radio"]:checked + label { .edit_history_data_content .editing_data .data .prompt { margin-right: 8px; float: left; + margin-top: 16px; + line-height: 1.6em; } .edit_history_data_content .editing_data .data input { color: #5C5C5C; background-color: #FFFFFF; - border: 1px solid #9C9C9C; + border: 1px solid rgb(217,217,217); + border-radius: 3px; + padding-left: 10px; +} + +.edit_history_data_content .editing_data .data input:focus { + border-color:#99cc33; } + .edit_history_data_content .editing_data .data .valid { - border: 2px solid green; + /* border: 2px solid green; */ + color: inherit; } .edit_history_data_content .editing_data .data .invalid { border: 2px solid red; @@ -186,17 +238,20 @@ input[type="radio"]:checked + label { float: left; } .edit_history_data_content .editing_data .data .data_input { - width: 200px; - height: 17px; - line-height: 17px; - padding-top: 2px; - padding-bottom: 2px; - margin-right: 8px; + float: right; + height: 28px; + line-height: 17px; + margin-right: 8px; + margin-top: 10px; + padding-bottom: 2px; + padding-top: 2px; + width: 120px; } .edit_history_data_content .editing_data .data_unit { height: 26px; line-height: 26px; margin-right: 8px; + margin-top: 16px; } .edit_history_data_content .editing_data .reason { height: 26px; @@ -206,6 +261,7 @@ input[type="radio"]:checked + label { .edit_history_data_content .editing_data .reason .prompt { margin-right: 8px; float: left; + margin-top: 10px; } .edit_history_data_content .editing_data .reason input { color: #5C5C5C; @@ -216,12 +272,19 @@ input[type="radio"]:checked + label { border: 2px solid green; } .edit_history_data_content .editing_data .reason .invalid { - border: 2px solid red; } .edit_history_data_content .editing_data .reason .reason_input { width: 330px; - height: 17px; + height: 26px; line-height: 17px; padding-top: 2px; padding-bottom: 2px; + margin-top: 7px; + border-radius: 3px; + border-color: rgb(217,217,217); } + +.edit_history_data_content .editing_data .reason .reason_input :focus{ + + border-color:#99cc33; + } diff --git a/97suifangqa/apps/indicator/static/css/nav.css b/97suifangqa/apps/indicator/static/css/nav.css new file mode 100644 index 0000000..a103f90 --- /dev/null +++ b/97suifangqa/apps/indicator/static/css/nav.css @@ -0,0 +1,1213 @@ +@charset "UTF-8"; +/** + * @file + * Blog specific styles + */ +/* line 10, ../../../sass/sass/blog.scss */ +body.scrolled-down.blog #blog-top-nav { + background-color: white; +} +/* line 13, ../../../sass/sass/blog.scss */ +body.scrolled-down.blog #blog-top-nav .background { + border-bottom: 1px solid #eee; +} + +/* line 22, ../../../sass/sass/blog.scss */ +.blog .post-question input[type="text"] { + background-color: #8b8885; + color: white; + border: 1px solid white; + -webkit-box-shadow: 0px 0px 2px white; + -moz-box-shadow: 0px 0px 2px white; + box-shadow: 0px 0px 2px white; +} +/* line 65, ../../../sass/sass/_custom.scss */ +.blog .post-question input[type="text"].placeholder { + color: #eeeeee; +} +/* line 68, ../../../sass/sass/_custom.scss */ +.blog .post-question input[type="text"]:focus.placeholder { + color: transparent; +} +/* line 65, ../../../sass/sass/_custom.scss */ +.blog .post-question input[type="text"].input-placeholder { + color: #eeeeee; +} +/* line 68, ../../../sass/sass/_custom.scss */ +.blog .post-question input[type="text"]:focus.input-placeholder { + color: transparent; +} +/* line 65, ../../../sass/sass/_custom.scss */ +.blog .post-question input[type="text"]:-moz-placeholder { + color: #eeeeee; +} +/* line 68, ../../../sass/sass/_custom.scss */ +.blog .post-question input[type="text"]:focus:-moz-placeholder { + color: transparent; +} +/* line 65, ../../../sass/sass/_custom.scss */ +.blog .post-question input[type="text"]::-webkit-input-placeholder { + color: #eeeeee; +} +/* line 68, ../../../sass/sass/_custom.scss */ +.blog .post-question input[type="text"]:focus::-webkit-input-placeholder { + color: transparent; +} +/* line 65, ../../../sass/sass/_custom.scss */ +.blog .post-question input[type="text"]::-moz-placeholder { + color: #eeeeee; +} +/* line 68, ../../../sass/sass/_custom.scss */ +.blog .post-question input[type="text"]:focus::-moz-placeholder { + color: transparent; +} +/* line 65, ../../../sass/sass/_custom.scss */ +.blog .post-question input[type="text"]:-ms-input-placeholder { + color: #eeeeee; +} +/* line 68, ../../../sass/sass/_custom.scss */ +.blog .post-question input[type="text"]:focus:-ms-input-placeholder { + color: transparent; +} +/* line 32, ../../../sass/sass/blog.scss */ +.blog #sidebar-first #header { + position: absolute; + bottom: 30px; + text-align: center; + width: auto; + +} +/* line 40, ../../../sass/sass/blog.scss */ + #nav-ribbon { + font-size: 1.07143em; + line-height: 1.33333em; + margin-bottom: 1.5em; + color: white; + position: relative; + white-space: nowrap; + height: 33px; + min-width: 89px; + -webkit-transition: min-width 0.3s ease; + -webkit-transition-delay: 0s; + -moz-transition: min-width 0.3s ease 0s; + -o-transition: min-width 0.3s ease 0s; + transition: min-width 0.3s ease 0s; +} +/* line 56, ../../../sass/sass/blog.scss */ + #nav-ribbon .controls-wrap, + #nav-ribbon .head-background, + #nav-ribbon .tail-cut { + height: 33px; +} +/* line 60, ../../../sass/sass/blog.scss */ + #nav-ribbon .controls-wrap { + position: absolute; + padding-left: 20px; +} +/* line 67, ../../../sass/sass/blog.scss */ + #nav-ribbon .head-background, + #nav-ribbon .links-wrap, + #nav-ribbon .tail { + background-color: #0063a8; +} +/* line 71, ../../../sass/sass/blog.scss */ + #nav-ribbon .head-background { + position: absolute; + top: 0; + left: 0; + width: 20px; + -webkit-box-shadow: inset 20px 0px 20px -20px; + -moz-box-shadow: inset 20px 0px 20px -20px; + box-shadow: inset 20px 0px 20px -20px; +} +/* line 81, ../../../sass/sass/blog.scss */ + #nav-ribbon .links-wrap, + #nav-ribbon .tail, + #nav-ribbon .tail-cut { + float: left; +} +/* line 85, ../../../sass/sass/blog.scss */ + #nav-ribbon .links-wrap { + -webkit-transition: width 0.3s ease; + -webkit-transition-delay: 0s; + -moz-transition: width 0.3s ease 0s; + -o-transition: width 0.3s ease 0s; + transition: width 0.3s ease 0s; + width: 0px; + overflow: hidden; +} +/* line 93, ../../../sass/sass/blog.scss */ + #nav-ribbon:hover .links-wrap, #nav-ribbon.active .links-wrap, + #nav-ribbon ul.links { + width: 174px; +} +/* line 100, ../../../sass/sass/blog.scss */ + #nav-ribbon:hover, #nav-ribbon.active { + min-width: 263px; +} +/* line 105, ../../../sass/sass/blog.scss */ + #nav-ribbon ul.links li a, +#nav-ribbon .tail { + line-height: 33px; + text-align: center; +} +/* line 110, ../../../sass/sass/blog.scss */ +#nav-ribbon ul.links { + display: block; + white-space: nowrap; + margin: 0; + padding: 0; +} +/* line 115, ../../../sass/sass/blog.scss */ +#nav-ribbon ul.links li { + display: block; + padding: 0; + float: left; +} +/* line 119, ../../../sass/sass/blog.scss */ +#nav-ribbon ul.links li a { + width: 86px; + display: block; + color: white; + border-right: 1px solid #267ab5; +} +/* line 126, ../../../sass/sass/blog.scss */ +#nav-ribbon ul.links li a:hover, #nav-ribbon ul.links li a:active, #nav-ribbon ul.links li a.active { + text-decoration: none; + background-color: #00497f; +} +/* line 134, ../../../sass/sass/blog.scss */ +#nav-ribbon .tail { + width: 50px; + cursor: pointer; +} +/* line 139, ../../../sass/sass/blog.scss */ +#nav-ribbon .tail-cut { + width: 19px; + height: 33px; + background: url(../../static/images/nav-ribbon-tail-cut.png); +} + +/* line 150, ../../../sass/sass/blog.scss */ +.blog-details #return-to-results-button { + visibility: hidden; +} +/* line 154, ../../../sass/sass/blog.scss */ +.blog-details.blog-results-detail #return-to-results-button { + visibility: visible; +} +/* line 159, ../../../sass/sass/blog.scss */ +.blog-details a.jargon:hover { + text-decoration: none; + border-bottom: 1px dashed; +} +/* line 163, ../../../sass/sass/blog.scss */ +.blog-details .jargon-explanations { + display: none; +} +/* line 168, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .region-wrap, +.blog-details #content .region-wrap { + padding-top: 0.5em; + padding-left: 2em; + padding-right: 2em; +} +/* line 177, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav { + z-index: 10; + position: absolute; +} +/* line 181, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .breadcrumb { + margin-top: 1.5em; +} +/* line 184, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .breadcrumb ul.inline li { + padding-right: 0; +} +/* line 186, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .breadcrumb ul.inline li a.button { + padding-top: 0.5em; + padding-bottom: 0.5em; + padding-left:0.8em; + padding-right: 0.8em; + border-radius: 3px 3px 3px 3px; + font-weight: bold; +} +/* line 191, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .breadcrumb ul.inline li a.button.first { + background-image: url(../../images/breadcrumb-dark-grey-button-left-arrow-wbg.png); + background-position: center left; + background-repeat: no-repeat; + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + -ms-border-radius: 0 3px 3px 0; + -o-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; + border: none; + padding-left: 20px; +} +/* line 198, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .breadcrumb ul.inline li a.button.first:hover { + background-color: #4c4948; +} +/* line 211, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .section-name { + font-size: 18px; + color: #9fa0a0; +} +/* line 215, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .section-nav { + width: auto; +} +/* line 222, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .section-nav ul.links { + display: block; + width: auto; + margin: 0; +} +/* line 226, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .section-nav ul.links li { + margin-right: 3em; + padding: 0; +} +/* line 229, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .section-nav ul.links li a { + color: inherit; +} +/* line 231, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .section-nav ul.links li a.active { + color: #99cc33; + /*border-bottom: 1px dashed #99cc33;*/ + text-decoration: none; +} +/* line 237, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .section-nav ul.links:hover li a.active { + color: inherit; + border-bottom: none; +} +/* line 244, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .section-nav ul.links li a:hover, .blog-details #blog-top-nav .section-nav ul.links:hover li a:hover { + color: #99cc33; + /*border-bottom: 1px dashed #99cc33;*/ + text-decoration: none; +} +/* line 250, ../../../sass/sass/blog.scss */ +.blog-details #blog-top-nav .background { + z-index: -1; + position: absolute; + top: 0; + bottom: -2px; + left: 0; + right: 0; + margin-left: 2em; + margin-right: 2em; + background-color: white; + border-bottom: 1px solid transparent; +} +/* line 265, ../../../sass/sass/blog.scss */ +.blog-details #content { + margin-top: 150px; + position: relative; +} +/* line 268, ../../../sass/sass/blog.scss */ +.blog-details #content .text { + font-size: 1.14286em; + line-height: 1.6875em; +} +/* line 270, ../../../sass/sass/blog.scss */ +.blog-details #content .text h3 { + font-size: 1.1em; + color: #4c4a49; + line-height: 1.5em; +} +/* line 274, ../../../sass/sass/blog.scss */ +.blog-details #content .text h4 { + color: #4c4a49; +} +/* line 280, ../../../sass/sass/blog.scss */ +.blog-details #content .text .image-wrap { + border: 1px solid #c9caca; + margin-bottom: 1.14286em; +} +/* line 285, ../../../sass/sass/blog.scss */ +.blog-details #content .text a.enlarge-image { + cursor: pointer; + cursor: url(../../images/zoom.cur), auto; +} +/* line 290, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box { + z-index: 1; + position: absolute; + display: none; + position: absolute; + margin-top: 8px; + left: 20px; + right: 20px; + background-color: white; + border: 1px solid #8fc31f; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + -webkit-box-shadow: 0px 0px 30px #999999; + -moz-box-shadow: 0px 0px 30px #999999; + box-shadow: 0px 0px 30px #999999; +} +/* line 105, ../../../sass/sass/_custom.scss */ +.blog-details #content .jargon-explanation-box.open { + display: block; +} +/* line 300, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box .content-wrap { + padding-left: 1.5em; + padding-right: 1.5em; + padding-top: 0.7em; +} +/* line 306, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box .content-wrap .jargon-details { + min-height: 150px; + max-height: 250px; + overflow: auto; +} +/* line 311, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box .content-wrap .references { + font-size: 0.8em; + font-style: italic; +} +/* line 316, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box .text-pointer { + z-index: 10; + position: absolute; + width: 20px; + height: 8px; + background-image: url(../../images/popup-text-pointer.png); + top: -8px; + margin-left: -10px; + left: 10px; +} +/* line 326, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box .close-box { + z-index: 1; + position: absolute; + width: 20px; + height: 20px; + background: url(../../images/grey-cross.png) no-repeat center center; + cursor: pointer; + right: 1.5em; + top: 1.5em; +} +/* line 336, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box h3.name { + margin: 0; + border-bottom: 1px solid #c9cacb; + margin-top: 0em; + margin-bottom: 1em; +} +/* line 342, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box .like-button { + display: block; + margin: 1em; + width: auto; +} +/* line 347, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box .like-button * { + vertical-align: middle; +} +/* line 350, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box .like-button a.login-button { + vertical-align: top; +} +/* line 356, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box .content-wrap, +.blog-details #content .jargon-explanation-box .like-button { + visibility: hidden; +} +/* line 360, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box .loading-image { + visibility: visible; + position: absolute; + top: 50%; + left: 50%; + margin-top: -38.5px; + margin-left: -53.5px; +} +/* line 371, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box.loaded .content-wrap, +.blog-details #content .jargon-explanation-box.loaded .like-button { + visibility: visible; +} +/* line 374, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box.loaded .loading-image { + visibility: hidden; +} +/* line 378, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box.modal { + position: fixed; + z-index: 2001; + padding: 0; + left: 50%; + margin-left: -350px; + width: 700px; + top: 50% !important; + -webkit-box-shadow: 0px 0px 30px #444444; + -moz-box-shadow: 0px 0px 30px #444444; + box-shadow: 0px 0px 30px #444444; +} +/* line 383, ../../../sass/sass/blog.scss */ +.blog-details #content .jargon-explanation-box.modal .text-pointer { + display: none; +} +/* line 390, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card-brief { + font-size: 0.875em; + line-height: 1.63265em; +} +/* line 393, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card { + font-size: 0.875em; + line-height: 1.30612em; + cursor: pointer; + border: 1px solid #c9caca; +} +/* line 397, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card .back .card-wrap { + height: 200px; + color: white; + background-color: #4c4948; + background-image: url(../../images/card-bg-grey.png); + background-repeat: no-repeat; + background-position: center center; + text-align: center; + line-height: 1.5em; +} +/* line 407, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card .back .card-wrap .content-wrap { + padding-top: 2em; +} +/* line 411, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card .front .card-wrap { + height: 200px; + position: relative; + overflow: hidden; +} +/* line 415, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card .front .card-wrap .card-title { + font-weight: normal; + background-color: #4c4948; + color: white; + margin: 0; + position: absolute; + bottom: 0; + left: 0; + right: 0; + width: auto; + line-height: 50px; + padding-left: 0.5em; + padding-right: 0.5em; + padding-top: 0; + padding-bottom: 0; +} +/* line 433, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card .front .card-wrap .card-subtitle { + font-size: 0.95em; + font-weight: normal; + color: white; + background-color: #3e3a39; + padding: 0; + margin: 0; + position: absolute; + bottom: 50px; + left: 0; + right: 0; + padding-left: 0.5em; + padding-top: 0.1em; + padding-bottom: 0.1em; +} +/* line 450, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card .front .card-wrap .card-details { + padding: 0.5em; +} +/* line 455, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card .front { + height: 200px; +} +/* line 459, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card .back { + height: 0; +} +/* line 463, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card .abstract { + display: none; +} +/* line 468, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card .front, +.blog-details #content .cards .card .back { + overflow: hidden; + -webkit-transition: height 0.3s ease; + -webkit-transition-delay: 0s; + -moz-transition: height 0.3s ease 0s; + -o-transition: height 0.3s ease 0s; + transition: height 0.3s ease 0s; +} +/* line 475, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card:hover .front, .blog-details #content .cards .card:active .front { + height: 0; +} +/* line 478, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card:hover .back, .blog-details #content .cards .card:active .back { + height: 200px; +} +/* line 484, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card.green .back .card-wrap { + background-image: url(../../images/card-bg-green.png); + background-color: #8fc41f; +} +/* line 488, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card.green .front .card-wrap { + color: #8fc41f; +} +/* line 490, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card.green .front .card-wrap .card-title { + background-color: #8fc41f; +} +/* line 493, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card.green .front .card-wrap .card-subtitle { + background-color: #7cb617; +} +/* line 500, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card.blue .back .card-wrap { + background-image: url(../../images/card-bg-blue.png); + background-color: #0063a8; +} +/* line 504, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card.blue .front .card-wrap { + color: #006699; +} +/* line 506, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card.blue .front .card-wrap .card-title { + background-color: #0063a8; +} +/* line 509, ../../../sass/sass/blog.scss */ +.blog-details #content .cards .card.blue .front .card-wrap .card-subtitle { + background-color: #00508f; +} +/* line 517, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first, +.blog-details #sidebar-second { + position: absolute; + min-height: 650px; + height: auto; + top: 0; + bottom: 0; +} +/* line 525, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second #login { + margin-top: 1.5em; +} +/* line 528, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .social { + font-size: 1em; + line-height: 1.42857em; + margin-top: 3em; +} +/* line 532, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .social ul.buttons li { + padding: 0; +} +/* line 535, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .social ul.buttons .multi-segment-button .segment.first { + width: 60px; + white-space: nowrap; + overflow: hidden; +} +/* line 540, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .social ul.buttons .multi-segment-button { + font-weight: bold; +} +/* line 544, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .social ul.buttons #like-button .like-button { + background-image: url(../../images/grey-star.png); + background-repeat: no-repeat; + background-position: 10px center; +} +/* line 550, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .social ul.buttons #no-idea-button { + float: right; +} +/* line 552, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .social ul.buttons #no-idea-button .no-idea-button { + background-image: url(../../images/white-unhappy-face.png); + background-repeat: no-repeat; + background-position: 10px center; +} +/* line 561, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .comments { + margin-top: 2.5em; +} +/* line 563, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .comments ol { + font-size: 0.92857em; + line-height: 1.38462em; + max-height: 400px; + overflow: hidden; + overflow: auto; + counter-reset: comments-counter; + margin: 0; + padding: 0; +} +/* line 571, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .comments ol li:before { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; + width: 1.3em; + text-align: center; + font-family: "Courier New", "DejaVu Sans Mono", monospace, sans-serif, "STHeiti", "WenQuanYi Micro Hei", "Microsoft YaHei", SimSun, sans-serif; + background-color: #898989; + color: white; + float: left; + margin-left: -2em; + padding-left: 0.05em; + content: counter(comments-counter); + counter-increment: comments-counter; +} +/* line 581, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .comments ol li { + margin-left: 2em; + margin-bottom: 1em; +} +/* line 584, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .comments ol li a { + color: inherit; +} +/* line 592, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second #card-abstract { + margin-top: 3em; + -webkit-transition: all ease; + -webkit-transition-delay: 0.5s; + -moz-transition: all ease 0.5s; + -o-transition: all ease 0.5s; + transition: all ease 0.5s; + visibility: hidden; + opacity: 0; +} +/* line 124, ../../../sass/sass/_custom.scss */ +.blog-details #sidebar-second #card-abstract.show { + visibility: visible; + opacity: 1; +} +/* line 598, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .jargon-list { + font-size: 1em; + line-height: 1.71429em; +} +/* line 600, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .jargon-list ul { + margin: 0; + padding: 0; + max-height: 400px; + overflow: auto; +} +/* line 605, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .jargon-list ul li { + padding: 0; +} +/* line 607, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .jargon-list ul li a { + outline: 0; + display: block; + color: inherit; + text-decoration: none; + padding-left: 1.5em; + padding-top: 0.3em; + padding-bottom: 0.3em; +} +/* line 619, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-second .jargon-list ul li a:hover, +.blog-details #sidebar-second .jargon-list ul li a .active { + background-color: #898989; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; + color: white; + text-decoration: none; +} +/* line 630, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first { + z-index: 10; + padding-top: 1.5em; + padding-bottom: 1.5em; +} +/* line 637, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first #nav-ribbon { + margin-left: -20px; +} +/* line 640, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first .post-question { + overflow: hidden; + width: auto; +} +/* line 643, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first .post-question .question { + width: 60%; +} +/* line 646, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first .post-question .submit { + float: right; + width: 30%; +} +/* line 651, ../../../sass/sass/blog.scss */ +.related-questions { + padding:15px 13px 15px 13px; + background-color: white; + margin-top: 0; + margin-bottom: 17px; + -webkit-box-shadow: 0px 0px 5px #bbbbbb; + -moz-box-shadow: 0px 0px 5px #bbbbbb; + box-shadow: 0px 0px 5px #bbbbbb; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 3px; + width:300px; + font-size:15px; + line-height: 1.6em; +} + +.related-questions:hover{ + box-shadow:0px 0px 10px #898989; + -webkit-box-shadow: 0px 0px 10px #898989; + -moz-box-shadow: 0px 0px 10px #898989; + -ms-box-shadow:0px 0px 10px #898989; + -o-box-shadow:0px 0px 10px #898989; +} + +.related-questions span{ + color: #a8a8a8; +} +/* line 658, ../../../sass/sass/blog.scss */ +.related-questions h3 { + margin: 0; + line-height: 1.5em; +} +/* line 665, ../../../sass/sass/blog.scss */ +.related-questions a { + color: #727171; +} + +.related-questions a { + text-decoration: none; +} +/* line 669, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first .toc { + margin-top: 1em; +} +/* line 675, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first .toc .toc-title { + margin: 0; + padding-left: 1em; + border-bottom: 1px solid #c9caca; + -webkit-box-shadow: 0px 1px 0px 0px white; + -moz-box-shadow: 0px 1px 0px 0px white; + box-shadow: 0px 1px 0px 0px white; +} +/* line 681, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first .toc ul.links { + font-size: 16.38px; + margin: 0; + padding: 0; +} +/* line 685, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first .toc ul.links li { + list-style: none; + background-image: url(../../images/righticon.png); + background-repeat: no-repeat; + background-position: center right; + margin: 0; + padding-left: 1em; + border-bottom: 1px solid #c9caca; + -webkit-box-shadow: 0px 1px 0px 0px white; + -moz-box-shadow: 0px 1px 0px 0px white; + box-shadow: 0px 1px 0px 0px white; + -webkit-transition: 0.1s ease; + -webkit-transition-delay: 0s; + -moz-transition: 0.1s ease 0s; + -o-transition: 0.1s ease 0s; + transition: 0.1s ease 0s; +} +/* line 694, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first .toc ul.links li:hover, .blog-details #sidebar-first .toc ul.links li.active { + background-color: white; +} +/* line 698, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first .toc ul.links li a { + display: block; + color: inherit; + padding-top: 0.4em; + padding-bottom: 0.4em; +} +/* line 705, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first .toc ul.links li a:hover { + text-decoration: none; +} +/* line 714, ../../../sass/sass/blog.scss */ +.blog-details #sidebar-first { + background-color: #f3f2f0; +} +/* line 717, ../../../sass/sass/blog.scss */ +.blog-details .page-expand { + height: 0; +} +@media all and (min-width: 1300px) and (min-height: 670px) { + /* line 724, ../../../sass/sass/blog.scss */ + .blog-details #sidebar-first, + .blog-details #sidebar-second, + .blog-details #blog-top-nav { + position: fixed; + } + /* line 727, ../../../sass/sass/blog.scss */ + .blog-details .page-expand { + height: 100%; + } +} +/* line 732, ../../../sass/sass/blog.scss */ +.blog-details #back-to-top-button { + bottom: 50px; + left: 960px; +} +/* line 736, ../../../sass/sass/blog.scss */ +.blog-details .confirm-dialog { + padding-top: 4em; + min-width: 500px; + min-height: 80px; + text-align: center; +} +/* line 741, ../../../sass/sass/blog.scss */ +.blog-details .confirm-dialog .controls { + text-align: right; + position: absolute; + bottom: 2em; + right: 2em; +} +/* line 750, ../../../sass/sass/blog.scss */ +.blog-details.blog-results #sidebar-second .lists-container { + display: none; +} + +/* line 759, ../../../sass/sass/blog.scss */ +.blog-list #content .region-wrap { + margin-top: 1.5em; +} +/* line 762, ../../../sass/sass/blog.scss */ +.blog-list #content #login { + position: absolute; + right: 0; + top: 0; +} +/* line 767, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-top-nav { + position: relative; + margin-top: 2em; + padding-top: 2em; +} +/* line 771, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-top-nav .search-type-nav { + vertical-align: bottom; + /*border-bottom: 1px solid #c9caca;*/ +} +/* line 776, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-top-nav .search-type-nav ul.links li a { + color: inherit; +} +/* line 780, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-top-nav .search-type-nav ul.links li a:hover, +.blog-list #content #blog-list-top-nav .search-type-nav ul.links li a.active { + text-decoration: none; + color: #0063a8; + border-bottom: 1px solid #0063a8; +} +/* line 786, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-top-nav .search-type-nav ul.links li.first-level { + font-size: 1.5em; + padding-right: 50px; +} +/* line 791, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-top-nav .search-type-nav ul.links li.second-level a { + padding-bottom: 2px; +} +/* line 799, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-content .not-found { + text-align: center; + margin-top: 2em; +} +/* line 802, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-content .not-found .message { + font-size: 1.2em; + margin-top: 0.5em; +} +/* line 808, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-content ul.articles { + padding: 0; +} +/* line 810, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-content ul.articles li { + list-style: none; +} +/* line 815, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-content .articles .article { + margin-bottom: 40px; +} +/* line 819, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-content .articles .article .article-title { + font-weight: bold; + font-size: 1.42857em; + line-height: 1.45em; + color: black; + margin-bottom: 0.5em; +} +/* line 131, ../../../sass/sass/_custom.scss */ +.blog-list #content #blog-list-content .articles .article .article-title a { + color: inherit; +} +/* line 827, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-content .articles .article .excerpt { + font-size: 1.14286em; + line-height: 1.6875em; + margin-top: 0.5em; +} +/* line 833, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-content ul.rating-blocks li { + vertical-align: middle; + padding: 0; + display: -moz-inline-block; + display: inline-block; + color: transparent; + overflow: hidden; + width: 12px; + height: 12px; + background-color: #948b7a; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + -ms-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; + margin-right: -1px; +} +/* line 845, ../../../sass/sass/blog.scss */ +.blog-list #content #blog-list-content ul.rating-blocks li.filled { + background-color: #4a453d; +} +/* line 856, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first #header { + z-index: 2; +} +/* line 859, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first .region-wrap { + z-index: 2; + position: relative; + padding-left: 1em; + padding-right: 1em; +} +/* line 867, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first #nav-ribbon { + margin-top: 1em; + z-index: 2; + margin-left: -20px; +} +/* line 872, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first .hover-overlay { + color: white; + z-index: 1; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #91908f; + background-color: rgba(0, 0, 0, 0.5); + visibility: hidden; + opacity: 0; + -webkit-transition: all 0.3s ease; + -webkit-transition-delay: 0s; + -moz-transition: all 0.3s ease 0s; + -o-transition: all 0.3s ease 0s; + transition: all 0.3s ease 0s; +} +/* line 885, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first .hover-overlay .region-wrap { + padding-left: 3.3em; + padding-top: 8em; + padding-right: 3.3em; +} +/* line 891, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first .hover-overlay .region-wrap h3 { + margin-bottom: 0; +} +/* line 894, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first .hover-overlay .region-wrap .user-info h3 { + margin-top: 0; +} +/* line 897, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first .hover-overlay .region-wrap ul { + margin: 0; + padding: 0; +} +/* line 900, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first .hover-overlay .region-wrap ul li { + list-style: none; +} +/* line 905, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first .hover-overlay a { + color: white; +} +/* line 909, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first .post-question { + z-index: 2; + padding-left: 1em; + padding-right: 1em; + overflow: hidden; + width: auto; +} +/* line 917, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first .post-question .question { + width: 60%; + border: 1px solid #c2b59e; + background-color: #918e8c; + background-color: rgba(0, 0, 0, 0.5); +} +/* line 923, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first .post-question .submit { + float: right; + width: 30%; + border: none; +} +/* line 929, ../../../sass/sass/blog.scss */ +.blog-list #sidebar-first:hover .hover-overlay { + visibility: visible; + opacity: 1; +} + +/* line 936, ../../../sass/sass/blog.scss */ +body.blog-index { + color: white; +} +/* line 938, ../../../sass/sass/blog.scss */ +body.blog-index #main { + position: relative; +} +/* line 940, ../../../sass/sass/blog.scss */ +body.blog-index #main .background { + z-index: -1000; + background: url(../../images/back_main.jpg) no-repeat 80%; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; +} +/* line 949, ../../../sass/sass/blog.scss */ +body.blog-index #main #login { + position: absolute; + top: 15px; + right: -250px; +} +/* line 954, ../../../sass/sass/blog.scss */ +body.blog-index #main .post-question { + margin-top: 270px; +} +/* line 956, ../../../sass/sass/blog.scss */ +body.blog-index #main .post-question .question { + background-color: white; + border: 1px solid #d0d1d1; + color: black; + width: 400px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +/* line 65, ../../../sass/sass/_custom.scss */ +body.blog-index #main .post-question .question.placeholder { + color: #d0d1d1; +} +/* line 68, ../../../sass/sass/_custom.scss */ +body.blog-index #main .post-question .question:focus.placeholder { + color: transparent; +} +/* line 65, ../../../sass/sass/_custom.scss */ +body.blog-index #main .post-question .question.input-placeholder { + color: #d0d1d1; +} +/* line 68, ../../../sass/sass/_custom.scss */ +body.blog-index #main .post-question .question:focus.input-placeholder { + color: transparent; +} +/* line 65, ../../../sass/sass/_custom.scss */ +body.blog-index #main .post-question .question:-moz-placeholder { + color: #d0d1d1; +} +/* line 68, ../../../sass/sass/_custom.scss */ +body.blog-index #main .post-question .question:focus:-moz-placeholder { + color: transparent; +} +/* line 65, ../../../sass/sass/_custom.scss */ +body.blog-index #main .post-question .question::-webkit-input-placeholder { + color: #d0d1d1; +} +/* line 68, ../../../sass/sass/_custom.scss */ +body.blog-index #main .post-question .question:focus::-webkit-input-placeholder { + color: transparent; +} +/* line 65, ../../../sass/sass/_custom.scss */ +body.blog-index #main .post-question .question::-moz-placeholder { + color: #d0d1d1; +} +/* line 68, ../../../sass/sass/_custom.scss */ +body.blog-index #main .post-question .question:focus::-moz-placeholder { + color: transparent; +} +/* line 65, ../../../sass/sass/_custom.scss */ +body.blog-index #main .post-question .question:-ms-input-placeholder { + color: #d0d1d1; +} +/* line 68, ../../../sass/sass/_custom.scss */ +body.blog-index #main .post-question .question:focus:-ms-input-placeholder { + color: transparent; +} +/* line 964, ../../../sass/sass/blog.scss */ +body.blog-index #main .post-question .submit { + width: 84px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + border: none; +} +/* line 969, ../../../sass/sass/blog.scss */ +body.blog-index #main .post-question .question, body.blog-index #main .post-question .submit { + font-size: 1.14286em; + line-height: 1.25em; + vertical-align: 2px; +} +/* line 974, ../../../sass/sass/blog.scss */ +body.blog-index #main #logo { + margin-top: 65px; + /*margin-left:120px;*/ + width: 100%; + text-align: center; +} +/* line 979, ../../../sass/sass/blog.scss */ +body.blog-index #main #copyright { + position: fixed; + bottom: 75px; + left: 75px; +} + +.blog-list #content #blog-list-content ul.articles .excerpt ol li{ + list-style: decimal; +} diff --git a/97suifangqa/apps/indicator/static/css/new_delete_index.css b/97suifangqa/apps/indicator/static/css/new_delete_index.css index fde8168..635f327 100644 --- a/97suifangqa/apps/indicator/static/css/new_delete_index.css +++ b/97suifangqa/apps/indicator/static/css/new_delete_index.css @@ -3,9 +3,9 @@ float: left; position: relative; z-index: 999; - width: 865px; + width: 900px; height: 85px; - margin-left: 457px; + margin-left: 320px; } #login_container .logged-in { float: right; @@ -55,8 +55,9 @@ margin-top: 10px; position: absolute; z-index: 999; - width: 168px; - height: 91px; + width: 170px; + height: 28px; + margin-left:-20px; } #login.logged-in .drop-down-menu .text-pointer { background: url("../images/login-menu-popup-pointer.png") no-repeat scroll 0 0 transparent; @@ -98,6 +99,7 @@ #new_delete_container { float: left; margin-left: 457px; + margin-top:-11px; position: relative; /* position: absolute; @@ -110,11 +112,15 @@ } .new_delete_title .content { float: left; - font-weight: bold; + font-weight: normal; font-size: 20px; - color: #4A4A4A; + color: #a8a8a8; height: 26px; line-height: 26px; + margin-bottom: 10px; + cursor: default; + margin-top: -2px; + } .new_delete_title .search { float: right; @@ -125,45 +131,69 @@ } .new_delete_title .search input { float: left; - height: 20px; + height: 30px; line-height: normal; - width: 127px; - border: 1px solid #CACACA; + width: 150px; + border: 1px solid #d9d9d9; background-color: #FFFFFF; - padding: 0; - border-radius: 2px; + padding-bottom:3px; + border-radius: 3px; color: #000000; position: relative; top: 2px; - margin-right: 2px; + margin-left:-50px; + font-weight: normal; + margin-top: -7px; + +} +.new_delete_title .search input:focus { + border-color:#99cc33; + outline:0; } .new_delete_title .search input::-moz-placeholder { - color: #9D9D9D; - font-weight: bold; + color: #72717; + font-weight: normal; +} +.new_delete_title .search input::placeholder { + color: #727171; + font-weight: normal; +} +.new_delete_title .search input::-webkit-placeholder { + color: #727171; + font-weight: normal; } .new_delete_title .search img { float: right; position: relative; top: 2px; cursor: pointer; + margin-top: -7px; + } .index_navigation { - margin: 10px 0; + margin-top: 10px; + margin-bottom: 6px; + width: 705px; } .index_navigation .index_type { float: left; - width: 77px; - height: 22px; + width: 90px; + height: 28px; line-height: 22px; text-align: center; - border: 1px solid #B5B5B5; - border-radius: 2px; - margin-right: 9px; + border: 1px solid #d9d9d9; + border-radius: 3px; + margin-right: 8.6px; + margin-top: 2px; + margin-bottom: 4px; + padding-top: 6px; + font-size: 15px; } .index_navigation .index_type a { color: #7E7E7E; cursor: pointer; text-decoration: none; + margin-bottom:-10px; } /* .index_navigation #index_all { @@ -186,10 +216,11 @@ float: left; width: 302px; height: 437px; - border: 1px solid #b6b6b6; + border: 1px solid #d9d9d9; z-index: 1; position: relative; padding: 6px 12px 0 12px; + border-radius: 3px; } .show_indexes .add_concerned_icon { float: left; @@ -234,16 +265,22 @@ } .index_line { margin-top: 3px; + height: 23px; + border-radius: 3px; + padding-left: 5px; + padding-top:2px; + padding-bottom:2px; } .index_line .index_name, .index_line .index_category { float: left; - font-size: 14px; + font-size: 15px; width: 45px; height: 20px; - line-height: 20px; - color: #4A4A4A; - font-weight: bold; - cursor: pointer; + line-height: 1.6em; + color: #909090; + font-weight: normal; + cursor: default; + } .index_lines .add .icon { width: 20px; @@ -265,7 +302,9 @@ left: 260px; } .index_lines .add, .index_lines .minus { - background: #8FC31F; + background: #8fc21f; + height: 23px; + margin-bottom:3px; } .index_line .index_name { width: 185px; @@ -298,12 +337,21 @@ } .all_condition .index_all_letter div { float: left; - color: #8F8F8F; - font-size: 15px; - margin-right: 7px; + color: #b3b3b2; + font-size: 16px; + margin-right: 8px; + margin-top:3px; cursor: pointer; + font-weight: normal; + /* letter-spacing: 2px; */ + border-color: #b3b3b3 + +} +.all_condition .index_all_letter .disabled { + cursor: default; + color: #D9D9D9; } -.all_condition .index_all_letter .letter_selected{ +.all_condition .index_all_letter .letter_selected { color: #99CC33; } .index_letter_container { @@ -318,7 +366,7 @@ height: 32px; line-height: 32px; font-weight: bold; - font-size: 32px; + font-size: 22px; color: #4A4A4A; border-bottom: 1px solid #BFBFBF; } @@ -343,21 +391,26 @@ margin-bottom: 10px; } .link_container .status_link { - width: 694px; + width: 105px; height: 37px; line-height: 37px; - border: 1px solid #B5B5B5; - border-radius: 2px; + border-radius: 3px; /* background-color: #F7F7F7; */ - background-color: #F3F3F1; + background-color: #99cc33; text-align: center; + float: right; + font-color:white; +} + +.link_container .status_link:hover{ + background-color:#93C430; + cursor: default; } + .link_container .status_link a { - color: #4A4A4A; + color: white; text-decoration: none; - font-weight: bold; - font-size: 19px; - letter-spacing: 1px; + font-size: 16px; cursor: pointer; } diff --git a/97suifangqa/apps/indicator/static/css/normalize.css b/97suifangqa/apps/indicator/static/css/normalize.css index ab1eadb..f9916ec 100644 --- a/97suifangqa/apps/indicator/static/css/normalize.css +++ b/97suifangqa/apps/indicator/static/css/normalize.css @@ -565,6 +565,8 @@ input[type="submit"] { /* 2 */ } + + /* line 574, ../../../sass/sass/normalize.scss */ .button, button, @@ -586,9 +588,11 @@ input[type="reset"] { color: white; padding-left: 0.8em; padding-right: 0.8em; - height: 2.1em; - line-height: 2.1em; + padding-bottom: 0.5em; + height: 3em; + line-height: 1.5em; vertical-align: middle; + font-size: 16px; } /* line 588, ../../../sass/sass/normalize.scss */ .button:hover, @@ -648,8 +652,8 @@ a.button:visited { /* line 619, ../../../sass/sass/normalize.scss */ input[type="text"] { - background-color: #8b8885; - border: 1px solid white; + background-color: white; + -webkit-box-shadow: 0px 0px 2px white; -moz-box-shadow: 0px 0px 2px white; box-shadow: 0px 0px 2px white; @@ -658,12 +662,18 @@ input[type="text"] { padding-top: 0; padding-bottom: 0; line-height: 1.95em; - height: 1.95em; + height: 29px; color: white; + font-size:15px; } +input[type="text"]:focus { + border-color:#99cc33; + outline:0; +} + /* line 65, ../../../sass/sass/_custom.scss */ input[type="text"].placeholder { - color: #eeeeee; + color: #a6a6a6; } /* line 68, ../../../sass/sass/_custom.scss */ input[type="text"]:focus.placeholder { @@ -671,7 +681,7 @@ input[type="text"]:focus.placeholder { } /* line 65, ../../../sass/sass/_custom.scss */ input[type="text"].input-placeholder { - color: #eeeeee; + color: #a6a6a6; } /* line 68, ../../../sass/sass/_custom.scss */ input[type="text"]:focus.input-placeholder { @@ -679,7 +689,7 @@ input[type="text"]:focus.input-placeholder { } /* line 65, ../../../sass/sass/_custom.scss */ input[type="text"]:-moz-placeholder { - color: #eeeeee; + color: #a6a6a6; } /* line 68, ../../../sass/sass/_custom.scss */ input[type="text"]:focus:-moz-placeholder { @@ -687,7 +697,7 @@ input[type="text"]:focus:-moz-placeholder { } /* line 65, ../../../sass/sass/_custom.scss */ input[type="text"]::-webkit-input-placeholder { - color: #eeeeee; + color: #a6a6a6; } /* line 68, ../../../sass/sass/_custom.scss */ input[type="text"]:focus::-webkit-input-placeholder { @@ -695,7 +705,7 @@ input[type="text"]:focus::-webkit-input-placeholder { } /* line 65, ../../../sass/sass/_custom.scss */ input[type="text"]::-moz-placeholder { - color: #eeeeee; + color: #a6a6a6; } /* line 68, ../../../sass/sass/_custom.scss */ input[type="text"]:focus::-moz-placeholder { @@ -703,7 +713,7 @@ input[type="text"]:focus::-moz-placeholder { } /* line 65, ../../../sass/sass/_custom.scss */ input[type="text"]:-ms-input-placeholder { - color: #eeeeee; + color: #a6a6a6; } /* line 68, ../../../sass/sass/_custom.scss */ input[type="text"]:focus:-ms-input-placeholder { diff --git a/97suifangqa/apps/indicator/static/css/sheet_default.css b/97suifangqa/apps/indicator/static/css/sheet_default.css index 82d8fbb..22e5afd 100644 --- a/97suifangqa/apps/indicator/static/css/sheet_default.css +++ b/97suifangqa/apps/indicator/static/css/sheet_default.css @@ -24,9 +24,10 @@ input[type="radio"]:checked + label { #login_container { float: left; position: relative; - width: 865px; + z-index: 999; + width: 900px; height: 85px; - margin-left: 457px; + margin-left: 320px; } #login_container .logged-in { float: right; @@ -67,7 +68,7 @@ input[type="radio"]:checked + label { line-height: 1em; } #login.logged-in .drop-down-menu { - background-color: #FFFFFF; + background-color: #FFFFFF; border: 1px solid #C9C9C9; border-radius: 2px 2px 2px 2px; box-shadow: 0 0 10px rgba(85, 85, 85, 0.5); @@ -76,8 +77,9 @@ input[type="radio"]:checked + label { margin-top: 10px; position: absolute; z-index: 999; - width: 168px; - height: 91px; + width: 170px; + height: 28px; + margin-left:-20px; } #login.logged-in .drop-down-menu .text-pointer { background: url("../images/login-menu-popup-pointer.png") no-repeat scroll 0 0 transparent; @@ -131,10 +133,12 @@ input[type="radio"]:checked + label { width: 696px; } .index_title { - color: #4a4a4a; + color: #a8a8a8; font-size: 20px; - letter-spacing: 2px; - font-weight: bold; + font-weight: normal; + font-size:1.4em; + margin-bottom:10px; + margin-top:-10px; } .index_sub_title { margin-top: 9px; @@ -178,14 +182,17 @@ input[type="radio"]:checked + label { float: left; } .detail_card_info .card_title .collapse_btn { - width: 80px; - height: 23px; + width: 100px; + height: 35px; line-height: 23px; font-size: 14px; vertical-align: baseline; position: relative; bottom: -10px; float: right; + margin-top:-12px; + padding-top:0.3em; + font-size: 15px; } .detail_card_info .search_data_div { margin-top: 9px; @@ -194,10 +201,36 @@ input[type="radio"]:checked + label { } .detail_card_info .search_data_div input[type='button'] { width: 100px; - height: 23px; line-height: 23px; float: left; + text-align: center; + padding-right:20px; + padding-top:5px; + height: 35px; + font-size: 15px; + border-radius: 3px; + border-color: #d9d9d9; + font-color:#7e7e7e; + margin-right:5px; +} + +.detail_card_info .search_data_div input[type='button']:hover{ + cursor: pointer; + -webkit-appearance: none; + background-color: #99cc33; + border: 1px solid #f3f2f0; + -webkit-box-shadow: 0px 0px 2px white; + -moz-box-shadow: 0px 0px 2px white; + box-shadow: 0px 0px 2px white; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + border-radius: 3px; + color: white; + } + .detail_card_info .search_data_div .shift_date { margin-left: 4px; } @@ -216,20 +249,28 @@ input[type="radio"]:checked + label { } .detail_card_info .search_data_div .datepicker_container .datepicker { background: #FFFFFF; - border: 1px solid #9C9C9C; + border: 1px solid #d9d9d9; color: #B9B9B9; - width: 117px; - height: 17px; - line-height: 17px; + width: 110px; + height: 30px; position: relative; padding-top: 2px; padding-bottom: 2px; + padding-left:10px; + border-radius:3px; + margin-left: 5px; } +.detail_card_info .search_data_div .datepicker_container .datepicker:focus{ + border-color: #99cc33; + outline:0; +} + .detail_card_info .search_data_div .datepicker_container .ui-datepicker-trigger { position: absolute; top: 2px; right: 8px; cursor: pointer; + margin-top: 6px; } .detail_card_info .chart { height: 400px; @@ -243,19 +284,23 @@ input[type="radio"]:checked + label { .detail_card_info .table_div table tr td { border: 1px solid #CACACA; text-align: center; + height: 40px; } .detail_card_info .table_div table .first_line { background: #99CC33; - height: 29px; + height: 35px; color: #FFFFFF; + font-size:16px; } .detail_card_info .table_div table .state .normal { - background-color: #B8DB70; + color:inherit; padding: 2px; } .detail_card_info .table_div table .state .abnormal { - background-color: #FFB3B3; - padding: 2px; + border-radius: 3px; + margin:3px 0 3px 0; + height: 35px; + color:#99cc33; } .detail_card_info .table_div table .state .unknown { background-color: #B3D9FF; @@ -269,19 +314,31 @@ input[type="radio"]:checked + label { width: 107px; height: 24px; line-height: 24px; + color:#7d7d7d; + background-color: white; + font-size:15px; + margin:5px 19px 5px 0; + border-color:white; } .detail_card_info .see_more .see_more_btn:disabled { - background-color: #CCCCCC; + color:#7d7d7d; + background-color: white; + font-size:15px; + margin:5px 19px 5px 0; + border-color:white; } .index_card { width: 328px; height: 434px; border: 1px solid #CACACA; margin-top: 9px; - border-radius: 2px; + border-radius: 3px; padding: 5px 5px 0 8px; position: relative; } + + + /* recommended indicator's card */ #index_status_container .recommended { width: 326px; @@ -291,21 +348,24 @@ input[type="radio"]:checked + label { .index_card_fir { float: left; } + .index_card_sec { float: right; } .index_card .card_title { height: 40px; line-height: 40px; - color: #7D7D7D; + /*color: #7D7D7D;*/ font-weight: bold; font-size: 18px; + border-radius:5px; } .index_card .refer_range { color: #4B4B4B; } .index_card .refer_range .refer_text { margin-right: 5px; + margin-bottom:10px; } .index_card .refer_range .refer_value { margin-right: 5px; @@ -316,7 +376,7 @@ input[type="radio"]:checked + label { margin-top: 7px; } .index_card .edit_data .explain_icon { - margin-right: 2px; + margin-right: 5px; float: right; } .index_card .edit_data .small_edit_icon { @@ -382,16 +442,30 @@ input[type="radio"]:checked + label { } .index_card .editing_data .data .data_input { width: 165px; - height: 17px; + height: 26px; + border: 1px solid #d9d9d9; line-height: 17px; padding-top: 2px; padding-bottom: 2px; margin-right: 8px; + margin-top:-6px; + border-radius:3px; + -moz-border-radius: 3px; + -ms-border-radius: 3px; + -o-border-radius: 3px; + font-size:14px; + line-height: 20px; + vertical-align: middle; } +.index_card .editing_data .data .data_input:focus { + border: 1px solid #99cc33; +} + .index_card .editing_data .data_unit { float: left; height: 25px; line-height: 25px; + margin-top:0px; } .index_card .editing_data .date .datepicker_container { width: 148px; @@ -400,24 +474,32 @@ input[type="radio"]:checked + label { margin-top: 5px; } .index_card .editing_data .date .datepicker_container .datepicker { - background: #FFFFFF; - border: 1px solid #9C9C9C; + background: white; + border: 1px solid #d9d9d9; color: #B9B9B9; - width: 131px; - height: 17px; + width: 165px; + height: 26px; line-height: 17px; position: relative; padding-top: 2px; padding-bottom: 2px; + margin-top:0px; + border-radius:3px; } .index_card .editing_data .date .datepicker_container .ui-datepicker-trigger { position: absolute; top: 2px; right: 8px; + margin-top:5px; + margin-right:-30px; cursor: pointer; } + +.index_card .editing_data .date .datepicker_container .datepicker:focus { + border-color:#99cc33; +} .index_card .editing_data .date .datepicker_container .valid { - border: 2px solid green; + color: #000; } .index_card .editing_data .date .datepicker_container .invalid { border: 2px solid red; @@ -426,9 +508,9 @@ input[type="radio"]:checked + label { .index_card .editing_data .cancel_edit_icon { float: right; background:url(../images/cancel_edit.png) no-repeat; - width: 23px; - height: 23px; - margin-right: 3px; + width: 24px; + height: 24px; + margin-right: 5px; cursor: pointer; } .index_card .editing_data .confirm_edit_icon { @@ -436,6 +518,7 @@ input[type="radio"]:checked + label { background:url(../images/confirm_edit.png) no-repeat; width: 23px; height: 23px; + margin-right:10px; cursor: pointer; } @@ -451,7 +534,7 @@ input[type="radio"]:checked + label { height: 85px; width: 85px; float: left; - margin: 45px 0 0 135px; + margin: 45px 0 0 120px; cursor: pointer; } .index_card .edit_icon_container .curve_icon { @@ -459,14 +542,17 @@ input[type="radio"]:checked + label { height: 125px; width: 105px; float: left; + margin-left: 15px; } .index_card .edit_icon_container .edit_text { - color: #4B4B4B; + color: #8E8E8E; text-align: center; height: 20px; line-height: 20px; - margin-top: 11px; + margin-top: 20px; margin-bottom: 100px; + margin-right: 5px; + font-size:15px } .index_card .chart { @@ -488,6 +574,11 @@ input[type="radio"]:checked + label { cursor: pointer; text-decoration: none; } + +.index_card .card_bottom .understand_index a:hover, .index_card .card_bottom .simulation_sheet a:hover, .index_card .card_bottom .detail_history a:hover { + color: #99cc33; +} + .index_card .card_bottom .understand_index { width: 120px; } @@ -503,6 +594,8 @@ input[type="radio"]:checked + label { right: 0; margin: 5px 5px 0 0; cursor: pointer; + margin-top:10px; + margin-right:10px; } .index_card .card_delete_hover { background: url('../images/closed_hover.png') no-repeat; @@ -511,7 +604,7 @@ input[type="radio"]:checked + label { position: absolute; top: -3px; right: -2px; - margin: 5px 5px 0 0; + margin: 10px 10px 0 0; cursor: pointer; } .act_card_container { @@ -535,6 +628,8 @@ input[type="radio"]:checked + label { letter-spacing: 1px; cursor: pointer; } + + .move_div_2_left { float: left; } diff --git a/97suifangqa/apps/indicator/static/css/sidebar.css b/97suifangqa/apps/indicator/static/css/sidebar.css index 8df3a1a..c5d3be9 100644 --- a/97suifangqa/apps/indicator/static/css/sidebar.css +++ b/97suifangqa/apps/indicator/static/css/sidebar.css @@ -5,7 +5,7 @@ padding: 1.5em 0; position: absolute; z-index: 10; - width: 420px; + /*width: 420px;*/ height: 1020px; background-color: #F3F3F1; } @@ -79,8 +79,8 @@ /* 对比容器样式 */ #compare_container { - margin-top: 26px; - padding-left: 18px; + margin-top: -7px; + padding-left: 27px; width: 383px; } #compare_container .post-question .searchdiv .question { @@ -91,13 +91,14 @@ } #compare_container .post-question .searchdiv .submit { width: 72px; - height: 31px; + height: 35px; border: 1px solid #cce79a; vertical-align: baseline; float: right; + } #compare_container .similar_container { - margin-top: 14px; + margin-top: 0px; margin-left:15px; } .vertical_bar_component { @@ -156,6 +157,16 @@ position: absolute; z-index: 100; } + +#sidebar_container .submit{ + margin-left: 40px; + margin-top: -5px; + width: 330px; + height: 45px; + line-height: 1em; + padding-top:0.5em; +} + #compare_container .similar_container .similar_content { margin-left: 15px; float: left; @@ -168,7 +179,6 @@ } #compare_container .similar_container .similar_content .specifix_content { background: url("../images/dialog-default.png") no-repeat; - height: 47px; width: 343px; margin-left: -10px; margin-bottom: 35px; @@ -184,24 +194,22 @@ padding-left: 25px; font-size: 15px; } -#compare_container .compare_btn { +/*compare_container .compare_btn { border: 1px solid #7da625; width: 380px; height: 38px; border-radius: 3px; margin-top: 8px; cursor: pointer; -} -#compare_container .compare_btn .compare_btn_in{ - border: 1px solid #b8db71; - border-bottom: none; - background: #8bb830; +}*/ +#compare_btn_in{ + background: #99cc33; background: -webkit-gradient(linear, left top, left bottom, from(#99cc33), to(#8bb830)); background: -webkit-linear-gradient(top, #99cc33, #8bb830); background: -moz-linear-gradient(top, #99cc33, #8bb830); background: -ms-linear-gradient(top, #99cc33, #8bb830); background: -o-linear-gradient(top, #99cc33, #8bb830); - width: 378px; + width: 300px; height: 36px; line-height: 36px; color: #FFF; @@ -216,8 +224,9 @@ background: #8AB82E; box-shadow: 0 0 10px rgba(85 85 85 0.5) inset; } -#compare_container .logo_container { - margin-top: 30px; - text-align: center; +#sidebar_container .logo_container { + margin-top: 20px; + margin-left:115px; + } diff --git a/97suifangqa/apps/indicator/static/images/addicon.png b/97suifangqa/apps/indicator/static/images/addicon.png index 6ebf5eb..96a2c65 100644 Binary files a/97suifangqa/apps/indicator/static/images/addicon.png and b/97suifangqa/apps/indicator/static/images/addicon.png differ diff --git a/97suifangqa/apps/indicator/static/images/cancel_edit.png b/97suifangqa/apps/indicator/static/images/cancel_edit.png index 1cd9303..9b2530e 100644 Binary files a/97suifangqa/apps/indicator/static/images/cancel_edit.png and b/97suifangqa/apps/indicator/static/images/cancel_edit.png differ diff --git a/97suifangqa/apps/indicator/static/images/confirm_edit.png b/97suifangqa/apps/indicator/static/images/confirm_edit.png index 31f2658..2702737 100644 Binary files a/97suifangqa/apps/indicator/static/images/confirm_edit.png and b/97suifangqa/apps/indicator/static/images/confirm_edit.png differ diff --git a/97suifangqa/apps/indicator/static/images/last_edit_data.png b/97suifangqa/apps/indicator/static/images/last_edit_data.png index 7d13181..1e615fe 100644 Binary files a/97suifangqa/apps/indicator/static/images/last_edit_data.png and b/97suifangqa/apps/indicator/static/images/last_edit_data.png differ diff --git a/97suifangqa/apps/indicator/static/images/minusicon.png b/97suifangqa/apps/indicator/static/images/minusicon.png index 997a034..42851ff 100644 Binary files a/97suifangqa/apps/indicator/static/images/minusicon.png and b/97suifangqa/apps/indicator/static/images/minusicon.png differ diff --git a/97suifangqa/apps/indicator/static/images/pen.png b/97suifangqa/apps/indicator/static/images/pen.png index 18aafdf..09b855b 100644 Binary files a/97suifangqa/apps/indicator/static/images/pen.png and b/97suifangqa/apps/indicator/static/images/pen.png differ diff --git a/97suifangqa/apps/indicator/static/images/pen_large.png b/97suifangqa/apps/indicator/static/images/pen_large.png index ec75b6b..779684c 100644 Binary files a/97suifangqa/apps/indicator/static/images/pen_large.png and b/97suifangqa/apps/indicator/static/images/pen_large.png differ diff --git a/97suifangqa/apps/indicator/static/images/search.png b/97suifangqa/apps/indicator/static/images/search.png index 303f228..29ea9b9 100644 Binary files a/97suifangqa/apps/indicator/static/images/search.png and b/97suifangqa/apps/indicator/static/images/search.png differ diff --git a/97suifangqa/apps/indicator/static/images/sheet/AFP.jpg b/97suifangqa/apps/indicator/static/images/sheet/AFP.jpg new file mode 100644 index 0000000..527f207 Binary files /dev/null and b/97suifangqa/apps/indicator/static/images/sheet/AFP.jpg differ diff --git a/97suifangqa/apps/indicator/static/images/sheet/PCR.jpg b/97suifangqa/apps/indicator/static/images/sheet/PCR.jpg new file mode 100644 index 0000000..6e76089 Binary files /dev/null and b/97suifangqa/apps/indicator/static/images/sheet/PCR.jpg differ diff --git a/97suifangqa/apps/indicator/static/images/sheet/PT.jpg b/97suifangqa/apps/indicator/static/images/sheet/PT.jpg new file mode 100644 index 0000000..6085e53 Binary files /dev/null and b/97suifangqa/apps/indicator/static/images/sheet/PT.jpg differ diff --git a/97suifangqa/apps/indicator/static/images/sheet/gene.jpg b/97suifangqa/apps/indicator/static/images/sheet/gene.jpg new file mode 100644 index 0000000..224c592 Binary files /dev/null and b/97suifangqa/apps/indicator/static/images/sheet/gene.jpg differ diff --git "a/97suifangqa/apps/indicator/static/images/sheet/\344\270\244\345\257\271\345\215\212.jpg" "b/97suifangqa/apps/indicator/static/images/sheet/\344\270\244\345\257\271\345\215\212.jpg" new file mode 100644 index 0000000..1f2c2bc Binary files /dev/null and "b/97suifangqa/apps/indicator/static/images/sheet/\344\270\244\345\257\271\345\215\212.jpg" differ diff --git "a/97suifangqa/apps/indicator/static/images/sheet/\350\202\235\345\212\237\350\203\275.jpg" "b/97suifangqa/apps/indicator/static/images/sheet/\350\202\235\345\212\237\350\203\275.jpg" new file mode 100644 index 0000000..fa1144c Binary files /dev/null and "b/97suifangqa/apps/indicator/static/images/sheet/\350\202\235\345\212\237\350\203\275.jpg" differ diff --git "a/97suifangqa/apps/indicator/static/images/sheet/\350\202\235\347\251\277\345\210\272\350\241\250\346\240\274\345\275\242\345\274\217\344\272\2141.jpg" "b/97suifangqa/apps/indicator/static/images/sheet/\350\202\235\347\251\277\345\210\272\350\241\250\346\240\274\345\275\242\345\274\217\344\272\2141.jpg" new file mode 100644 index 0000000..3680408 Binary files /dev/null and "b/97suifangqa/apps/indicator/static/images/sheet/\350\202\235\347\251\277\345\210\272\350\241\250\346\240\274\345\275\242\345\274\217\344\272\2141.jpg" differ diff --git "a/97suifangqa/apps/indicator/static/images/sheet/\350\202\235\350\204\217\347\241\254\345\272\246.jpg" "b/97suifangqa/apps/indicator/static/images/sheet/\350\202\235\350\204\217\347\241\254\345\272\246.jpg" new file mode 100644 index 0000000..3b1c8ee Binary files /dev/null and "b/97suifangqa/apps/indicator/static/images/sheet/\350\202\235\350\204\217\347\241\254\345\272\246.jpg" differ diff --git "a/97suifangqa/apps/indicator/static/images/sheet/\350\241\200\347\273\206\350\203\236.jpg" "b/97suifangqa/apps/indicator/static/images/sheet/\350\241\200\347\273\206\350\203\236.jpg" new file mode 100644 index 0000000..a87265b Binary files /dev/null and "b/97suifangqa/apps/indicator/static/images/sheet/\350\241\200\347\273\206\350\203\236.jpg" differ diff --git "a/97suifangqa/apps/indicator/static/images/sheet/\350\241\250\346\240\2741.jpg" "b/97suifangqa/apps/indicator/static/images/sheet/\350\241\250\346\240\2741.jpg" new file mode 100644 index 0000000..de00072 Binary files /dev/null and "b/97suifangqa/apps/indicator/static/images/sheet/\350\241\250\346\240\2741.jpg" differ diff --git "a/97suifangqa/apps/indicator/static/images/sheet/\350\241\250\346\240\2745.jpg" "b/97suifangqa/apps/indicator/static/images/sheet/\350\241\250\346\240\2745.jpg" new file mode 100644 index 0000000..deaadc2 Binary files /dev/null and "b/97suifangqa/apps/indicator/static/images/sheet/\350\241\250\346\240\2745.jpg" differ diff --git a/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js b/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js index d4ccdf5..898e904 100644 --- a/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js +++ b/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js @@ -21,8 +21,21 @@ $(document).ready(function(){ maxDate: 0 // 0->today, 1->tomorrow }); + // delete record {{{ // delete button $("#delete_btn").bind("click", function(){ + var this_edit_data_div = $(this).closest(".edit_data"); + var this_delete_prompt_div = this_edit_data_div.siblings(".delete_prompt"); + this_delete_prompt_div.show(); + return false; + }); + // cancel delete button + $("#cancel_delete_btn").bind("click", function(){ + $(this).closest(".delete_prompt").hide(); + return false; + }); + // confirm delete button + $("#confirm_delete_btn").bind("click", function(){ // delete record (ajax) var time = moment().valueOf(); $.ajax({ @@ -51,13 +64,16 @@ $(document).ready(function(){ }); return false; }); + // }}} // edit button $("#edit_btn").bind("click", function(){ var this_edit_data_div = $(this).closest(".edit_data"); var this_editing_data_div = this_edit_data_div.siblings(".editing_data"); - this_editing_data_div.show(); + var this_delete_prompt_div = this_edit_data_div.siblings(".delete_prompt"); + this_delete_prompt_div.hide(); this_edit_data_div.hide(); + this_editing_data_div.show(); return false; }); diff --git a/97suifangqa/apps/indicator/static/javascripts/new_delete_index.js b/97suifangqa/apps/indicator/static/javascripts/new_delete_index.js index e216f09..635e9c7 100644 --- a/97suifangqa/apps/indicator/static/javascripts/new_delete_index.js +++ b/97suifangqa/apps/indicator/static/javascripts/new_delete_index.js @@ -22,6 +22,16 @@ $(document).ready(function(){ } ); + // 'all_condition' letter selectors {{{ + // disable all letter selectors + $(".index_all_letter .letter").addClass("disabled"); + $(".index_letter_container .letter_section").each(function() { + var l = $(this).attr('id').replace('sec_', ''); + //console.log(l); + $(".index_all_letter #"+l).removeClass("disabled"); + }); + // }}} + // login control kit {{{ $(".drop-down-area").bind("click", function(){ var drop_down_menu = $(".drop-down-menu"); @@ -144,8 +154,9 @@ $(document).ready(function(){ $(".letter_selected").removeClass("letter_selected"); $(this).addClass("letter_selected"); var container = $(".index_letter_container"); - var letterClass = $(this).text(); - var scrollTo = $("."+letterClass); + var letterClass = $(this).attr('id'); + //console.log(letterClass); + var scrollTo = $("#sec_"+letterClass); container.scrollTop(scrollTo.offset().top - container.offset().top + container.scrollTop()); select_letter = letterClass; return false; diff --git a/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html b/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html index 24d8078..9651a93 100644 --- a/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html +++ b/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html @@ -3,7 +3,7 @@ {% load dict_get %} {% block title %} -指标状态 | 随访工具 | 97 随访 +指标状态 | 随访工具 | 医时代 {% endblock %} {% block css %} @@ -39,17 +39,17 @@
- - 6 + - username + isuifangqa @@ -66,7 +66,7 @@
添加或删除关注指标
@@ -77,7 +77,7 @@ - + {% for cat in categories %}
{{ cat.name }} @@ -93,32 +93,32 @@
所有指标
-
A
-
B
-
C
-
D
-
E
-
F
-
G
-
H
-
I
-
J
-
K
-
L
-
M
-
N
-
O
-
P
-
Q
-
R
-
S
-
T
-
U
-
V
-
W
-
X
-
Y
-
Z
+
A
+
B
+
C
+
D
+
E
+
F
+
G
+
H
+
I
+
J
+
K
+
L
+
M
+
N
+
O
+
P
+
Q
+
R
+
S
+
T
+
U
+
V
+
W
+
X
+
Y
+
Z
{# display all indicators if in 'all' condition #} @@ -127,21 +127,21 @@
{# display all indicators by letter index #} {% for l in letters %} - {% with l_inds=indicators|dict_get:l %} - {% if l_inds|length >= 1 %} -
-
{{ l|upper }}
- {% for ind in l_inds %} -
-
{{ ind|dict_get:"name" }}
-
-
-
-
- {% endfor %} -
- {% endif %} - {% endwith %} + {% with l_inds=indicators|dict_get:l %} + {% if l_inds|length >= 1 %} +
+
{{ l|upper }}
+ {% for ind in l_inds %} +
+
{{ ind|dict_get:"name" }}
+
+
+
+
+ {% endfor %} +
+ {% endif %} + {% endwith %} {% endfor %} {# end: display all indicators #}
{% endif %} {# end: page_condition == all #} @@ -154,7 +154,7 @@
{{ selected_category.name }}
@@ -250,7 +250,7 @@ {% endblock page %} diff --git a/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html b/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html index 5a6659f..362083b 100644 --- a/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html +++ b/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html @@ -4,7 +4,7 @@ {% load divisible_by %} {% block title %} -指标状态 | 随访工具 | 97 随访 +指标状态 | 随访工具 | 医时代 {% endblock %} {% block css %} @@ -274,6 +274,9 @@ {% elif ind|dict_get:"dataType" == DATA_TYPES|dict_get:"PM_TYPE" %} {# PM_TYPE #} {# TODO #} + {% elif ind|dict_get:"dataType" == DATA_TYPES|dict_get:"KIND_TYPE" %} + {# KIND_TYPE #} + {# TODO #} {% else %} {# unknown TYPE #} {% endif %} {# end: DATA_TYPES #} @@ -289,17 +292,17 @@
- user_photo - 6 + - username - + isuifangqa + @@ -308,7 +311,7 @@
-
指标状态
+
随访医学指标
{% comment %} @@ -397,14 +400,18 @@
+ {% elif ind|dict_get:"dataType" == DATA_TYPES|dict_get:"KIND_TYPE" %} + {# KIND_TYPE #} + TODO {% else %} {# UNKNOWN TYPE #} ERROR: unknown data type {% endif %}
-
{% if ind|dict_get:"std_unit_symbol" %}({{ ind|dict_get:"std_unit_symbol" }}){% endif %}
-
+
{% if ind|dict_get:"std_unit_symbol" %}{{ ind|dict_get:"std_unit_symbol" }}{% endif %}
+
+
@@ -435,7 +442,7 @@
- + @@ -450,7 +457,7 @@ width参数为弹出层页面宽度+2, card_id参数为 "卡片id" {% endcomment %} - +
{% endfor %} {# end: indicators #} diff --git a/97suifangqa/apps/indicator/templates/indicator/SideBar.html b/97suifangqa/apps/indicator/templates/indicator/SideBar.html index 95ad4e9..a545c94 100644 --- a/97suifangqa/apps/indicator/templates/indicator/SideBar.html +++ b/97suifangqa/apps/indicator/templates/indicator/SideBar.html @@ -2,12 +2,13 @@ {% load static from staticfiles %} {% block title %} -边栏 | 随访工具 | 97 随访 +边栏 | 随访工具 | 医时代 {% endblock %} {% block css %} + {% endblock %} {% block scripts %} @@ -16,13 +17,32 @@ {% block page %}