From f552b41f4b337e6844f71c29ff177915abbfa417 Mon Sep 17 00:00:00 2001 From: Alvin Li Date: Fri, 4 Oct 2013 23:56:35 +0800 Subject: * indicator/static/javascripts/card_chart.js: improved the display position of 'detail_card_info' * indicator/templates/indicator/SheetDefault.html: destroy 'qtip' when close card * added new app 'apps/sfaccount' * implemented 'signup' and 'activate' functions * implemented async sending activation mail (using 'django-celery' and 'redis') * moved 'registration/*' templates to 'sfaccount/templates' * implemented 'password_change' function: o password_change o password_change_done * implemented 'password_reset' function o password_reset o password_reset_done o password_reset_confirm o password_reset_complete o re-write 'sfaccount.fomrs.SFPasswordResetForm' o re-write 'sfaccount.views.password_reset_view' * improved 'sfaccount.functional' send mail functions o to send 'multipart' mail * added 'README.txt' * added app 'apps/recommend': for comparing with the SCI papers and then recommending most related papers for user. --- .../apps/indicator/fixtures/initial_data.json | 862 --------------------- .../apps/indicator/fixtures_bak/initial_data.json | 862 +++++++++++++++++++++ .../indicator/static/javascripts/card_chart.js | 20 +- .../static/javascripts/delete_card_tip.js | 60 +- .../templates/indicator/SheetDefault.html | 18 +- 5 files changed, 921 insertions(+), 901 deletions(-) delete mode 100644 97suifangqa/apps/indicator/fixtures/initial_data.json create mode 100644 97suifangqa/apps/indicator/fixtures_bak/initial_data.json (limited to '97suifangqa/apps/indicator') diff --git a/97suifangqa/apps/indicator/fixtures/initial_data.json b/97suifangqa/apps/indicator/fixtures/initial_data.json deleted file mode 100644 index d26f8b9..0000000 --- a/97suifangqa/apps/indicator/fixtures/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/fixtures_bak/initial_data.json b/97suifangqa/apps/indicator/fixtures_bak/initial_data.json new file mode 100644 index 0000000..d26f8b9 --- /dev/null +++ b/97suifangqa/apps/indicator/fixtures_bak/initial_data.json @@ -0,0 +1,862 @@ +[ + { + "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/static/javascripts/card_chart.js b/97suifangqa/apps/indicator/static/javascripts/card_chart.js index 92a91c0..ef2eb24 100644 --- a/97suifangqa/apps/indicator/static/javascripts/card_chart.js +++ b/97suifangqa/apps/indicator/static/javascripts/card_chart.js @@ -92,6 +92,22 @@ $(document).ready(function(){ // update 'detail_card_id' detail_card_id = $(this).closest(".index_card").attr("id").replace('index_card_', ''); var card = $("#index_card_"+detail_card_id); + // determine the position to show the 'detail_card' + var pos_to_insertafter = null; + if (card.hasClass("index_card_sec")) { + // this card in on the right + pos_to_insertafter = card; + } + else if (card.nextAll(".index_card_sec").length) { + // this card is on the left + pos_to_insertafter = card.nextAll(".index_card_sec").first(); + } + else { + // this card is the last card + pos_to_insertafter = card.nextAll(".act_card_container"); + } + // move 'detail_card_info' div + $(".detail_card_info").insertAfter(pos_to_insertafter); // check if this card has data (class "record_empty") if (card.hasClass("record_empty")) { $(".detail_card_info").hide(); @@ -142,7 +158,7 @@ $(document).ready(function(){ getdata_type, getdata_num, begin_date_str, end_date_str ); - $(".act_card_container").addClass("move_div_2_left"); + //$(".act_card_container").addClass("move_div_2_left"); return false; }); @@ -215,7 +231,7 @@ $(document).ready(function(){ //初始化详细卡片id detail_card_id = "-1"; //添加删除div位置初始化 - $(".act_card_container").removeClass("move_div_2_left"); + //$(".act_card_container").removeClass("move_div_2_left"); return false; }); }); diff --git a/97suifangqa/apps/indicator/static/javascripts/delete_card_tip.js b/97suifangqa/apps/indicator/static/javascripts/delete_card_tip.js index 9365d46..da5c896 100644 --- a/97suifangqa/apps/indicator/static/javascripts/delete_card_tip.js +++ b/97suifangqa/apps/indicator/static/javascripts/delete_card_tip.js @@ -1,32 +1,36 @@ // global js var: card_2_delete_id (type: string) $(document).ready(function(){ -// console.log(parent.card_2_delete_id); //要取消关注的 卡片id 的获取方法 - //点大叉、继续关注按钮,关闭弹层页面 - $(".delete_card_tip_close, .action_confirm_ignore").bind("click", function(){ - parent.TB_remove(); - return false; - }); - - //取消关注,关闭弹层页面 - $(".action_confirm_cancel").bind("click", function(){ - // ajax process to unfollow the indicator - // indicator_id -> parseInt(parent.card_2_delete_id) - // 底层数据层取消关注(ajax) - var date = new Date(); - var time = date.getTime(); - $.ajax({ - type: 'get', - url: parent.indicator_url + 'ajax/unfollow_indicator', - data: 'indicator_id='+parent.card_2_delete_id+'&time='+time, - success: function(data) { - if (data == 'success') { - parent.delete_card(); - parent.TB_remove(); - } - }, - }); - - return false; - }); + // console.log(parent.card_2_delete_id); //要取消关注的 卡片id 的获取方法 + //点大叉、继续关注按钮,关闭弹层页面 + $(".delete_card_tip_close, .action_confirm_ignore").bind("click", function(){ + parent.TB_remove(); + return false; + }); + + //取消关注,关闭弹层页面 + $(".action_confirm_cancel").bind("click", function(){ + // ajax process to unfollow the indicator + // indicator_id -> parseInt(parent.card_2_delete_id) + // 底层数据层取消关注(ajax) + var date = new Date(); + var time = date.getTime(); + $.ajax({ + type: 'get', + url: parent.indicator_url + 'ajax/unfollow_indicator', + data: 'indicator_id='+parent.card_2_delete_id+'&time='+time, + success: function(data) { + if (data == 'success') { + // destroy the 'qtip' if exist + //$('#index_card_'+parent.card_2_delete_id, window.parent.document).qtip('destroy', true); + // remove card + parent.delete_card(); + parent.TB_remove(); + } + }, + }); + + return false; + }); }); +// vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=javascript: // diff --git a/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html b/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html index 07cf2f0..5a6659f 100644 --- a/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html +++ b/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html @@ -284,12 +284,12 @@ {% block page %} {% csrf_token %} - +
- + user_photo 6 username @@ -344,14 +344,14 @@ {{ ind|dict_get:"last_record"|dict_get:"value_html"|safe }} {% if ind|dict_get:"std_unit_symbol" %}({{ ind|dict_get:"std_unit_symbol" }}){% endif %}
- + edit_icon {% if ind|dict_get:"record_empty" %} - - + nodata_icon + {% else %} - - + + lastdata_icon {% endif %}
@@ -433,7 +433,7 @@ {% endif %}
- +
@@ -450,7 +450,7 @@ width参数为弹出层页面宽度+2, card_id参数为 "卡片id" {% endcomment %} - +
{% endfor %} {# end: indicators #} -- cgit v1.2.2