diff options
author | Alvin Li <liweitianux@gmail.com> | 2013-09-20 23:52:59 +0800 |
---|---|---|
committer | Alvin Li <liweitianux@gmail.com> | 2013-09-20 23:52:59 +0800 |
commit | c9da4168874296cf4f5ba71b9a432ceae3c26130 (patch) | |
tree | 0c986d630c9634b8dbbbbe694546b42c7bb74210 | |
parent | 62efe8809e2cdfc84666dbd5e987a4ce473a047a (diff) | |
download | 97dev-c9da4168874296cf4f5ba71b9a432ceae3c26130.tar.bz2 |
*** merged changes of front pages ***
* merged changes from '97suifang-front' by mjymjydark;
and modified to work with django
* finished 'editing_data' div of 'SheetDefault' for add new record
* added 'indicator.views.ajax_add_record()'
*** search ***
* improved 'search' function of 'NewDeleteIndex' page;
employ AJAX to load search results;
* added 'indicator.views.search_indicators()'
*** recommend indicator ***
* improved the functions of 'recommend_indicator'
* added 'sciblog.models.UserCollection' to record the collection
information for each user
* improved 'sciblog.views.add_user_to_m2m()' to work with
'UserCollection'
* added field 'lastRecommendTime' in 'indicator.models.UserIndicator'
* updated 'indicator.views.indicator_status' against 'recommend_indicator'
*** qtip2 for recommended indicator ***
* added 'qtip2' tooltip for recommended indicator card
* added '97suifang' qtip css (qtip-sf)
* added tooltip for 'add record' when return error (SheetDefault page);
* improved the style of 'collection_btn' and 'go_library_btn' of
IndexDesc page;
46 files changed, 7846 insertions, 5974 deletions
diff --git a/97suifangqa/apps/indicator/fixtures/initial_data.json b/97suifangqa/apps/indicator/fixtures/initial_data.json index 4cf0369..d26f8b9 100644 --- a/97suifangqa/apps/indicator/fixtures/initial_data.json +++ b/97suifangqa/apps/indicator/fixtures/initial_data.json @@ -165,6 +165,24 @@ } }, { + "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": { @@ -297,9 +315,9 @@ "model": "indicator.indicatorrecord", "fields": { "indicator": 1, - "notes": "\u8c37\u4e19\u8f6c\u6c28\u9176\r\n\r\n\u7b2c1\u6761\u8bb0\u5f55\r\n", + "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-22T06:34:48.950Z", + "updated_at": "2013-08-26T12:13:14.102Z", "value": "50", "val_min": null, "user": 1, @@ -315,7 +333,7 @@ "indicator": 1, "notes": "\u8bb0\u5f552", "created_at": "2013-08-09T10:53:15.927Z", - "updated_at": "2013-08-18T13:35:03.065Z", + "updated_at": "2013-08-26T12:12:42.041Z", "value": "100", "val_min": null, "user": 1, @@ -331,8 +349,8 @@ "indicator": 1, "notes": "\u8bb0\u5f553", "created_at": "2013-08-18T13:33:20.569Z", - "updated_at": "2013-08-22T06:35:54.229Z", - "value": "150", + "updated_at": "2013-09-12T07:11:09.763Z", + "value": "78.3", "val_min": null, "user": 1, "date": "2013-08-15", @@ -395,12 +413,12 @@ "indicator": 2, "notes": "", "created_at": "2013-08-18T13:37:41.124Z", - "updated_at": "2013-08-18T13:37:41.125Z", + "updated_at": "2013-08-26T16:04:54.703Z", "value": "", "val_min": 15000.0, "user": 1, "date": "2013-08-10", - "val_max": 25000.0, + "val_max": 20000.0, "unit": 3 } }, @@ -421,33 +439,65 @@ } }, { + "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-08-16T16:07:00.547Z", + "updated_at": "2013-09-09T01:56:20.103Z", "value": "+", "val_min": null, "user": 1, - "date": "2013-08-17", + "date": "2013-08-16", "val_max": null, "unit": null } }, { - "pk": 8, + "pk": 20, "model": "indicator.indicatorrecord", "fields": { "indicator": 4, - "notes": "\u7b2c\u4e00\u4e2a\u8bb0\u5f55", - "created_at": "2013-08-22T00:20:21.925Z", - "updated_at": "2013-08-22T00:20:21.925Z", - "value": "1500", + "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-08-19", + "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 } @@ -483,6 +533,156 @@ } }, { + "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": { diff --git a/97suifangqa/apps/indicator/models.py b/97suifangqa/apps/indicator/models.py index b992a1f..78860ce 100644 --- a/97suifangqa/apps/indicator/models.py +++ b/97suifangqa/apps/indicator/models.py @@ -195,8 +195,7 @@ class Indicator(models.Model): # {{{ return True except InnateConfine.DoesNotExist: print u'Indicator id=%s 未指定 InnateConfine' % self.id - raise ValueError(u'Indicator id=%s 未指定 InnateConfine' - % self.id) + #raise ValueError(u'Indicator id=%s 未指定 InnateConfine' % self.id) return False def get_confine(self): @@ -253,8 +252,12 @@ class UserIndicator(models.Model): # {{{ verbose_name=u"历史关注指标", related_name="followed_histories", null=True, blank=True) - # TODO # last_recommend_time + lastRecommendTime = models.DateTimeField(u"上次推荐指标时间", + null=True, blank=True) + # TODO: deletedIndicators + # record the recommended indicators, but unfollowed by user + # thus not recommended in the following recommendations class Meta: verbose_name_plural = u"用户指标信息" @@ -314,7 +317,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) + #raise ValueError(u'date="%s" 该日期已经存在记录' % self.date) + print u'date="%s" 该日期已经存在记录' % self.date return False # check dataType if self.indicator.dataType == self.indicator.INTEGER_TYPE: @@ -323,35 +327,42 @@ class IndicatorRecord(models.Model): # {{{ value = int(self.value) return True except ValueError: - raise ValueError(u'您提交的指标数据类型不正确') + #raise ValueError(u'您提交的指标数据类型不正确') + print u'您提交的指标数据类型不正确' return False elif self.indicator.dataType == self.indicator.FLOAT_TYPE: # 浮点型 if not self.unit: - raise ValueError(u'未填写单位') + #raise ValueError(u'未填写单位') + print u'未填写单位' return False try: value = float(self.value) return True except ValueError: - raise ValueError(u'value 数据类型不正确') + #raise ValueError(u'value 数据类型不正确') + print u'value 数据类型不正确' return False elif self.indicator.dataType == self.indicator.RANGE_TYPE: # 范围型 if not self.unit: - raise ValueError(u'未填写单位') + #raise ValueError(u'未填写单位') + print u'未填写单位' return False if (self.val_max is None) or (self.val_min is None): - raise ValueError(u'val_max 或 val_min 未填写') + #raise ValueError(u'val_max 或 val_min 未填写') + print u'val_max 或 val_min 未填写' return False if (self.val_max <= self.val_min): - raise ValueError(u'val_max <= val_min') + #raise ValueError(u'val_max <= val_min') + print u'Error: val_max <= val_min' return False return True elif self.indicator.dataType == self.indicator.FLOAT_RANGE_TYPE: # 定值/范围型 (浮点定值优先) if not self.unit: - raise ValueError(u'未填写单位') + #raise ValueError(u'未填写单位') + print u'未填写单位' return False if self.value: # 定值 @@ -359,32 +370,38 @@ class IndicatorRecord(models.Model): # {{{ value = float(self.value) return True except ValueError: - raise ValueError(u'value 数据类型不正确') + #raise ValueError(u'value 数据类型不正确') + print u'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'val_max <= val_min') + print u'Error: val_max <= val_min' return False else: return True else: - raise ValueError(u'您提交的指标数据不符合要求') + #raise ValueError(u'您提交的指标数据不符合要求') + print u'您提交的指标数据不符合要求' 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'value 只接受 "+" 或 "-"') + print u'Error: value 只接受 "+" 或 "-"' return False ## TODO: RADIO_TYPE, CHECKBOX_TYPE elif self.indicator.dataType in [self.indicator.RADIO_TYPE, self.indicator.CHECKBOX_TYPE]: - raise ValueError(u'RADIO_TYPE, CHECKBOX_TYPE 验证未实现') + #raise ValueError(u'RADIO_TYPE, CHECKBOX_TYPE 验证未实现') + print u'Error: RADIO_TYPE, CHECKBOX_TYPE 验证未实现' return False else: - raise ValueError(u'指标数据类型不合法') + #raise ValueError(u'指标数据类型不合法') + print u'指标数据类型不合法' return False # }}} @@ -422,8 +439,9 @@ class IndicatorRecord(models.Model): # {{{ try: value_std = float(rel_sym.evalf(subs={v: value})) except ValueError: + #raise ValueError(errmsg) print errmsg - raise ValueError(errmsg) + return False if (value_std < sic.math_min) or ( value_std > sic.math_max): print u'ERROR: value(std) < math_min or value(std) > math_max' @@ -435,8 +453,9 @@ class IndicatorRecord(models.Model): # {{{ val_max_std = float(rel_sym.evalf( subs={v: self.val_max})) except ValueError: + #raise ValueError(errmsg) print errmsg - raise ValueError(errmsg) + return False if (val_max_std <= sic.math_min) or ( val_max_std > sic.math_max): print u'ERROR: val_max(std) <= math_min or val_max(std) > math_max' @@ -447,8 +466,9 @@ class IndicatorRecord(models.Model): # {{{ val_min_std = float(rel_sym.evalf( subs={v: self.val_min})) except ValueError: + #raise ValueError(errmsg) print errmsg - raise ValueError(errmsg) + return False if (val_min_std < sic.math_min) or ( val_min_std >= sic.math_max): print u'ERROR: val_min(std) < math_min or val_min(std) >= math_max' @@ -458,7 +478,6 @@ class IndicatorRecord(models.Model): # {{{ else: # INTEGER_TYPE or PM_TYPE return True - # }}} def get_data(self, **kwargs): # {{{ @@ -525,8 +544,8 @@ class IndicatorRecord(models.Model): # {{{ return self.get_data(**kwargs) # check if specified 'standard unit' for this indicator elif sind.check_unit(): - # unit relation std_unit = sind.get_unit(type="standard")[0] + # unit relation unit_rel = self.unit.relation v = sympy.symbols('v') rel_sym = sympy.sympify(unit_rel) @@ -654,7 +673,7 @@ class IndicatorRecord(models.Model): # {{{ return False else: print u'数据类型错误' - raise ValueError(u'数据类型错误') + #raise ValueError(u'数据类型错误') return None elif sind.dataType == sind.PM_TYPE: # 阴阳(+/-)型 @@ -665,12 +684,12 @@ class IndicatorRecord(models.Model): # {{{ else: return False elif sind.dataType in [sind.RADIO_TYPE, sind.CHECKBOX_TYPE]: - print u'RADIO_TYPE, CHECKBOX_TYPE 验证未实现' - raise ValueError(u'RADIO_TYPE, CHECKBOX_TYPE 验证未实现') + print u'Error: RADIO_TYPE, CHECKBOX_TYPE 验证未实现' + #raise ValueError(u'RADIO_TYPE, CHECKBOX_TYPE 验证未实现') return None else: print u'数据类型不合法' - raise ValueError(u'数据类型不合法') + #raise ValueError(u'数据类型不合法') return None # }}} diff --git a/97suifangqa/apps/indicator/static/css/edit_history_data.css b/97suifangqa/apps/indicator/static/css/edit_history_data.css index 49005be..0209ca7 100644 --- a/97suifangqa/apps/indicator/static/css/edit_history_data.css +++ b/97suifangqa/apps/indicator/static/css/edit_history_data.css @@ -126,12 +126,6 @@ input[type="radio"]:checked + label { float: left; position: relative; } -.edit_history_data_content .editing_data .date .datepicker_container .valid { - border: 2px solid green; -} -.edit_history_data_content .editing_data .date .datepicker_container .invalid { - border: 2px solid red; -} .edit_history_data_content .editing_data .date .datepicker { background: #FFFFFF; border: 1px solid #9C9C9C; @@ -149,6 +143,12 @@ input[type="radio"]:checked + label { right: 8px; cursor: pointer; } +.edit_history_data_content .editing_data .date .datepicker_container .valid { + border: 2px solid green; +} +.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; @@ -182,62 +182,6 @@ input[type="radio"]:checked + label { padding-bottom: 2px; margin-right: 8px; } -.edit_history_data_content .editing_data .input_container { - height: 26px; - line-height: 26px; - float: left; - top: 1px; -} -.edit_history_data_content .editing_data .input_container .prompt { - margin-right: 8px; - float: left; -} -.edit_history_data_content .editing_data .input_container input { - color: #5C5C5C; - background-color: #FFFFFF; - border: 1px solid #9C9C9C; -} -.edit_history_data_content .editing_data .input_container .error { - border: 2px solid red; -} -.edit_history_data_content .editing_data .input_container .edit_input_main { - width: 42px; - height: 17px; - line-height: 17px; - padding-top: 2px; - padding-bottom: 2px; -} -.edit_history_data_content .editing_data .input_container .edit_input_sub { - width: 17px; - height: 17px; - line-height: 17px; - padding-top: 2px; - padding-bottom: 2px; -} -.edit_history_data_content .editing_data .add_minus_icon { - height: 26px; - line-height: 26px; - float: left; - padding-top: 1px; - padding-bottom: 1px; - margin-right: 8px; -} -.edit_history_data_content .editing_data .add_minus_icon .add_icon { - background:url(../images/add.png) no-repeat; - width: 15px; - height: 11px; - border-right: 1px solid #9C9C9C; - cursor: pointer; -} -.edit_history_data_content .editing_data .add_minus_icon .minus_icon { - background:url(../images/minus.png) no-repeat; - width: 15px; - height: 10px; - border-bottom: 1px solid #9C9C9C; - border-right: 1px solid #9C9C9C; - margin-top: 1px; - cursor: pointer; -} .edit_history_data_content .editing_data .data_unit { height: 26px; line-height: 26px; diff --git a/97suifangqa/apps/indicator/static/css/index_desc.css b/97suifangqa/apps/indicator/static/css/index_desc.css index c5adbc8..53530b6 100644 --- a/97suifangqa/apps/indicator/static/css/index_desc.css +++ b/97suifangqa/apps/indicator/static/css/index_desc.css @@ -1,6 +1,6 @@ #index_desc_container { width: 588px; - height: 349px; + height: 365px; background-color: #FFFFFF; border: 1px solid #94C721; padding: 0 20px 0 20px; @@ -39,6 +39,7 @@ font-size: 16px; text-align: left; } + .collection { background-color: #F7F7F7; height: 38px; @@ -53,8 +54,13 @@ .collection:hover { background-color: #EAEAEA; } +/* style for annotation_not_found */ +.collection_no_annotation { + height: 40px; +} + .go_library { - padding-top: 8px; + margin-top: 12px; height: 28px; } .go_library .go_library_btn { @@ -66,3 +72,6 @@ padding-bottom: 2px; padding-top: 2px; } +.go_library .go_library_btn:disabled { + background-color: #CCCCCC; +} diff --git a/97suifangqa/apps/indicator/static/css/new_delete_index.css b/97suifangqa/apps/indicator/static/css/new_delete_index.css index f26430d..fde8168 100644 --- a/97suifangqa/apps/indicator/static/css/new_delete_index.css +++ b/97suifangqa/apps/indicator/static/css/new_delete_index.css @@ -1,9 +1,111 @@ +/* login {{{ */ +#login_container { + float: left; + position: relative; + z-index: 999; + width: 865px; + height: 85px; + margin-left: 457px; +} +#login_container .logged-in { + float: right; + margin-top: 26px; + right: 16px; + width: 160px; +} +#login.logged-in .user-name, #login.logged-in .user-level, #login.logged-in .user-photo, #login.logged-in .drop-down-menu-button { + vertical-align: bottom; +} +#login.logged-in .user-photo { + position: relative; + top: 2px; + /* display: none; */ +} +#login.logged-in .user-level { + font-size: 1em; + line-height: 1em; + padding: 0.05em 0.25em 0.05em 0.2em; + /* display: none; */ +} +.green-block { + background-color: #7BB81B; + color: #FFFFFF; +} +.number-block { + border-radius: 3px 3px 3px 3px; + font-family: "Courier New","DejaVu Sans Mono",monospace,sans-serif,"STHeiti","WenQuanYi Micro Hei","Microsoft YaHei",SimSun,sans-serif; + text-align: center; + width: 1.3em; +} +#login.logged-in .drop-down-area { + cursor: pointer; +} +#login.logged-in .user-name { + font-size: 1.14286em; + font-weight: bold; + line-height: 1em; +} +#login.logged-in .drop-down-menu { + background-color: #FFFFFF; + border: 1px solid #C9C9C9; + border-radius: 2px 2px 2px 2px; + box-shadow: 0 0 10px rgba(85, 85, 85, 0.5); + color: #000000; + display: none; + margin-top: 10px; + position: absolute; + z-index: 999; + width: 168px; + height: 91px; +} +#login.logged-in .drop-down-menu .text-pointer { + background: url("../images/login-menu-popup-pointer.png") no-repeat scroll 0 0 transparent; + height: 8px; + left: 100px; + margin-left: -10px; + position: absolute; + top: -8px; + width: 20px; +} +#login.logged-in .drop-down-menu ul { + margin: 0; + padding: 0; + list-style: none outside none; +} +#login.logged-in .drop-down-menu ul li { + border-bottom: 1px solid #EFEFEF; + padding: 2px; +} +#login.logged-in .drop-down-menu ul li a { + border-radius: 2px 2px 2px 2px; + color: inherit; + display: block; + padding-bottom: 0.2em; + padding-left: 1em; + padding-top: 0.2em; + text-decoration: none; + width: 150px; +} +#login.logged-in .drop-down-menu ul li.last { + border-bottom: medium none; +} +#login.logged-in .drop-down-menu.open { + display: block; +} +/* login: }}} */ + + #new_delete_container { float: left; - margin-left: 37px; + margin-left: 457px; + position: relative; + /* + position: absolute; + margin-top: 85px; + */ } .new_delete_title { - width: 596px; + width: 696px; height: 26px; } .new_delete_title .content { @@ -19,10 +121,12 @@ height: 26px; line-height: 26px; position: relative; + width: 158px; } .new_delete_title .search input { float: left; height: 20px; + line-height: normal; width: 127px; border: 1px solid #CACACA; background-color: #FFFFFF; @@ -48,21 +152,26 @@ } .index_navigation .index_type { float: left; - width: 63px; - height: 20px; + width: 77px; + height: 22px; + line-height: 22px; text-align: center; border: 1px solid #B5B5B5; border-radius: 2px; - margin-right: 11px; + margin-right: 9px; } -.index_navigation .index_type a{ +.index_navigation .index_type a { color: #7E7E7E; cursor: pointer; text-decoration: none; } +/* .index_navigation #index_all { margin-right: 11px; + float: right; + width: 71px; } +*/ .index_navigation .selected { background-color: #99CC33; border: 1px solid #CCE69C; @@ -75,13 +184,12 @@ } .show_indexes .index_container { float: left; - width: 252px; + width: 302px; height: 437px; border: 1px solid #b6b6b6; z-index: 1; position: relative; padding: 6px 12px 0 12px; - overflow: hidden; } .show_indexes .add_concerned_icon { float: left; @@ -108,10 +216,12 @@ color: #4A4A4A; float: left; } -.show_indexes .index_container .index_title_container .example_sheet { +.show_indexes .index_container .index_title_container .example_sheet a { float: right; color: #4A4A4A; margin-top: 4px; + cursor: pointer; + text-decoration: none; } .show_indexes .index_container .index_title_container .index_btn { float: right; @@ -128,6 +238,7 @@ .index_line .index_name, .index_line .index_category { float: left; font-size: 14px; + width: 45px; height: 20px; line-height: 20px; color: #4A4A4A; @@ -137,10 +248,10 @@ .index_lines .add .icon { width: 20px; height: 20px; - float: right; background: url("../images/addicon.png"); - margin-right: 2px; cursor: pointer; + position: absolute; + left: 260px; } .index_lines .add .index_name, .index_lines .add .index_category, .index_lines .minus .index_name { color: #FFFFFF; @@ -148,10 +259,10 @@ .index_lines .minus .icon { width: 20px; height: 20px; - float: right; background: url("../images/minusicon.png"); - margin-right: 2px; cursor: pointer; + position: absolute; + left: 260px; } .index_lines .add, .index_lines .minus { background: #8FC31F; @@ -189,28 +300,50 @@ float: left; color: #8F8F8F; font-size: 15px; - margin-right: 4px; + margin-right: 7px; cursor: pointer; } +.all_condition .index_all_letter .letter_selected{ + color: #99CC33; +} +.index_letter_container { + height: 360px; + position: relative; + overflow: auto; +} .index_letter_container .index_lines { margin-bottom: 46px; } .index_letter_container .index_lines .letter_title { + height: 32px; + line-height: 32px; font-weight: bold; font-size: 32px; color: #4A4A4A; border-bottom: 1px solid #BFBFBF; - height: 24px; +} +.show_indexes .index_container .right { + position: relative; + height: 405px; + overflow: auto; +} +.show_indexes .index_container .left { + position: relative; + height: 405px; + overflow: auto; } .link_container { - width: 596px; + width: 696px; height: 39px; - margin: 10px 0; /* top/bottom: 10px; left/right: 0 */ + position: relative; + float: left; + margin-left: 457px; + margin-top: 10px; + margin-bottom: 10px; } - .link_container .status_link { - width: 594px; + width: 694px; height: 37px; line-height: 37px; border: 1px solid #B5B5B5; @@ -219,7 +352,6 @@ background-color: #F3F3F1; text-align: center; } - .link_container .status_link a { color: #4A4A4A; text-decoration: none; @@ -229,3 +361,4 @@ cursor: pointer; } +/* vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=css: */ diff --git a/97suifangqa/apps/indicator/static/css/sheet_default.css b/97suifangqa/apps/indicator/static/css/sheet_default.css index 44fa6f5..b83dd6a 100644 --- a/97suifangqa/apps/indicator/static/css/sheet_default.css +++ b/97suifangqa/apps/indicator/static/css/sheet_default.css @@ -1,10 +1,134 @@ +/* + * radio input button + */ +input[type="radio"] { + display: none; + margin: 4px; + vertical-align: middle; +} +input[type="radio"] + label { + display: inline-block; + height: 17px; + line-height: 17px; + margin-right: 2px; + padding: 2px 7px; + background-color: #F3F3F1; + border: 1px solid #9C9C9C; +} +input[type="radio"]:checked + label { + background-image: none; + background-color: #99CC33; +} + +/* login {{{ */ +#login_container { + float: left; + position: relative; + width: 865px; + height: 85px; + margin-left: 457px; +} +#login_container .logged-in { + float: right; + margin-top: 26px; + right: 16px; + width: 160px; +} +#login.logged-in .user-name, #login.logged-in .user-level, #login.logged-in .user-photo, #login.logged-in .drop-down-menu-button { + vertical-align: bottom; +} +#login.logged-in .user-photo { + position: relative; + top: 2px; + /* display: none; */ +} +#login.logged-in .user-level { + font-size: 1em; + line-height: 1em; + padding: 0.05em 0.25em 0.05em 0.2em; + /* display: none; */ +} +.green-block { + background-color: #7BB81B; + color: #FFFFFF; +} +.number-block { + border-radius: 3px 3px 3px 3px; + font-family: "Courier New","DejaVu Sans Mono",monospace,sans-serif,"STHeiti","WenQuanYi Micro Hei","Microsoft YaHei",SimSun,sans-serif; + text-align: center; + width: 1.3em; +} +#login.logged-in .drop-down-area { + cursor: pointer; +} +#login.logged-in .user-name { + font-size: 1.14286em; + font-weight: bold; + line-height: 1em; +} +#login.logged-in .drop-down-menu { + background-color: #FFFFFF; + border: 1px solid #C9C9C9; + border-radius: 2px 2px 2px 2px; + box-shadow: 0 0 10px rgba(85, 85, 85, 0.5); + color: #000000; + display: none; + margin-top: 10px; + position: absolute; + z-index: 999; + width: 168px; + height: 91px; +} +#login.logged-in .drop-down-menu .text-pointer { + background: url("../images/login-menu-popup-pointer.png") no-repeat scroll 0 0 transparent; + height: 8px; + left: 100px; + margin-left: -10px; + position: absolute; + top: -8px; + width: 20px; +} +#login.logged-in .drop-down-menu ul { + margin: 0; + padding: 0; + list-style: none outside none; +} +#login.logged-in .drop-down-menu ul li { + border-bottom: 1px solid #EFEFEF; + padding: 2px; +} +#login.logged-in .drop-down-menu ul li a { + border-radius: 2px 2px 2px 2px; + color: inherit; + display: block; + padding-bottom: 0.2em; + padding-left: 1em; + padding-top: 0.2em; + text-decoration: none; + width: 150px; +} +#login.logged-in .drop-down-menu ul li.last { + border-bottom: medium none; +} +#login.logged-in .drop-down-menu.open { + display: block; +} +/* login }}} */ + + #right_container { - width: 596px; + width: 696px; float: left; + /* + position: absolute; + margin : 85px 0 0 457px; + */ + position: relative; margin-left: 457px; + padding-bottom: 50px; } #index_status_container { - width: 596px; + width: 696px; } .index_title { color: #4a4a4a; @@ -31,7 +155,7 @@ cursor: pointer; } .detail_card_info { - width: 562px; + width: 662px; border: 1px solid #CACACA; position: relative; float: left; @@ -66,10 +190,10 @@ .detail_card_info .search_data_div { margin-top: 9px; margin-bottom: 17px; - width: 562px; + width: 662px; } .detail_card_info .search_data_div input[type='button'] { - width: 80px; + width: 100px; height: 23px; line-height: 23px; float: left; @@ -88,13 +212,13 @@ float: right; } .detail_card_info .search_data_div .end_date_container { - margin-left: 10px; + margin-left: 25px; } .detail_card_info .search_data_div .datepicker_container .datepicker { background: #FFFFFF; border: 1px solid #9C9C9C; color: #B9B9B9; - width: 107px; + width: 117px; height: 17px; line-height: 17px; position: relative; @@ -138,14 +262,20 @@ background-color: #CCCCCC; } .index_card { - width: 278px; - height: 375px; + width: 328px; + height: 434px; border: 1px solid #CACACA; margin-top: 9px; border-radius: 2px; padding: 5px 5px 0 8px; position: relative; } +/* recommended indicator's card */ +#index_status_container .recommended { + width: 326px; + height: 432px; + border: 2px solid #99CC33; +} .index_card_fir { float: left; } @@ -168,8 +298,9 @@ .index_card .refer_range .refer_value { margin-right: 5px; } + .index_card .edit_data, .index_card .editing_data { - height: 25px; + height: 53px; margin-top: 7px; } .index_card .edit_data .explain_icon { @@ -181,66 +312,111 @@ cursor: pointer; } .index_card .edit_data .last_edit_data { + height: 25px; + line-height: 25px; + float: left; +} +.index_card .edit_data .last_edit_data .data_value { + margin-right: 5px; +} +.index_card .edit_data .last_edit_date { + height: 25px; + line-height: 25px; + margin-top: 3px; float: left; + color: #B9B9B9; +} +.index_card .edit_data .last_edit_date .date_prompt { + margin-right: 5px; } +.index_card .edit_data .refresh_icon { + float: right; + background: url("../images/refresh.png") no-repeat; + width: 23px; + height: 23px; + margin-top: 2px; + cursor: pointer; +} + .index_card .editing_data { + height: 53px; + margin-top: 7px; display: none; } -.index_card .editing_data .input_container { +.index_card .editing_data .data { + height: 25px; + line-height: 25px; + float: left; + top: 1px; +} +.index_card .editing_data .data .prompt { + margin-right: 8px; float: left; } -.index_card .editing_data .input_container input { +.index_card .editing_data .data input { color: #5C5C5C; background-color: #FFFFFF; border: 1px solid #9C9C9C; } -.index_card .editing_data .input_container .error { - border: 1px solid red; +.index_card .editing_data .data .valid { + border: 2px solid green; +} +.index_card .editing_data .data .invalid { + border: 2px solid red; +} +.index_card .editing_data .data .radio_input { + margin-right: 8px; + float: left; } -.index_card .editing_data .input_container .edit_input_main { - width: 42px; +.index_card .editing_data .data .data_input { + width: 165px; height: 17px; line-height: 17px; padding-top: 2px; padding-bottom: 2px; + margin-right: 8px; +} +.index_card .editing_data .data_unit { + float: left; + height: 25px; + line-height: 25px; } -.index_card .editing_data .input_container .edit_input_sub { - width: 17px; +.index_card .editing_data .date .datepicker_container { + width: 148px; + height: 25px; + position: relative; + margin-top: 5px; +} +.index_card .editing_data .date .datepicker_container .datepicker { + background: #FFFFFF; + border: 1px solid #9C9C9C; + color: #B9B9B9; + width: 131px; height: 17px; line-height: 17px; + position: relative; padding-top: 2px; padding-bottom: 2px; } -.index_card .editing_data .add_minus_icon { - float: left; - margin-right: 8px; -} -.index_card .editing_data .add_minus_icon .add_icon { - background:url(../images/add.png) no-repeat; - width: 15px; - height: 11px; - border-right: 1px solid #9C9C9C; +.index_card .editing_data .date .datepicker_container .ui-datepicker-trigger { + position: absolute; + top: 2px; + right: 8px; cursor: pointer; } -.index_card .editing_data .add_minus_icon .minus_icon { - background:url(../images/minus.png) no-repeat; - width: 15px; - height: 10px; - border-bottom: 1px solid #9C9C9C; - border-right: 1px solid #9C9C9C; - margin-top: 1px; - cursor: pointer; +.index_card .editing_data .date .datepicker_container .valid { + border: 2px solid green; } -.index_card .editing_data .data_unit { - float: left; - margin-right: 8px; +.index_card .editing_data .date .datepicker_container .invalid { + border: 2px solid red; } + .index_card .editing_data .cancel_edit_icon { float: right; background:url(../images/cancel_edit.png) no-repeat; width: 23px; height: 23px; - margin-right: 2px; + margin-right: 3px; cursor: pointer; } .index_card .editing_data .confirm_edit_icon { @@ -250,61 +426,29 @@ height: 23px; cursor: pointer; } -.index_card .refresh_data { - height: 23px; - line-height: 23px; - margin-top: 3px; -} -.index_card .refresh_data .refresh_text { - float: left; - color: #B9B9B9; -} -.index_card .refresh_data .refresh_icon { - float: right; - background: url("../images/refresh.png") no-repeat; - width: 23px; - height: 23px; - cursor: pointer; -} -.index_card .select_date { - width: 148px; - height: 23px; + +.index_card .edit_icon_container { + height: 270px; + margin-top: 10px; + margin-bottom: 10px; position: relative; - margin-top: 3px; - display: none; -} -.index_card .select_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; -} -.index_card .select_date .ui-datepicker-trigger { - position: absolute; - top: 2px; - right: 8px; - cursor: pointer; + top: -38px; } .index_card .edit_icon_container .edit_icon { background: url("../images/pen_large.png") no-repeat; height: 85px; width: 85px; float: left; - margin: 40px 0 0 95px; + margin: 45px 0 0 135px; cursor: pointer; } .index_card .edit_icon_container .curve_icon { background: url("../images/curve.png") no-repeat; height: 125px; - width: 97px; + width: 105px; float: left; } -.index_card .edit_text { +.index_card .edit_icon_container .edit_text { color: #4B4B4B; text-align: center; height: 20px; @@ -312,12 +456,17 @@ margin-top: 11px; margin-bottom: 100px; } + .index_card .chart { - height: 230px; + height: 270px; + margin-top: 10px; + margin-bottom: 10px; + position: relative; } .index_card .card_bottom { height: 30px; - width: 596px; + position: absolute; + bottom: 0; } .index_card .card_bottom .understand_index, .index_card .card_bottom .simulation_sheet, .index_card .card_bottom .detail_history { float: left; @@ -328,10 +477,10 @@ text-decoration: none; } .index_card .card_bottom .understand_index { - width: 99px; + width: 120px; } .index_card .card_bottom .simulation_sheet { - width: 96px; + width: 115px; } .index_card .card_delete { background: url('../images/closed.png') no-repeat; @@ -354,13 +503,13 @@ cursor: pointer; } .act_card_container { - width: 293px; + width: 343px; height: 380px; } .act_card{ - width: 290px; - height: 96px; - line-height: 96px; + width: 340px; + height: 118px; + line-height: 118px; text-align: center; border: 2px dashed #A0A0A0; margin-top: 9px; @@ -377,3 +526,4 @@ .move_div_2_left { float: left; } +/* vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=css: */ diff --git a/97suifangqa/apps/indicator/static/css/sidebar.css b/97suifangqa/apps/indicator/static/css/sidebar.css index 185145a..8df3a1a 100644 --- a/97suifangqa/apps/indicator/static/css/sidebar.css +++ b/97suifangqa/apps/indicator/static/css/sidebar.css @@ -3,9 +3,10 @@ } #sidebar_container{ padding: 1.5em 0; + position: absolute; z-index: 10; width: 420px; - height: 720px; + height: 1020px; background-color: #F3F3F1; } @@ -85,6 +86,7 @@ #compare_container .post-question .searchdiv .question { width: 289px; height: 29px; + line-height: normal; border: 1px solid #c1b59d; } #compare_container .post-question .searchdiv .submit { @@ -162,7 +164,7 @@ #compare_container .similar_container .similar_content .similar_title { color: #a0a0a0; font-size: 14px; - margin-bottom: 25px; + margin-bottom: 21px; } #compare_container .similar_container .similar_content .specifix_content { background: url("../images/dialog-default.png") no-repeat; @@ -172,6 +174,12 @@ margin-bottom: 35px; line-height:47px; } +#compare_container .similar_container .similar_content #specifix_content1, #compare_container .similar_container .similar_content #specifix_content2 { + margin-bottom: 37px; +} +#compare_container .similar_container .similar_content #specifix_content3{ + margin-bottom: 31px; +} .specifix_content .specifix_text { padding-left: 25px; font-size: 15px; @@ -182,6 +190,7 @@ height: 38px; border-radius: 3px; margin-top: 8px; + cursor: pointer; } #compare_container .compare_btn .compare_btn_in{ border: 1px solid #b8db71; @@ -200,7 +209,15 @@ text-align: center; border-radius: 3px; } +#compare_container .compare_btn .compare_btn_in:hover { + background: #93C431; +} +#compare_container .compare_btn .compare_btn_in:active { + background: #8AB82E; + box-shadow: 0 0 10px rgba(85 85 85 0.5) inset; +} #compare_container .logo_container { margin-top: 30px; text-align: center; } + diff --git a/97suifangqa/apps/indicator/static/images/curve.png b/97suifangqa/apps/indicator/static/images/curve.png Binary files differindex 309f262..8464391 100644 --- a/97suifangqa/apps/indicator/static/images/curve.png +++ b/97suifangqa/apps/indicator/static/images/curve.png diff --git a/97suifangqa/apps/indicator/static/images/gradient_bar.png b/97suifangqa/apps/indicator/static/images/gradient_bar.png Binary files differnew file mode 100644 index 0000000..4e2bbb9 --- /dev/null +++ b/97suifangqa/apps/indicator/static/images/gradient_bar.png diff --git a/97suifangqa/apps/indicator/static/images/icon_down.png b/97suifangqa/apps/indicator/static/images/icon_down.png Binary files differnew file mode 100644 index 0000000..b3685d2 --- /dev/null +++ b/97suifangqa/apps/indicator/static/images/icon_down.png diff --git a/97suifangqa/apps/indicator/static/images/login-menu-popup-pointer.png b/97suifangqa/apps/indicator/static/images/login-menu-popup-pointer.png Binary files differnew file mode 100644 index 0000000..9728ea7 --- /dev/null +++ b/97suifangqa/apps/indicator/static/images/login-menu-popup-pointer.png diff --git a/97suifangqa/apps/indicator/static/images/search.PNG b/97suifangqa/apps/indicator/static/images/search.PNG Binary files differnew file mode 100644 index 0000000..303f228 --- /dev/null +++ b/97suifangqa/apps/indicator/static/images/search.PNG diff --git a/97suifangqa/apps/indicator/static/images/userPhoto.jpg b/97suifangqa/apps/indicator/static/images/userPhoto.jpg Binary files differnew file mode 100644 index 0000000..a9a8380 --- /dev/null +++ b/97suifangqa/apps/indicator/static/images/userPhoto.jpg diff --git a/97suifangqa/apps/indicator/static/javascripts/card_chart.js b/97suifangqa/apps/indicator/static/javascripts/card_chart.js index 8398345..75cbf78 100644 --- a/97suifangqa/apps/indicator/static/javascripts/card_chart.js +++ b/97suifangqa/apps/indicator/static/javascripts/card_chart.js @@ -91,14 +91,14 @@ $(document).ready(function(){ $(".detail_history").bind("click", function(){ // update 'detail_card_id' detail_card_id = $(this).closest(".index_card").attr("id").replace('index_card_', ''); - // check if this card has data - // if has no data, then exists div class="edit_icon_container" - if ($("#index_card_"+detail_card_id + " .edit_icon_container").length) { + var card = $("#index_card_"+detail_card_id); + // check if this card has data (class "record_empty") + if (card.hasClass("record_empty")) { $(".detail_card_info").hide(); return false; } // get the index title and set for the 'detail card' - var index_title = $("#index_card_"+detail_card_id + " .card_title").html(); + var index_title = card.find(".card_title").html(); $(".detail_card_info .card_title .title").html(index_title); // set date for the 'shift_date' buttons var date_fmt = 'YYYY-MM-DD'; @@ -116,6 +116,9 @@ $(document).ready(function(){ // options for chart global var: 'options_chart_<id>' // update global var 'detail_chart_options_str' detail_chart_options_str = 'options_chart_' + detail_card_id; + if (typeof window[detail_chart_options_str] === 'undefined') { + return false; + } // clickable data point window[detail_chart_options_str].plotOptions = { series: { diff --git a/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js b/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js index e0dff4a..b85bced 100644 --- a/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js +++ b/97suifangqa/apps/indicator/static/javascripts/edit_history_data.js @@ -74,7 +74,7 @@ $(document).ready(function(){ }); // }}} - // initalize + // initialize // set datepicker 'date_input' value var date_init = $.datepicker.parseDate('yy-mm-dd', $(".date_input").attr('value')); @@ -105,11 +105,10 @@ $(document).ready(function(){ at: 'top right' }, show: { - event: false + event: 'mouseenter' }, hide: { - //event: 'click' - event: false + event: 'mouseleave unfocus' } }); $(".date_input").focus(function() { @@ -128,6 +127,8 @@ $(document).ready(function(){ if (date_mm.isValid() && !date_mm.isAfter(today_mm)) { $(this).removeClass("invalid"); $(this).addClass("valid"); + var qtip_content = dateinput_help; + $(this).qtip('api').set('content.text', qtip_content); $(this).qtip('api').hide(); // update data record_data.date = date_str; @@ -147,11 +148,11 @@ $(document).ready(function(){ // }}} // validate data - if (data_type == DATA_TYPES.INTEGER_TYPE) { + if (data_type == DATA_TYPES_JS.INTEGER_TYPE) { // INTEGER_TYPE // TODO } - else if (data_type == DATA_TYPES.FLOAT_TYPE) { // {{{ + else if (data_type == DATA_TYPES_JS.FLOAT_TYPE) { // {{{ // FLOAT_TYPE var datainput_help = '<p>定值型</p><p>数据格式示例:123.7; 1.23e4; 3.5e-2</p>'; // tooltip @@ -166,11 +167,10 @@ $(document).ready(function(){ at: 'top right' }, show: { - event: false + event: 'mouseenter' }, hide: { - //event: 'click' - event: false + event: 'mouseleave unfocus' } }); $(".data_input").focus(function() { @@ -200,6 +200,9 @@ $(document).ready(function(){ // confine valid $(this).removeClass("invalid"); $(this).addClass("valid"); + var qtip_content = datainput_help; + $(this).qtip('api').set('content.text', + qtip_content); $(this).qtip('api').hide(); // update data record_data.value = value; @@ -219,7 +222,7 @@ $(document).ready(function(){ $(this).trigger('validate'); }); } // }}} - else if (data_type == DATA_TYPES.RANGE_TYPE) { // {{{ + else if (data_type == DATA_TYPES_JS.RANGE_TYPE) { // {{{ // RANGE_TYPE var datainput_help = '<p>范围型</p><p>数据格式示例:• <123.7; • >1.3e3; • 1.5e3 ~ 3.7e3</p>'; // tooltip @@ -234,11 +237,10 @@ $(document).ready(function(){ at: 'top right' }, show: { - event: false + event: 'mouseenter' }, hide: { - //event: 'click' - event: false + event: 'mouseleave unfocus' } }); $(".data_input").focus(function() { @@ -302,6 +304,9 @@ $(document).ready(function(){ if (confine_valid === true) { $(this).removeClass("invalid"); $(this).addClass("valid"); + var qtip_content = datainput_help; + $(this).qtip('api').set('content.text', + qtip_content); $(this).qtip('api').hide(); // update data record_data.val_min = val_min; @@ -322,10 +327,10 @@ $(document).ready(function(){ $(this).trigger('validate'); }); } // RANGE_TYPE }}} - else if (data_type == DATA_TYPES.FLOAT_RANGE_TYPE) { + else if (data_type == DATA_TYPES_JS.FLOAT_RANGE_TYPE) { // TODO } - else if (data_type == DATA_TYPES.PM_TYPE) { // {{{ + else if (data_type == DATA_TYPES_JS.PM_TYPE) { // {{{ // TODO var radioinput_help = '<p>请直接点击选择</p>'; // tooltip @@ -356,6 +361,11 @@ $(document).ready(function(){ } else { // valid + var qtip_content = radioinput_help; + $(this).qtip('api').set('content.text', + qtip_content); + $(this).qtip('api').hide(); + // update data record_data.value = $(".radio_input input:radio:checked").val(); } }); @@ -365,8 +375,8 @@ $(document).ready(function(){ return false; } - // validate reason - var reasoninput_help = '<p><strong>必填</strong></p>'; + // validate reason {{{ + var reasoninput_help = '<p>解释修改记录的原因</p><p><strong>必填</strong></p>'; $(".reason_input").qtip({ id: 'reasoninput', prerender: false, @@ -378,11 +388,10 @@ $(document).ready(function(){ at: 'top right' }, show: { - event: false + event: 'mouseenter' }, hide: { - //event: 'click' - event: false + event: 'mouseleave unfocus' } }); $(".reason_input").focus(function() { @@ -406,6 +415,8 @@ $(document).ready(function(){ // valid $(this).removeClass("invalid"); $(this).addClass("valid"); + var qtip_content = reasoninput_help; + $(this).qtip('api').set('content.text', qtip_content); $(this).qtip('api').hide(); // update data record_data.reason = reason_str; @@ -415,6 +426,7 @@ $(document).ready(function(){ $(this).trigger('validate'); }); // }}} + // }}} }); // help functions diff --git a/97suifangqa/apps/indicator/static/javascripts/index_desc.js b/97suifangqa/apps/indicator/static/javascripts/index_desc.js deleted file mode 100644 index 49771ea..0000000 --- a/97suifangqa/apps/indicator/static/javascripts/index_desc.js +++ /dev/null @@ -1,16 +0,0 @@ -$(document).ready(function(){ - //点大叉、继续关注按钮,关闭弹层页面 - $(".index_desc_close").bind("click", function(){ - parent.TB_remove(); - return false; - }); - - //前往医学知识库 - $(".go_library_btn").bind("click", function(){ - parent.delete_card(); - parent.TB_remove(); - - parent.window.location.href = "http://demo.97suifang.com/blog/1/source"; - return false; - }); -});
\ No newline at end of file diff --git a/97suifangqa/apps/indicator/static/javascripts/new_delete_index.js b/97suifangqa/apps/indicator/static/javascripts/new_delete_index.js index 3c1faf7..e216f09 100644 --- a/97suifangqa/apps/indicator/static/javascripts/new_delete_index.js +++ b/97suifangqa/apps/indicator/static/javascripts/new_delete_index.js @@ -1,95 +1,245 @@ // track the indexes already added(/followed) var added_indexes_id = new Array(); +var select_letter = ''; +var select_index_obj = null; + $(document).ready(function(){ - $("#search_btn").bind("click", function(){ - var kw = $("#search_kw").val(); - window.location.href = '?kw='+kw; - return false; - }); - $(".left>.index_line, .index_letter_container>.index_lines>.index_line").each(function(){ - classHover($(this), "add"); - }); - $(".right>.index_line").each(function(){ - classHover($(this), "minus"); - }); - // save the "index_id's of added (type: string) - $(".right>.index_line").each(function(){ - var index_id = $(this).attr("index_id"); - added_indexes_id.push(index_id); - }); - $(".index_lines").on("click", ".add>.icon", function(){ - var add_icon = $(this); - var index_id = add_icon.closest(".index_line").attr("index_id"); - var date = new Date(); - var time = date.getTime(); - $.ajax({ - type: 'get', - url: indicator_url + 'ajax/act_index', - data: 'index_id='+index_id+'&act=add'+'&time='+time, - success: function(data){ - if(data == 'success'){ - // check if the index exists? - if (added_indexes_id.indexOf(index_id) == -1) { - var obj = add_icon.parent(); - var objClone = obj.clone(); - objClone.removeClass("add") - objClone.children(".index_category").remove(); - $(".right").append(objClone); - classHover(objClone, "minus"); - added_indexes_id.push(index_id); - } - } - } - }); - - return false; - }); - $(".index_lines").on("click", ".minus>.icon", function(){ - var minus_icon = $(this); - var index_id = minus_icon.closest(".index_line").attr("index_id"); - var date = new Date(); - var time = date.getTime(); - $.ajax({ - type: 'get', - url: indicator_url + 'ajax/act_index', - data: 'index_id='+index_id+'&act=minus'+'&time='+time, - success: function(data){ - var obj = minus_icon.parent(); - obj.remove(); - rm_index = added_indexes_id.indexOf(index_id); - added_indexes_id.splice(rm_index, 1); - } - }); - - return false; - }); - $(".all_condition>.index_all_letter>div").bind("click", function(){ - $(".index_letter_container>.index_lines").hide(); - var letterClass = $(this).text(); - $("."+letterClass).show(); - $("."+letterClass).nextAll().show(); - return false; - }); - $("#submitIndexBtn").bind("click", function(){ - var commit_index = ''; - $(".right>.index_line").each(function(){ - commit_index += $(this).attr("index_id")+','; - }); - $("#commit_index").val(commit_index); - $("#index_form").submit(); - return false; - }); + $(".index_type").each(function(){ + if($(this).hasClass("selected")){ + select_index_obj = $(this); + return false; + } + }); + $(".index_type").hover( + function(){ + $(this).addClass("selected"); + }, + function(){ + if(!$(this).is(select_index_obj)){ + $(this).removeClass("selected"); + } + } + ); + + // login control kit {{{ + $(".drop-down-area").bind("click", function(){ + var drop_down_menu = $(".drop-down-menu"); + if(drop_down_menu.hasClass("open")){ + drop_down_menu.removeClass("open"); + }else{ + drop_down_menu.addClass("open"); + } + return false; + }); + $("body").bind("click", function(){ + $(".drop-down-menu").removeClass("open"); + }); + // login }}} + + // search -> ajax + // bind enter key + $(".search #search_kw").on('keypress', null, function(e) { + var keycode = (e.keyCode ? e.keyCode : e.which); + //console.log('keycode: "'+keycode+'"'); + if (keycode == 13) { + //alert('"Enter" key pressed'); + var kw = $(this).val(); + //console.log('kw: "'+kw+'"'); + search_indicators(kw); + return false; + } + }); + $(".search #search_btn").bind("click", function(){ + var kw = $("#search_kw").val(); + //console.log('kw: "'+kw+'"'); + //window.location.href = '?kw='+kw; + search_indicators(kw); + return false; + }); + + // XXX: cannot deal with the dynamically added div's by ajax + /* + $(".left>.index_line, .index_letter_container>.index_lines>.index_line").each(function(){ + classHover($(this), "add"); + }); + $(".right>.index_line").each(function(){ + classHover($(this), "minus"); + }); + */ + // updated to work with ajax + $(".show_indexes").on('mouseenter mouseleave', '.index_lines>.index_line', function(e) { + //console.log("event_type: "+e.type); + var line = $(this); + var lines_div = line.parent(); + if (lines_div.hasClass("to_add")) { + // left container (unfollowed) + var cls_name = "add"; + } + else { + // right container (followed) + var cls_name = "minus"; + } + // event type + if (e.type === 'mouseenter') { + $(this).addClass(cls_name); + } + else { + $(this).removeClass(cls_name); + } + }); + + // save the "index_id's of added (type: string) + $(".right>.index_line").each(function(){ + var index_id = $(this).attr("index_id"); + added_indexes_id.push(index_id); + }); + $(".show_indexes").on("click", ".add>.icon", function(){ + var add_icon = $(this); + var index_id = add_icon.closest(".index_line").attr("index_id"); + var date = new Date(); + var time = date.getTime(); + $.ajax({ + type: 'get', + url: indicator_url + 'ajax/act_index/', + data: 'index_id='+index_id + '&act=add' + '&time='+time, + success: function(data){ + if(data == 'success'){ + // check if the index exists? + if (added_indexes_id.indexOf(index_id) == -1) { + var obj = add_icon.parent(); + var objClone = obj.clone(); + objClone.removeClass("add") + objClone.children(".index_category").remove(); + $(".right").append(objClone); + classHover(objClone, "minus"); + added_indexes_id.push(index_id); + } + } + } + }); + + return false; + }); + $(".show_indexes").on("click", ".minus>.icon", function(){ + var minus_icon = $(this); + var index_id = minus_icon.closest(".index_line").attr("index_id"); + var date = new Date(); + var time = date.getTime(); + $.ajax({ + type: 'get', + url: indicator_url + 'ajax/act_index/', + data: 'index_id='+index_id + '&act=minus' + '&time='+time, + success: function(data){ + var obj = minus_icon.parent(); + obj.remove(); + rm_index = added_indexes_id.indexOf(index_id); + added_indexes_id.splice(rm_index, 1); + } + }); + + return false; + }); + $(".all_condition>.index_all_letter>div").bind("click", function(){ + $(".letter_selected").removeClass("letter_selected"); + $(this).addClass("letter_selected"); + var container = $(".index_letter_container"); + var letterClass = $(this).text(); + var scrollTo = $("."+letterClass); + container.scrollTop(scrollTo.offset().top - container.offset().top + container.scrollTop()); + select_letter = letterClass; + return false; + }); + $(".all_condition>.index_all_letter>div").hover( + function(){ + $(this).addClass("letter_selected"); + }, + function(){ + if(select_letter != $(this).text()){ + $(this).removeClass("letter_selected"); + } + } + ); + $("#submitIndexBtn").bind("click", function(){ + var commit_index = ''; + $(".right>.index_line").each(function(){ + commit_index += $(this).attr("index_id")+','; + }); + $("#commit_index").val(commit_index); + $("#index_form").submit(); + return false; + }); }); + + +// helper functions function classHover(obj, c){ - obj.hover( - function(){ - $(this).addClass(c); - }, - function(){ - $(this).removeClass(c); - } - ); + obj.hover( + function(){ + $(this).addClass(c); + }, + function(){ + $(this).removeClass(c); + } + ); +} + +// search +function search_indicators(kw) { + if (is_str_blank(kw)) { + // 'kw' blank + return false; + } + var time = moment().valueOf(); + $.ajax({ + type: 'get', + url: indicator_url + 'ajax/search_indicators/', + data: 'kw='+kw + '&time='+time, + dataType: 'json', + success: function(dataJson) { + // unselect index_type + $(".index_navigation .selected").removeClass("selected"); + select_index_obj = null; + // hide & show + $(".all_condition").hide(); + $(".category_condition").hide(); + $(".search_condition").show(); + // clear existing search div's or create + if ($(".search_condition > .index_lines").length) { + $(".search_condition > .index_lines").html(''); + } + else { + // add 'index_lines' div + $(".search_condition").append('<div class="index_lines left to_add"></div>'); + } + if (dataJson.failed === true) { + if (dataJson.error_code === 10) { + // search keyword blank + $(".search_condition > .index_lines").append('<div class="index_search_error"> <div class="index_error">您未输入搜索关键词</div> <div class="icon"></div> <div style="clear:both"></div> </div>'); + } + if (dataJson.error_code === 20) { + // search result empty + $(".search_condition > .index_lines").append('<div class="index_search_error"> <div class="index_error">未搜索到符合的结果</div> <div class="icon"></div> <div style="clear:both"></div> </div>'); + } + } + else { + // append search results to page + var results_html = ''; + for (var i=0; i<dataJson.indicators.length; i++) { + var ind = dataJson.indicators[i]; + results_html += '<div class="index_line" index_id="'+ind.id + '"> <div class="index_name">'+ind.name + '</div> <div class="index_category"><a href="?tab='+ind.categories_id[0] + '">'+ind.categories_name[0] + '</a></div> <div class="icon"></div> <div style="clear:both"></div> </div> \n'; + } + $(".search_condition > .index_lines").append(results_html); + } + } + }); + return false; } +// check if a string is blank, null or undefined +function is_str_blank(str) { + return (!str || /^\s*$/.test(str)); +} + + // vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=javascript: // diff --git a/97suifangqa/apps/indicator/static/javascripts/sheet_default.js b/97suifangqa/apps/indicator/static/javascripts/sheet_default.js new file mode 100644 index 0000000..e5d9e9e --- /dev/null +++ b/97suifangqa/apps/indicator/static/javascripts/sheet_default.js @@ -0,0 +1,618 @@ +var now_js = new Date(); +// require 'moment.js' +var curr_moment = moment(); +var today_str = curr_moment.format('YYYY-MM-DD'); +// global var to store the data of record +var record_data = { + id: null, + date: null, + value: null, + val_min: null, + val_max: null, +}; + +$(document).ready(function(){ + // login control kit + $(".drop-down-area").bind("click", function(){ + var drop_down_menu = $(".drop-down-menu"); + if(drop_down_menu.hasClass("open")){ + drop_down_menu.removeClass("open"); + }else{ + drop_down_menu.addClass("open"); + } + return false; + }); + $("body").bind("click", function(){ + $(".drop-down-menu").removeClass("open"); + }); + + // recommended indicators + $("#index_status_container .recommended").each(function() { + var this_card = $(this); + var id = this_card.attr("id").replace('index_card_', ''); + var qtip_title = '<strong>为您推荐的指标</strong>'; + var qtip_help = '若不需要,可以点击卡片右上角的 × 关闭'; + this_card.qtip({ + id: 'card_help'+id, + prerender: false, + content: { + text: qtip_help, + title: qtip_title, + button: true + }, + position: { + my: 'bottom left', + at: 'top center', + target: this_card.find('.card_title') + }, + show: { + event: false + }, + hide: { + event: false + }, + style: { + classes: 'qtip-sf' + } + }); + this_card.qtip('api').show(); + }); + + //不允许input框复制,减少验证粘帖的交互 + // $("input[type='text']").bind("paste", function(){ + // return false; + // }); + + //副标题点大叉 + $("#index_title_closed_icon").bind("click", function(){ + var closeBtn = $(this); + var date = new Date(); + var time = date.getTime(); + $.ajax({ //数据库还是cookie,都可以,建议使用cookie,html中是否显示sub_title也由后端读取的cookie决定 + type: 'get', + url: indicator_url + 'ajax/close_sub_title', + data: 'time='+time, + success: function(data){ + if(data == 'success'){ + closeBtn.parent().remove(); + } + } + }); + + return false; + }); + + //卡片大叉删除交互 + $(".card_delete_icon").hover( + function(){ + $(this).removeClass("card_delete"); + $(this).addClass("card_delete_hover"); + }, + function(){ + $(this).removeClass("card_delete_hover"); + $(this).addClass("card_delete"); + } + ); + $(".card_delete_icon").bind("click", function(){ + card_2_delete_id = $(this).parent().attr("id").replace('index_card_', ''); + }); + + //点击编辑icon(small) || click 'edit_icon'(big) + $(".small_edit_icon, .edit_icon").bind("click", function(){ + var this_card = $(this).closest(".index_card"); + var this_edit_data_div = this_card.find(".edit_data"); + var this_editing_data_div = this_edit_data_div.siblings(".editing_data"); + var this_edit_icon_container_div = this_edit_data_div.siblings(".edit_icon_container"); + this_edit_data_div.hide(); + this_edit_icon_container_div.hide(); + this_editing_data_div.show(); + return false; + }); + + //点击取消icon + $(".cancel_edit_icon").bind("click", function(){ + var id = $(this).closest(".index_card").attr("id").replace('index_card_', ''); + var this_editing_data_div = $(this).parent(); + var this_edit_data_div = this_editing_data_div.siblings(".edit_data"); + var this_edit_icon_container_div = this_editing_data_div.siblings(".edit_icon_container"); + this_editing_data_div.hide(); + this_edit_data_div.show(); + if (recordempty['id'+id]) { + // record empty + this_edit_icon_container_div.show(); + } + return false; + }); + + // initialize + // empty data input + $(".data_input").val(''); + // unselect radio buttons + if ($(".editing_data .radio_input").length) { + $(".radio_input input:radio").prop("checked", false); + } + + // validate data and qtip2 {{{ + $(".index_card").each(function() { + var this_card = $(this); + var id = this_card.attr("id").replace('index_card_', ''); + var data_type = datatypes['id'+id]; + //console.log("id: "+id+"; data_type: "+data_type); + var confine = confines['id'+id]; + + // data {{{ + if (data_type == DATA_TYPES_JS.INTEGER_TYPE) { + // INTEGER_TYPE + // TODO + } + else if (data_type == DATA_TYPES_JS.FLOAT_TYPE) { // {{{ + // FLOAT_TYPE + var datainput_help = '<p>定值型</p><p>数据格式示例:123.7; 1.23e4; 3.5e-2</p>'; + // tooltip + $(this).find(".data_input").qtip({ + id: 'datainput_'+id, + prerender: false, + content: { + text: datainput_help + }, + position: { + my: 'bottom left', + at: 'top right' + }, + show: { + event: 'mouseenter' + }, + hide: { + event: 'mouseleave unfocus' + } + }); + this_card.find(".data_input").focus(function() { + $(this).removeClass("valid invalid"); + }); + // validate + this_card.find(".data_input").on('validate', null, function() { + var value_str = $(this).val(); + var value = is_float(value_str); + if (value === false) { + // format invalid + $(this).removeClass("valid"); + $(this).addClass("invalid"); + var qtip_content = '<p>数据格式不符合要求,请检查后重新输入</p>'; + $(this).qtip('api').set('content.text', qtip_content); + $(this).qtip('api').show(); + } + else { + // format valid + // check confine + if (value >= confine.math_min && + value <= confine.math_max) { + // confine valid + $(this).removeClass("invalid"); + $(this).addClass("valid"); + var qtip_content = datainput_help; + $(this).qtip('api').set('content.text', qtip_content); + $(this).qtip('api').hide(); + // update data + record_data.value = value; + } + else { + // confine tooltip + $(this).removeClass("valid"); + $(this).addClass("invalid"); + var qtip_content = '<p>数值超出范围</p><p>允许数据范围:'+confine.math_range_html+' </p>'; + $(this).qtip('api').set('content.text', + qtip_content); + $(this).qtip('api').show(); + } + } + }); + this_card.find(".data_input").on('blur', null, function() { + $(this).trigger('validate'); + }); + } // }}} + else if (data_type == DATA_TYPES_JS.RANGE_TYPE) { // {{{ + // RANGE_TYPE + var datainput_help = '<p>范围型</p><p>数据格式示例:• <123.7; • >1.3e3; • 1.5e3 ~ 3.7e3</p>'; + // tooltip + this_card.find(".data_input").qtip({ + id: 'datainput_'+id, + prerender: false, + content: { + text: datainput_help + }, + position: { + my: 'bottom left', + at: 'top right' + }, + show: { + event: 'mouseenter' + }, + hide: { + event: 'mouseleave unfocus' + } + }); + this_card.find(".data_input").focus(function() { + $(this).removeClass("valid invalid"); + }); + // validate + this_card.find(".data_input").on('validate', null, function() { + var value_str = $(this).val(); + var value = is_range(value_str); + if (is_range(value_str) === false) { + // format invalid + $(this).removeClass("valid"); + $(this).addClass("invalid"); + var qtip_content = '<p>数据格式不符合要求,请检查后重新输入</p>'; + $(this).qtip('api').set('content.text', qtip_content); + $(this).qtip('api').show(); + } + else { + // range format valid + // check if within 'confine' + var confine_valid = false; + var val_min = null; + var val_max = null; + + var operator = value.operator; + if (operator === '<') { + val_max = value.value; + if (val_max > confine.math_min && + val_max <= confine.math_max) { + // valid + confine_valid = true; + val_min = confine.math_min; + } + } + else if (operator === '>') { + val_min = value.value; + if (val_min >= confine.math_min && + val_min < confine.math_max) { + // valid + confine_valid = true; + val_max = confine.math_max; + } + } + else if (operator === '~') { + val_min = value.val_min; + val_max = value.val_max; + if (val_min >= confine.math_min && + val_max < confine.math_max) { + // valid + confine_valid = true; + } + } + else { + confine_valid = false; + } + + if (confine_valid === true) { + $(this).removeClass("invalid"); + $(this).addClass("valid"); + var qtip_content = datainput_help; + $(this).qtip('api').set('content.text', + qtip_content); + $(this).qtip('api').hide(); + // update data + record_data.val_min = val_min; + record_data.val_max = val_max; + } + else { + // data not within range + $(this).removeClass("valid"); + $(this).addClass("invalid"); + var qtip_content = '<p>数值超出范围</p><p>允许数据范围:'+confine.math_range_html+' </p>'; + $(this).qtip('api').set('content.text', + qtip_content); + $(this).qtip('api').show(); + } + } + }); + this_card.find(".data_input").on('blur', null, function() { + $(this).trigger('validate'); + }); + } // RANGE_TYPE }}} + else if (data_type == DATA_TYPES_JS.FLOAT_RANGE_TYPE) { + // TODO + } + else if (data_type == DATA_TYPES_JS.PM_TYPE) { // {{{ + // TODO + var radioinput_help = '<p>请直接点击选择</p>'; + // tooltip + this_card.find(".radio_input").qtip({ + id: 'radioinput_'+id, + prerender: false, + content: { + text: radioinput_help + }, + position: { + my: 'bottom left', + at: 'top right' + }, + show: { + event: 'mouseenter' + }, + hide: { + event: 'mouseleave unfocus' + } + }); + // validate + this_card.find(".radio_input").on('validate', null, function() { + if (this_card.find(".radio_input input:radio:checked").length != 1) { + var qtip_content = '<p>请选择化验结果</p>'; + $(this).qtip('api').set('content.text', + qtip_content); + $(this).qtip('api').show(); + } + else { + // valid + var qtip_content = radioinput_help; + $(this).qtip('api').set('content.text', + qtip_content); + $(this).qtip('api').hide(); + // update data + record_data.value = this_card.find(".radio_input input:radio:checked").val(); + } + }); + } // }}} + else { + // unknown + return false; + } + // }}} + + // date {{{ + // date_input tooltip + var dateinput_help = '<p>日期格式:YYYY-MM-DD; 如:2013-08-26</p><p>日期不能晚于<strong>今天</strong></p>'; + this_card.find(".date_input").qtip({ + id: 'dateinput_'+id, + prerender: false, + content: { + text: dateinput_help + }, + position: { + my: 'left top', + at: 'right bottom' + }, + show: { + event: 'mouseenter' + }, + hide: { + event: 'mouseleave unfocus' + } + }); + this_card.find(".date_input").focus(function() { + $(this).removeClass("valid invalid"); + // show help tooltip + //var qtip_content = dateinput_help; + //$(this).qtip('api').set('content.text', qtip_content); + //$(this).qtip('api').show(); + }); + // validate + this_card.find(".date_input").on('validate', null, function() { + var date_str = $(this).val(); + var date_mm = moment(date_str, 'YYYY-MM-DD'); + var today_mm = moment(); + //console.log('date_str: ', date_str); + // date cannot beyond today + if (date_mm.isValid() && !date_mm.isAfter(today_mm)) { + $(this).removeClass("invalid"); + $(this).addClass("valid"); + var qtip_content = dateinput_help; + $(this).qtip('api').set('content.text', qtip_content); + $(this).qtip('api').hide(); + // update data + record_data.date = date_str; + } + else { + // date invalid + $(this).removeClass("valid"); + $(this).addClass("invalid"); + var qtip_content = '<p>请检查输入日期的格式,并且日期不能晚于<strong>今天</strong></p>'; + $(this).qtip('api').set('content.text', qtip_content); + $(this).qtip('api').show(); + } + }); + this_card.find(".date_input").on('change blur', null, function() { + $(this).trigger('validate'); + }); + // }}} + }); + // }}} + + //点击提交icon + $(".confirm_edit_icon").bind("click", function(){ + var this_editing_data_div = $(this).closest(".editing_data"); + var card = $(this).closest(".index_card"); + var id = card.attr("id").replace('index_card_', ''); + // validate data before submit + this_editing_data_div.find(".to_validate").trigger('validate'); + if (this_editing_data_div.find(".invalid").length) { + // XXX: tooltip/popup + return false; + } + + // submit data (AJAX) {{{ + var time = moment().valueOf(); + $.ajax({ + type: 'post', + url: indicator_url + 'ajax/add_record/', + data: { + csrfmiddlewaretoken: document.getElementsByName('csrfmiddlewaretoken')[0].value, + indicator_id: id, + date: record_data.date, + value: record_data.value, + val_min: record_data.val_min, + val_max: record_data.val_max, + time: time + }, + dataType: 'json', + success: function(dataJson) { + if (dataJson.failed == true) { + // failed: tooltip + if (dataJson.error_code === 20) { + // 'record_exist'; given date has record + var date_input = card.find(".date_input"); + date_input.removeClass("valid"); + date_input.addClass("invalid"); + var qtip_content = '<p>该日期已存在记录,请检查</p>'; + date_input.qtip('api').set('content.text', qtip_content); + date_input.qtip('api').show(); + } + else { + // XXX: other error + var data_input = card.find(".data_input"); + data_input.removeClass("valid"); + data_input.addClass("invalid"); + var qtip_content = '<p>输入记录不符合要求,请检查</p>'; + data_input.qtip('api').set('content.text', qtip_content); + data_input.qtip('api').show(); + } + } + else { + // successfully added record + // remove 'record_empty' class + card.removeClass("record_empty"); + var this_edit_data_div = this_editing_data_div.siblings(".edit_data"); + this_editing_data_div.hide(); + this_edit_data_div.show(); + // last_edit_data & last_edit_date (std_unit) + var this_last_edit_data_div = this_edit_data_div.find(".last_edit_data"); + var this_last_edit_date_div = this_edit_data_div.find(".last_edit_date"); + this_last_edit_data_div.children(".data_value").html(dataJson.value_html); + this_last_edit_date_div.children(".date_value").html(dataJson.date); + this_last_edit_data_div.show(); + this_last_edit_date_div.show(); + // explain_icon + this_edit_data_div.find(".nodata_icon").hide(); + this_edit_data_div.find(".lastdata_icon").show(); + // refresh_icon + this_edit_data_div.find(".refresh_icon").show(); + // edit_icon_container & chart + this_editing_data_div.siblings(".edit_icon_container").hide(); + this_editing_data_div.siblings(".chart").show(); + } + } + }); + // }}} + + return false; + }); + + //日期控件 + $(".datepicker_container>.datepicker").datepicker({ + showOn: "both", + buttonImage: static_url + "images/calendar.png", + buttonImageOnly: true, + maxDate: now_js + }); + $(".datepicker_container>.datepicker").datepicker("setDate", now_js); + + //时间范围控制(开始时间<结束时间) + $("#search_begin_date").datepicker({ + showOn: "both", + buttonImage: static_url + "images/calendar.png", + buttonImageOnly: true, + onClose: function( selectedDate ) { + $("#search_end_date").datepicker("option", "minDate", selectedDate); + } + }); + $("#search_end_date").datepicker({ + showOn: "both", + buttonImage: static_url + "images/calendar.png", + buttonImageOnly: true, + onClose: function( selectedDate ) { + $("#search_begin_date").datepicker("option", "maxDate", selectedDate); + } + }); +}); + +// +function delete_card(){ + var card = $("#index_card_"+card_2_delete_id); + card.nextAll().each(function(){ + if($(this).hasClass("index_card_fir")){ + $(this).removeClass("index_card_fir"); + $(this).addClass("index_card_sec"); + }else if($(this).hasClass("index_card_sec")){ + $(this).removeClass("index_card_sec"); + $(this).addClass("index_card_fir"); + } + }); + card.remove(); +} + +// check if a string is float number // {{{ +function is_float(str) { + // regex for fixed notation float number + var fix_regex = /^([+-]?)(\d+|\d+(\.\d*)?|\d*\.\d+)$/; + // regex for exponential notation float number + var exp_regex = /^([+-]?)(\d+|\d+(\.\d*)?|\d*\.\d+)[eE]([+-]?)\d+$/;; + + str = str || ""; + var str_orig = str; + //console.log('str_orig: "'+str_orig+'"'); + // remove the blank on the head and tail + str = str.replace(/(^\s*|\s*$)/g, ''); + // remove blank between sign and number + str = str.replace(/^([+-]?)\s*/, '$1'); + //console.log('str: "'+str+'"'); + // valid str can only contains '[\d.]', '[+-]?', and '[eE]?' + if (fix_regex.test(str) || exp_regex.test(str)) { + // true + return parseFloat(str); + } + else { + return false; + } +} +// }}} + +// check if a string is valid range +// a) '< num'; b) '> num'; c) 'low ~ high' (range_symbol) // {{{ +function is_range(str) { + if (typeof range_symbol === 'undefined') { + range_symbol = '~'; + } + str = str || ""; + var str_orig = str; + + str = str.replace(/(^\s*|\s*$)/g, ''); + var operator = str.charAt(0); + if (operator === '<' || operator === '>') { + // strip the first char + str = str.replace(/^./, ''); + var value = is_float(str); + if (value === false) { + return false; + } + else { + return {'operator': operator, 'value': value}; + } + } + else { + // not case 'a)' & 'b)' + var str_splited = str.split(range_symbol); + if (str_splited.length == 2) { + var val_min = is_float(str_splited[0]); + var val_max = is_float(str_splited[1]); + if (val_min !== false && val_max !== false + && val_min < val_max) { + // valid + operator = range_symbol; + return {'operator': operator, + 'val_min': val_min, + 'val_max': val_max }; + } + else { + return false; + } + } + else { + // invalid + return false + } + } +} +// }}} + +// vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=javascript: // diff --git a/97suifangqa/apps/indicator/static/javascripts/sheetdefault.js b/97suifangqa/apps/indicator/static/javascripts/sheetdefault.js deleted file mode 100644 index 7148e5e..0000000 --- a/97suifangqa/apps/indicator/static/javascripts/sheetdefault.js +++ /dev/null @@ -1,184 +0,0 @@ -$(document).ready(function(){ - //不允许input框复制,减少验证粘帖的交互 - $("input[type='text']").bind("paste", function(){ - return false; - }); - - //副标题点大叉 - $("#index_title_closed_icon").bind("click", function(){ - var closeBtn = $(this); - var date = new Date(); - var time = date.getTime(); - $.ajax({ //数据库还是cookie,都可以,建议使用cookie,html中是否显示sub_title也由后端读取的cookie决定 - type: 'get', - url: indicator_url + 'ajax/close_sub_title', - data: 'time='+time, - success: function(data){ - if(data == 'success'){ - closeBtn.parent().remove(); - } - } - }); - - return false; - }); - - //卡片大叉删除交互 - $(".card_delete_icon").hover( - function(){ - $(this).removeClass("card_delete"); - $(this).addClass("card_delete_hover"); - }, - function(){ - $(this).removeClass("card_delete_hover"); - $(this).addClass("card_delete"); - } - ); - $(".card_delete_icon").bind("click", function(){ - card_2_delete_id = $(this).parent().attr("id").replace('index_card_', ''); - }); - - //点击编辑icon - $(".small_edit_icon").bind("click", function(){ - var this_edit_data_div = $(this).parent(); - var this_select_date_div = this_edit_data_div.siblings(".select_date"); - var this_refresh_data_div = this_edit_data_div.siblings(".refresh_data"); - var this_last_edit_data_div = $(this).siblings(".last_edit_data"); - var this_editing_data_div = this_edit_data_div.siblings(".editing_data"); - var input_container = this_editing_data_div.children(".input_container"); - var data_fir = this_last_edit_data_div.children(".data_fir").text(); - var data_sec = this_last_edit_data_div.children(".data_sec").text(); - input_container.children(".edit_input_main").val(parseInt(data_fir)); - input_container.children(".edit_input_sub").val(parseInt(data_sec)); - this_editing_data_div.show(); - this_select_date_div.show(); - this_edit_data_div.hide(); - this_refresh_data_div.hide(); - return false; - }); - //点击指数+1 icon - $(".add_icon").bind("click", function(){ - var this_edit_input_sub = $(this).closest(".editing_data").children(".input_container").children(".edit_input_sub"); - var origin_value = parseInt(this_edit_input_sub.val()); - this_edit_input_sub.val(origin_value+1); - return false; - }); - //点击 指数-1 icon - $(".minus_icon").bind("click", function(){ - var this_edit_input_sub = $(this).closest(".editing_data").children(".input_container").children(".edit_input_sub"); - var origin_value = parseInt(this_edit_input_sub.val()); - var after_value = origin_value-1; - if(after_value >= 0){ - this_edit_input_sub.val(origin_value-1); - } - return false; - }); - //编辑数据的底数验证:只允许两位小数,非空 - $(".edit_input_main").bind("keyup", function(){ - var val = $(this).val(); - val = val.replace(/[^\d.]/g,"");//清除"数字"和"."以外的字符 - val = val.replace(/^\./g,"");//验证第一个字符是数字而不是.. - val = val.replace(/\.{2,}/g,".");//只保留第一个. 清除多余的 - val = val.replace(".","$#$").replace(/\./g,"").replace("$#$","."); - val = val.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3'); - $(this).val(val); - return false; - }); - //编辑数据的指数验证:只允许整数 - $(".edit_input_sub").bind("keyup", function(){ - $(this).val($(this).val().replace(/[^\d]/g, '')); - return false; - }); - //点击取消icon - $(".cancel_edit_icon").bind("click", function(){ - var input_container = $(this).siblings(".input_container"); - input_container.children(".edit_input_main").val(''); - input_container.children(".edit_input_sub").val(''); - var this_editing_data_div = $(this).parent(); - this_editing_data_div.siblings(".edit_data").show(); - this_editing_data_div.siblings(".refresh_data").show(); - this_editing_data_div.hide(); - this_editing_data_div.siblings(".select_date").hide(); - return false; - }); - //点击提交icon - $(".confirm_edit_icon").bind("click", function(){ - var input_container = $(this).siblings(".input_container"); - var data_input_fir = input_container.children(".edit_input_main"); - var data_input_sec = input_container.children(".edit_input_sub"); - var data_input_fir_val = data_input_fir.val(); - var data_input_sec_val = data_input_sec.val(); - if(data_input_fir_val == '' || data_input_fir_val == 0){ - data_input_fir.addClass("error"); - }else{ - data_input_fir.removeClass("error"); - } - if(data_input_sec_val == ''){ - data_input_sec.addClass("error"); - }else{ - data_input_sec.removeClass("error"); - } - if($(".error").length > 0){ - return false; - } - - //TODO ajax - data_input_fir.val(''); - data_input_sec.val(''); - var this_editing_data_div = $(this).parent(); - var this_select_date_div = this_editing_data_div.siblings(".select_date"); - var this_refresh_data_div = this_editing_data_div.siblings(".refresh_data"); - var this_edit_data_div = this_editing_data_div.siblings(".edit_data"); - var this_last_edit_div = this_edit_data_div.children(".last_edit_data"); - this_last_edit_div.show(); - this_last_edit_div.children(".data_fir").html(data_input_fir_val); - this_last_edit_div.children(".data_sec").html(data_input_sec_val); - this_editing_data_div.hide(); - this_select_date_div.hide(); - this_edit_data_div.show(); - this_refresh_data_div.show(); - - return false; - }); - - //日期控件 - $(".select_date>.datepicker").datepicker({ - showOn: "both", - buttonImage: static_url + "images/calendar.png", - buttonImageOnly: true - }); - - //时间范围控制(开始时间<结束时间) - $("#search_begin_date").datepicker({ - showOn: "both", - buttonImage: static_url + "images/calendar.png", - buttonImageOnly: true, - onClose: function( selectedDate ) { - $("#search_end_date").datepicker("option", "minDate", selectedDate); - } - }); - $("#search_end_date").datepicker({ - showOn: "both", - buttonImage: static_url + "images/calendar.png", - buttonImageOnly: true, - onClose: function( selectedDate ) { - $("#search_begin_date").datepicker("option", "maxDate", selectedDate); - } - }); -}); - -function delete_card(){ - var card = $("#index_card_"+card_2_delete_id); - card.nextAll().each(function(){ - if($(this).hasClass("index_card_fir")){ - $(this).removeClass("index_card_fir"); - $(this).addClass("index_card_sec"); - }else if($(this).hasClass("index_card_sec")){ - $(this).removeClass("index_card_sec"); - $(this).addClass("index_card_fir"); - } - }); - card.remove(); -} - -// vim: set ts=4 sw=4 tw=0 fenc=utf-8 ft=javascript: // diff --git a/97suifangqa/apps/indicator/static/plugins/datepicker/datepicker.css b/97suifangqa/apps/indicator/static/plugins/datepicker/datepicker.css index 5732386..45b7bfc 100644 --- a/97suifangqa/apps/indicator/static/plugins/datepicker/datepicker.css +++ b/97suifangqa/apps/indicator/static/plugins/datepicker/datepicker.css @@ -58,14 +58,14 @@ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } .ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } .ui-widget-content a { color: #333333; } -.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } +.ui-widget-header { border: 1px solid #b8db71; background: #99CC33; color: #ffffff; font-weight: bold; } .ui-widget-header a { color: #ffffff; } /* Interaction states ----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #4c4948; } .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #006699; background: #cce0eb; font-weight: bold; color: #006699; } .ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } @@ -324,7 +324,7 @@ */ .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } -.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; cursor: pointer;} .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } .ui-datepicker .ui-datepicker-prev { left:2px; } .ui-datepicker .ui-datepicker-next { right:2px; } diff --git a/97suifangqa/apps/indicator/static/plugins/datepicker/datepicker.js b/97suifangqa/apps/indicator/static/plugins/datepicker/datepicker.js index 964b5cc..8370ab4 100644 --- a/97suifangqa/apps/indicator/static/plugins/datepicker/datepicker.js +++ b/97suifangqa/apps/indicator/static/plugins/datepicker/datepicker.js @@ -1,5257 +1,5257 @@ -/*! - * jQuery UI 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function(a, b) { - function d(b) { - return ! a(b).parents().andSelf().filter(function() { - return a.curCSS(this, "visibility") === "hidden" || a.expr.filters.hidden(this) - }).length - } - function c(b, c) { - var e = b.nodeName.toLowerCase(); - if ("area" === e) { - var f = b.parentNode, - g = f.name, - h; - if (!b.href || !g || f.nodeName.toLowerCase() !== "map") return ! 1; - h = a("img[usemap=#" + g + "]")[0]; - return !! h && d(h) - } - return (/input|select|textarea|button|object/.test(e) ? !b.disabled: "a" == e ? b.href || c: c) && d(b) - } - a.ui = a.ui || {}; - a.ui.version || (a.extend(a.ui, { - version: "1.8.18", - keyCode: { - ALT: 18, - BACKSPACE: 8, - CAPS_LOCK: 20, - COMMA: 188, - COMMAND: 91, - COMMAND_LEFT: 91, - COMMAND_RIGHT: 93, - CONTROL: 17, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - INSERT: 45, - LEFT: 37, - MENU: 93, - NUMPAD_ADD: 107, - NUMPAD_DECIMAL: 110, - NUMPAD_DIVIDE: 111, - NUMPAD_ENTER: 108, - NUMPAD_MULTIPLY: 106, - NUMPAD_SUBTRACT: 109, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SHIFT: 16, - SPACE: 32, - TAB: 9, - UP: 38, - WINDOWS: 91 - } - }), a.fn.extend({ - propAttr: a.fn.prop || a.fn.attr, - _focus: a.fn.focus, - focus: function(b, c) { - return typeof b == "number" ? this.each(function() { - var d = this; - setTimeout(function() { - a(d).focus(), - c && c.call(d) - }, - b) - }) : this._focus.apply(this, arguments) - }, - scrollParent: function() { - var b; - a.browser.msie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? b = this.parents().filter(function() { - return /(relative|absolute|fixed)/.test(a.curCSS(this, "position", 1)) && /(auto|scroll)/.test(a.curCSS(this, "overflow", 1) + a.curCSS(this, "overflow-y", 1) + a.curCSS(this, "overflow-x", 1)) - }).eq(0) : b = this.parents().filter(function() { - return /(auto|scroll)/.test(a.curCSS(this, "overflow", 1) + a.curCSS(this, "overflow-y", 1) + a.curCSS(this, "overflow-x", 1)) - }).eq(0); - return /fixed/.test(this.css("position")) || !b.length ? a(document) : b - }, - zIndex: function(c) { - if (c !== b) return this.css("zIndex", c); - if (this.length) { - var d = a(this[0]), - e, - f; - while (d.length && d[0] !== document) { - e = d.css("position"); - if (e === "absolute" || e === "relative" || e === "fixed") { - f = parseInt(d.css("zIndex"), 10); - if (!isNaN(f) && f !== 0) return f - } - d = d.parent() - } - } - return 0 - }, - disableSelection: function() { - return this.bind((a.support.selectstart ? "selectstart": "mousedown") + ".ui-disableSelection", - function(a) { - a.preventDefault() - }) - }, - enableSelection: function() { - return this.unbind(".ui-disableSelection") - } - }), a.each(["Width", "Height"], - function(c, d) { - function h(b, c, d, f) { - a.each(e, - function() { - c -= parseFloat(a.curCSS(b, "padding" + this, !0)) || 0, - d && (c -= parseFloat(a.curCSS(b, "border" + this + "Width", !0)) || 0), - f && (c -= parseFloat(a.curCSS(b, "margin" + this, !0)) || 0) - }); - return c - } - var e = d === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], - f = d.toLowerCase(), - g = { - innerWidth: a.fn.innerWidth, - innerHeight: a.fn.innerHeight, - outerWidth: a.fn.outerWidth, - outerHeight: a.fn.outerHeight - }; - a.fn["inner" + d] = function(c) { - if (c === b) return g["inner" + d].call(this); - return this.each(function() { - a(this).css(f, h(this, c) + "px") - }) - }, - a.fn["outer" + d] = function(b, c) { - if (typeof b != "number") return g["outer" + d].call(this, b); - return this.each(function() { - a(this).css(f, h(this, b, !0, c) + "px") - }) - } - }), a.extend(a.expr[":"], { - data: function(b, c, d) { - return !! a.data(b, d[3]) - }, - focusable: function(b) { - return c(b, !isNaN(a.attr(b, "tabindex"))) - }, - tabbable: function(b) { - var d = a.attr(b, "tabindex"), - e = isNaN(d); - return (e || d >= 0) && c(b, !e) - } - }), a(function() { - var b = document.body, - c = b.appendChild(c = document.createElement("div")); - c.offsetHeight, - a.extend(c.style, { - minHeight: "100px", - height: "auto", - padding: 0, - borderWidth: 0 - }), - a.support.minHeight = c.offsetHeight === 100, - a.support.selectstart = "onselectstart" in c, - b.removeChild(c).style.display = "none" - }), a.extend(a.ui, { - plugin: { - add: function(b, c, d) { - var e = a.ui[b].prototype; - for (var f in d) e.plugins[f] = e.plugins[f] || [], - e.plugins[f].push([c, d[f]]) - }, - call: function(a, b, c) { - var d = a.plugins[b]; - if ( !! d && !!a.element[0].parentNode) for (var e = 0; e < d.length; e++) a.options[d[e][0]] && d[e][1].apply(a.element, c) - } - }, - contains: function(a, b) { - return document.compareDocumentPosition ? a.compareDocumentPosition(b) & 16 : a !== b && a.contains(b) - }, - hasScroll: function(b, c) { - if (a(b).css("overflow") === "hidden") return ! 1; - var d = c && c === "left" ? "scrollLeft": "scrollTop", - e = !1; - if (b[d] > 0) return ! 0; - b[d] = 1, - e = b[d] > 0, - b[d] = 0; - return e - }, - isOverAxis: function(a, b, c) { - return a > b && a < b + c - }, - isOver: function(b, c, d, e, f, g) { - return a.ui.isOverAxis(b, d, f) && a.ui.isOverAxis(c, e, g) - } - })) -})(jQuery); -/*! - * jQuery UI Widget 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Widget - */ -(function(a, b) { - if (a.cleanData) { - var c = a.cleanData; - a.cleanData = function(b) { - for (var d = 0, - e; (e = b[d]) != null; d++) try { - a(e).triggerHandler("remove") - } catch(f) {} - c(b) - } - } else { - var d = a.fn.remove; - a.fn.remove = function(b, c) { - return this.each(function() { - c || (!b || a.filter(b, [this]).length) && a("*", this).add([this]).each(function() { - try { - a(this).triggerHandler("remove") - } catch(b) {} - }); - return d.call(a(this), b, c) - }) - } - } - a.widget = function(b, c, d) { - var e = b.split(".")[0], - f; - b = b.split(".")[1], - f = e + "-" + b, - d || (d = c, c = a.Widget), - a.expr[":"][f] = function(c) { - return !! a.data(c, b) - }, - a[e] = a[e] || {}, - a[e][b] = function(a, b) { - arguments.length && this._createWidget(a, b) - }; - var g = new c; - g.options = a.extend(!0, {}, - g.options), - a[e][b].prototype = a.extend(!0, g, { - namespace: e, - widgetName: b, - widgetEventPrefix: a[e][b].prototype.widgetEventPrefix || b, - widgetBaseClass: f - }, - d), - a.widget.bridge(b, a[e][b]) - }, - a.widget.bridge = function(c, d) { - a.fn[c] = function(e) { - var f = typeof e == "string", - g = Array.prototype.slice.call(arguments, 1), - h = this; - e = !f && g.length ? a.extend.apply(null, [!0, e].concat(g)) : e; - if (f && e.charAt(0) === "_") return h; - f ? this.each(function() { - var d = a.data(this, c), - f = d && a.isFunction(d[e]) ? d[e].apply(d, g) : d; - if (f !== d && f !== b) { - h = f; - return ! 1 - } - }) : this.each(function() { - var b = a.data(this, c); - b ? b.option(e || {})._init() : a.data(this, c, new d(e, this)) - }); - return h - } - }, - a.Widget = function(a, b) { - arguments.length && this._createWidget(a, b) - }, - a.Widget.prototype = { - widgetName: "widget", - widgetEventPrefix: "", - options: { - disabled: !1 - }, - _createWidget: function(b, c) { - a.data(c, this.widgetName, this), - this.element = a(c), - this.options = a.extend(!0, {}, - this.options, this._getCreateOptions(), b); - var d = this; - this.element.bind("remove." + this.widgetName, - function() { - d.destroy() - }), - this._create(), - this._trigger("create"), - this._init() - }, - _getCreateOptions: function() { - return a.metadata && a.metadata.get(this.element[0])[this.widgetName] - }, - _create: function() {}, - _init: function() {}, - destroy: function() { - this.element.unbind("." + this.widgetName).removeData(this.widgetName), - this.widget().unbind("." + this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass + "-disabled " + "ui-state-disabled") - }, - widget: function() { - return this.element - }, - option: function(c, d) { - var e = c; - if (arguments.length === 0) return a.extend({}, - this.options); - if (typeof c == "string") { - if (d === b) return this.options[c]; - e = {}, - e[c] = d - } - this._setOptions(e); - return this - }, - _setOptions: function(b) { - var c = this; - a.each(b, - function(a, b) { - c._setOption(a, b) - }); - return this - }, - _setOption: function(a, b) { - this.options[a] = b, - a === "disabled" && this.widget()[b ? "addClass": "removeClass"](this.widgetBaseClass + "-disabled" + " " + "ui-state-disabled").attr("aria-disabled", b); - return this - }, - enable: function() { - return this._setOption("disabled", !1) - }, - disable: function() { - return this._setOption("disabled", !0) - }, - _trigger: function(b, c, d) { - var e, f, g = this.options[b]; - d = d || {}, - c = a.Event(c), - c.type = (b === this.widgetEventPrefix ? b: this.widgetEventPrefix + b).toLowerCase(), - c.target = this.element[0], - f = c.originalEvent; - if (f) for (e in f) e in c || (c[e] = f[e]); - this.element.trigger(c, d); - return ! (a.isFunction(g) && g.call(this.element[0], c, d) === !1 || c.isDefaultPrevented()) - } - } -})(jQuery); -/*! - * jQuery UI Mouse 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Mouse - * - * Depends: - * jquery.ui.widget.js - */ -(function(a, b) { - var c = !1; - a(document).mouseup(function(a) { - c = !1 - }), - a.widget("ui.mouse", { - options: { - cancel: ":input,option", - distance: 1, - delay: 0 - }, - _mouseInit: function() { - var b = this; - this.element.bind("mousedown." + this.widgetName, - function(a) { - return b._mouseDown(a) - }).bind("click." + this.widgetName, - function(c) { - if (!0 === a.data(c.target, b.widgetName + ".preventClickEvent")) { - a.removeData(c.target, b.widgetName + ".preventClickEvent"), - c.stopImmediatePropagation(); - return ! 1 - } - }), - this.started = !1 - }, - _mouseDestroy: function() { - this.element.unbind("." + this.widgetName) - }, - _mouseDown: function(b) { - if (!c) { - this._mouseStarted && this._mouseUp(b), - this._mouseDownEvent = b; - var d = this, - e = b.which == 1, - f = typeof this.options.cancel == "string" && b.target.nodeName ? a(b.target).closest(this.options.cancel).length: !1; - if (!e || f || !this._mouseCapture(b)) return ! 0; - this.mouseDelayMet = !this.options.delay, - this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function() { - d.mouseDelayMet = !0 - }, - this.options.delay)); - if (this._mouseDistanceMet(b) && this._mouseDelayMet(b)) { - this._mouseStarted = this._mouseStart(b) !== !1; - if (!this._mouseStarted) { - b.preventDefault(); - return ! 0 - } - } ! 0 === a.data(b.target, this.widgetName + ".preventClickEvent") && a.removeData(b.target, this.widgetName + ".preventClickEvent"), - this._mouseMoveDelegate = function(a) { - return d._mouseMove(a) - }, - this._mouseUpDelegate = function(a) { - return d._mouseUp(a) - }, - a(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), - b.preventDefault(), - c = !0; - return ! 0 - } - }, - _mouseMove: function(b) { - if (a.browser.msie && !(document.documentMode >= 9) && !b.button) return this._mouseUp(b); - if (this._mouseStarted) { - this._mouseDrag(b); - return b.preventDefault() - } - this._mouseDistanceMet(b) && this._mouseDelayMet(b) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, b) !== !1, this._mouseStarted ? this._mouseDrag(b) : this._mouseUp(b)); - return ! this._mouseStarted - }, - _mouseUp: function(b) { - a(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), - this._mouseStarted && (this._mouseStarted = !1, b.target == this._mouseDownEvent.target && a.data(b.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(b)); - return ! 1 - }, - _mouseDistanceMet: function(a) { - return Math.max(Math.abs(this._mouseDownEvent.pageX - a.pageX), Math.abs(this._mouseDownEvent.pageY - a.pageY)) >= this.options.distance - }, - _mouseDelayMet: function(a) { - return this.mouseDelayMet - }, - _mouseStart: function(a) {}, - _mouseDrag: function(a) {}, - _mouseStop: function(a) {}, - _mouseCapture: function(a) { - return ! 0 - } - }) -})(jQuery); -/* - * jQuery UI Position 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Position - */ -(function(a, b) { - a.ui = a.ui || {}; - var c = /left|center|right/, - d = /top|center|bottom/, - e = "center", - f = {}, - g = a.fn.position, - h = a.fn.offset; - a.fn.position = function(b) { - if (!b || !b.of) return g.apply(this, arguments); - b = a.extend({}, - b); - var h = a(b.of), - i = h[0], - j = (b.collision || "flip").split(" "), - k = b.offset ? b.offset.split(" ") : [0, 0], - l, - m, - n; - i.nodeType === 9 ? (l = h.width(), m = h.height(), n = { - top: 0, - left: 0 - }) : i.setTimeout ? (l = h.width(), m = h.height(), n = { - top: h.scrollTop(), - left: h.scrollLeft() - }) : i.preventDefault ? (b.at = "left top", l = m = 0, n = { - top: b.of.pageY, - left: b.of.pageX - }) : (l = h.outerWidth(), m = h.outerHeight(), n = h.offset()), - a.each(["my", "at"], - function() { - var a = (b[this] || "").split(" "); - a.length === 1 && (a = c.test(a[0]) ? a.concat([e]) : d.test(a[0]) ? [e].concat(a) : [e, e]), - a[0] = c.test(a[0]) ? a[0] : e, - a[1] = d.test(a[1]) ? a[1] : e, - b[this] = a - }), - j.length === 1 && (j[1] = j[0]), - k[0] = parseInt(k[0], 10) || 0, - k.length === 1 && (k[1] = k[0]), - k[1] = parseInt(k[1], 10) || 0, - b.at[0] === "right" ? n.left += l: b.at[0] === e && (n.left += l / 2), - b.at[1] === "bottom" ? n.top += m: b.at[1] === e && (n.top += m / 2), - n.left += k[0], - n.top += k[1]; - return this.each(function() { - var c = a(this), - d = c.outerWidth(), - g = c.outerHeight(), - h = parseInt(a.curCSS(this, "marginLeft", !0)) || 0, - i = parseInt(a.curCSS(this, "marginTop", !0)) || 0, - o = d + h + (parseInt(a.curCSS(this, "marginRight", !0)) || 0), - p = g + i + (parseInt(a.curCSS(this, "marginBottom", !0)) || 0), - q = a.extend({}, - n), - r; - b.my[0] === "right" ? q.left -= d: b.my[0] === e && (q.left -= d / 2), - b.my[1] === "bottom" ? q.top -= g: b.my[1] === e && (q.top -= g / 2), - f.fractions || (q.left = Math.round(q.left), q.top = Math.round(q.top)), - r = { - left: q.left - h, - top: q.top - i - }, - a.each(["left", "top"], - function(c, e) { - a.ui.position[j[c]] && a.ui.position[j[c]][e](q, { - targetWidth: l, - targetHeight: m, - elemWidth: d, - elemHeight: g, - collisionPosition: r, - collisionWidth: o, - collisionHeight: p, - offset: k, - my: b.my, - at: b.at - }) - }), - a.fn.bgiframe && c.bgiframe(), - c.offset(a.extend(q, { - using: b.using - })) - }) - }, - a.ui.position = { - fit: { - left: function(b, c) { - var d = a(window), - e = c.collisionPosition.left + c.collisionWidth - d.width() - d.scrollLeft(); - b.left = e > 0 ? b.left - e: Math.max(b.left - c.collisionPosition.left, b.left) - }, - top: function(b, c) { - var d = a(window), - e = c.collisionPosition.top + c.collisionHeight - d.height() - d.scrollTop(); - b.top = e > 0 ? b.top - e: Math.max(b.top - c.collisionPosition.top, b.top) - } - }, - flip: { - left: function(b, c) { - if (c.at[0] !== e) { - var d = a(window), - f = c.collisionPosition.left + c.collisionWidth - d.width() - d.scrollLeft(), - g = c.my[0] === "left" ? -c.elemWidth: c.my[0] === "right" ? c.elemWidth: 0, - h = c.at[0] === "left" ? c.targetWidth: -c.targetWidth, - i = -2 * c.offset[0]; - b.left += c.collisionPosition.left < 0 ? g + h + i: f > 0 ? g + h + i: 0 - } - }, - top: function(b, c) { - if (c.at[1] !== e) { - var d = a(window), - f = c.collisionPosition.top + c.collisionHeight - d.height() - d.scrollTop(), - g = c.my[1] === "top" ? -c.elemHeight: c.my[1] === "bottom" ? c.elemHeight: 0, - h = c.at[1] === "top" ? c.targetHeight: -c.targetHeight, - i = -2 * c.offset[1]; - b.top += c.collisionPosition.top < 0 ? g + h + i: f > 0 ? g + h + i: 0 - } - } - } - }, - a.offset.setOffset || (a.offset.setOffset = function(b, c) { / static / .test(a.curCSS(b, "position")) && (b.style.position = "relative"); - var d = a(b), - e = d.offset(), - f = parseInt(a.curCSS(b, "top", !0), 10) || 0, - g = parseInt(a.curCSS(b, "left", !0), 10) || 0, - h = { - top: c.top - e.top + f, - left: c.left - e.left + g - }; - "using" in c ? c.using.call(b, h) : d.css(h) - }, - a.fn.offset = function(b) { - var c = this[0]; - if (!c || !c.ownerDocument) return null; - if (b) return this.each(function() { - a.offset.setOffset(this, b) - }); - return h.call(this) - }), - function() { - var b = document.getElementsByTagName("body")[0], - c = document.createElement("div"), - d, - e, - g, - h, - i; - d = document.createElement(b ? "div": "body"), - g = { - visibility: "hidden", - width: 0, - height: 0, - border: 0, - margin: 0, - background: "none" - }, - b && a.extend(g, { - position: "absolute", - left: "-1000px", - top: "-1000px" - }); - for (var j in g) d.style[j] = g[j]; - d.appendChild(c), - e = b || document.documentElement, - e.insertBefore(d, e.firstChild), - c.style.cssText = "position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;", - h = a(c).offset(function(a, b) { - return b - }).offset(), - d.innerHTML = "", - e.removeChild(d), - i = h.top + h.left + (b ? 2e3: 0), - f.fractions = i > 21 && i < 22 - } () -})(jQuery); -/* - * jQuery UI Draggable 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Draggables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function(a, b) { - a.widget("ui.draggable", a.ui.mouse, { - widgetEventPrefix: "drag", - options: { - addClasses: !0, - appendTo: "parent", - axis: !1, - - connectToSortable: !1, - containment: !1, - cursor: "auto", - cursorAt: !1, - grid: !1, - handle: !1, - helper: "original", - iframeFix: !1, - opacity: !1, - refreshPositions: !1, - revert: !1, - revertDuration: 500, - scope: "default", - scroll: !0, - scrollSensitivity: 20, - scrollSpeed: 20, - snap: !1, - snapMode: "both", - snapTolerance: 20, - stack: !1, - zIndex: !1 - }, - _create: function() { - this.options.helper == "original" && !/^(?:r|a|f)/.test(this.element.css("position")) && (this.element[0].style.position = "relative"), - this.options.addClasses && this.element.addClass("ui-draggable"), - this.options.disabled && this.element.addClass("ui-draggable-disabled"), - this._mouseInit() - }, - destroy: function() { - if ( !! this.element.data("draggable")) { - this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"), - this._mouseDestroy(); - return this - } - }, - _mouseCapture: function(b) { - var c = this.options; - if (this.helper || c.disabled || a(b.target).is(".ui-resizable-handle")) return ! 1; - this.handle = this._getHandle(b); - if (!this.handle) return ! 1; - c.iframeFix && a(c.iframeFix === !0 ? "iframe": c.iframeFix).each(function() { - a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({ - width: this.offsetWidth + "px", - height: this.offsetHeight + "px", - position: "absolute", - opacity: "0.001", - zIndex: 1e3 - }).css(a(this).offset()).appendTo("body") - }); - return ! 0 - }, - _mouseStart: function(b) { - var c = this.options; - this.helper = this._createHelper(b), - this._cacheHelperProportions(), - a.ui.ddmanager && (a.ui.ddmanager.current = this), - this._cacheMargins(), - this.cssPosition = this.helper.css("position"), - this.scrollParent = this.helper.scrollParent(), - this.offset = this.positionAbs = this.element.offset(), - this.offset = { - top: this.offset.top - this.margins.top, - left: this.offset.left - this.margins.left - }, - a.extend(this.offset, { - click: { - left: b.pageX - this.offset.left, - top: b.pageY - this.offset.top - }, - parent: this._getParentOffset(), - relative: this._getRelativeOffset() - }), - this.originalPosition = this.position = this._generatePosition(b), - this.originalPageX = b.pageX, - this.originalPageY = b.pageY, - c.cursorAt && this._adjustOffsetFromHelper(c.cursorAt), - c.containment && this._setContainment(); - if (this._trigger("start", b) === !1) { - this._clear(); - return ! 1 - } - this._cacheHelperProportions(), - a.ui.ddmanager && !c.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b), - this.helper.addClass("ui-draggable-dragging"), - this._mouseDrag(b, !0), - a.ui.ddmanager && a.ui.ddmanager.dragStart(this, b); - return ! 0 - }, - _mouseDrag: function(b, c) { - this.position = this._generatePosition(b), - this.positionAbs = this._convertPositionTo("absolute"); - if (!c) { - var d = this._uiHash(); - if (this._trigger("drag", b, d) === !1) { - this._mouseUp({}); - return ! 1 - } - this.position = d.position - } - if (!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left + "px"; - if (!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top + "px"; - a.ui.ddmanager && a.ui.ddmanager.drag(this, b); - return ! 1 - }, - _mouseStop: function(b) { - var c = !1; - a.ui.ddmanager && !this.options.dropBehaviour && (c = a.ui.ddmanager.drop(this, b)), - this.dropped && (c = this.dropped, this.dropped = !1); - if ((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original") return ! 1; - if (this.options.revert == "invalid" && !c || this.options.revert == "valid" && c || this.options.revert === !0 || a.isFunction(this.options.revert) && this.options.revert.call(this.element, c)) { - var d = this; - a(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), - function() { - d._trigger("stop", b) !== !1 && d._clear() - }) - } else this._trigger("stop", b) !== !1 && this._clear(); - return ! 1 - }, - _mouseUp: function(b) { - this.options.iframeFix === !0 && a("div.ui-draggable-iframeFix").each(function() { - this.parentNode.removeChild(this) - }), - a.ui.ddmanager && a.ui.ddmanager.dragStop(this, b); - return a.ui.mouse.prototype._mouseUp.call(this, b) - }, - cancel: function() { - this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(); - return this - }, - _getHandle: function(b) { - var c = !this.options.handle || !a(this.options.handle, this.element).length ? !0 : !1; - a(this.options.handle, this.element).find("*").andSelf().each(function() { - this == b.target && (c = !0) - }); - return c - }, - _createHelper: function(b) { - var c = this.options, - d = a.isFunction(c.helper) ? a(c.helper.apply(this.element[0], [b])) : c.helper == "clone" ? this.element.clone().removeAttr("id") : this.element; - d.parents("body").length || d.appendTo(c.appendTo == "parent" ? this.element[0].parentNode: c.appendTo), - d[0] != this.element[0] && !/(fixed|absolute)/.test(d.css("position")) && d.css("position", "absolute"); - return d - }, - _adjustOffsetFromHelper: function(b) { - typeof b == "string" && (b = b.split(" ")), - a.isArray(b) && (b = { - left: +b[0], - top: +b[1] || 0 - }), - "left" in b && (this.offset.click.left = b.left + this.margins.left), - "right" in b && (this.offset.click.left = this.helperProportions.width - b.right + this.margins.left), - "top" in b && (this.offset.click.top = b.top + this.margins.top), - "bottom" in b && (this.offset.click.top = this.helperProportions.height - b.bottom + this.margins.top) - }, - _getParentOffset: function() { - this.offsetParent = this.helper.offsetParent(); - var b = this.offsetParent.offset(); - this.cssPosition == "absolute" && this.scrollParent[0] != document && a.ui.contains(this.scrollParent[0], this.offsetParent[0]) && (b.left += this.scrollParent.scrollLeft(), b.top += this.scrollParent.scrollTop()); - if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && a.browser.msie) b = { - top: 0, - left: 0 - }; - return { - top: b.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), - left: b.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) - } - }, - _getRelativeOffset: function() { - if (this.cssPosition == "relative") { - var a = this.element.position(); - return { - top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), - left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft() - } - } - return { - top: 0, - left: 0 - } - }, - _cacheMargins: function() { - this.margins = { - left: parseInt(this.element.css("marginLeft"), 10) || 0, - top: parseInt(this.element.css("marginTop"), 10) || 0, - right: parseInt(this.element.css("marginRight"), 10) || 0, - bottom: parseInt(this.element.css("marginBottom"), 10) || 0 - } - }, - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() - } - }, - _setContainment: function() { - var b = this.options; - b.containment == "parent" && (b.containment = this.helper[0].parentNode); - if (b.containment == "document" || b.containment == "window") this.containment = [b.containment == "document" ? 0 : a(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, b.containment == "document" ? 0 : a(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, (b.containment == "document" ? 0 : a(window).scrollLeft()) + a(b.containment == "document" ? document: window).width() - this.helperProportions.width - this.margins.left, (b.containment == "document" ? 0 : a(window).scrollTop()) + (a(b.containment == "document" ? document: window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; - if (!/^(document|window|parent)$/.test(b.containment) && b.containment.constructor != Array) { - var c = a(b.containment), - d = c[0]; - if (!d) return; - var e = c.offset(), - f = a(d).css("overflow") != "hidden"; - this.containment = [(parseInt(a(d).css("borderLeftWidth"), 10) || 0) + (parseInt(a(d).css("paddingLeft"), 10) || 0), (parseInt(a(d).css("borderTopWidth"), 10) || 0) + (parseInt(a(d).css("paddingTop"), 10) || 0), (f ? Math.max(d.scrollWidth, d.offsetWidth) : d.offsetWidth) - (parseInt(a(d).css("borderLeftWidth"), 10) || 0) - (parseInt(a(d).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (f ? Math.max(d.scrollHeight, d.offsetHeight) : d.offsetHeight) - (parseInt(a(d).css("borderTopWidth"), 10) || 0) - (parseInt(a(d).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], - this.relative_container = c - } else b.containment.constructor == Array && (this.containment = b.containment) - }, - _convertPositionTo: function(b, c) { - c || (c = this.position); - var d = b == "absolute" ? 1 : -1, - e = this.options, - f = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent: this.scrollParent, - g = /(html|body)/i.test(f[0].tagName); - return { - top: c.top + this.offset.relative.top * d + this.offset.parent.top * d - (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : g ? 0 : f.scrollTop()) * d), - left: c.left + this.offset.relative.left * d + this.offset.parent.left * d - (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : g ? 0 : f.scrollLeft()) * d) - } - }, - _generatePosition: function(b) { - var c = this.options, - d = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent: this.scrollParent, - e = /(html|body)/i.test(d[0].tagName), - f = b.pageX, - g = b.pageY; - if (this.originalPosition) { - var h; - if (this.containment) { - if (this.relative_container) { - var i = this.relative_container.offset(); - h = [this.containment[0] + i.left, this.containment[1] + i.top, this.containment[2] + i.left, this.containment[3] + i.top] - } else h = this.containment; - b.pageX - this.offset.click.left < h[0] && (f = h[0] + this.offset.click.left), - b.pageY - this.offset.click.top < h[1] && (g = h[1] + this.offset.click.top), - b.pageX - this.offset.click.left > h[2] && (f = h[2] + this.offset.click.left), - b.pageY - this.offset.click.top > h[3] && (g = h[3] + this.offset.click.top) - } - if (c.grid) { - var j = c.grid[1] ? this.originalPageY + Math.round((g - this.originalPageY) / c.grid[1]) * c.grid[1] : this.originalPageY; - g = h ? j - this.offset.click.top < h[1] || j - this.offset.click.top > h[3] ? j - this.offset.click.top < h[1] ? j + c.grid[1] : j - c.grid[1] : j: j; - var k = c.grid[0] ? this.originalPageX + Math.round((f - this.originalPageX) / c.grid[0]) * c.grid[0] : this.originalPageX; - f = h ? k - this.offset.click.left < h[0] || k - this.offset.click.left > h[2] ? k - this.offset.click.left < h[0] ? k + c.grid[0] : k - c.grid[0] : k: k - } - } - return { - top: g - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : d.scrollTop()), - left: f - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : d.scrollLeft()) - } - }, - _clear: function() { - this.helper.removeClass("ui-draggable-dragging"), - this.helper[0] != this.element[0] && !this.cancelHelperRemoval && this.helper.remove(), - this.helper = null, - this.cancelHelperRemoval = !1 - }, - _trigger: function(b, c, d) { - d = d || this._uiHash(), - a.ui.plugin.call(this, b, [c, d]), - b == "drag" && (this.positionAbs = this._convertPositionTo("absolute")); - return a.Widget.prototype._trigger.call(this, b, c, d) - }, - plugins: {}, - _uiHash: function(a) { - return { - helper: this.helper, - position: this.position, - originalPosition: this.originalPosition, - offset: this.positionAbs - } - } - }), - a.extend(a.ui.draggable, { - version: "1.8.18" - }), - a.ui.plugin.add("draggable", "connectToSortable", { - start: function(b, c) { - var d = a(this).data("draggable"), - e = d.options, - f = a.extend({}, - c, { - item: d.element - }); - d.sortables = [], - a(e.connectToSortable).each(function() { - var c = a.data(this, "sortable"); - c && !c.options.disabled && (d.sortables.push({ - instance: c, - shouldRevert: c.options.revert - }), c.refreshPositions(), c._trigger("activate", b, f)) - }) - }, - stop: function(b, c) { - var d = a(this).data("draggable"), - e = a.extend({}, - c, { - item: d.element - }); - a.each(d.sortables, - function() { - this.instance.isOver ? (this.instance.isOver = 0, d.cancelHelperRemoval = !0, this.instance.cancelHelperRemoval = !1, this.shouldRevert && (this.instance.options.revert = !0), this.instance._mouseStop(b), this.instance.options.helper = this.instance.options._helper, d.options.helper == "original" && this.instance.currentItem.css({ - top: "auto", - left: "auto" - })) : (this.instance.cancelHelperRemoval = !1, this.instance._trigger("deactivate", b, e)) - }) - }, - drag: function(b, c) { - var d = a(this).data("draggable"), - e = this, - f = function(b) { - var c = this.offset.click.top, - d = this.offset.click.left, - e = this.positionAbs.top, - f = this.positionAbs.left, - g = b.height, - h = b.width, - i = b.top, - j = b.left; - return a.ui.isOver(e + c, f + d, i, j, g, h) - }; - a.each(d.sortables, - function(f) { - this.instance.positionAbs = d.positionAbs, - this.instance.helperProportions = d.helperProportions, - this.instance.offset.click = d.offset.click, - this.instance._intersectsWith(this.instance.containerCache) ? (this.instance.isOver || (this.instance.isOver = 1, this.instance.currentItem = a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item", !0), this.instance.options._helper = this.instance.options.helper, this.instance.options.helper = function() { - return c.helper[0] - }, - b.target = this.instance.currentItem[0], this.instance._mouseCapture(b, !0), this.instance._mouseStart(b, !0, !0), this.instance.offset.click.top = d.offset.click.top, this.instance.offset.click.left = d.offset.click.left, this.instance.offset.parent.left -= d.offset.parent.left - this.instance.offset.parent.left, this.instance.offset.parent.top -= d.offset.parent.top - this.instance.offset.parent.top, d._trigger("toSortable", b), d.dropped = this.instance.element, d.currentItem = d.element, this.instance.fromOutside = d), this.instance.currentItem && this.instance._mouseDrag(b)) : this.instance.isOver && (this.instance.isOver = 0, this.instance.cancelHelperRemoval = !0, this.instance.options.revert = !1, this.instance._trigger("out", b, this.instance._uiHash(this.instance)), this.instance._mouseStop(b, !0), this.instance.options.helper = this.instance.options._helper, this.instance.currentItem.remove(), this.instance.placeholder && this.instance.placeholder.remove(), d._trigger("fromSortable", b), d.dropped = !1) - }) - } - }), - a.ui.plugin.add("draggable", "cursor", { - start: function(b, c) { - var d = a("body"), - e = a(this).data("draggable").options; - d.css("cursor") && (e._cursor = d.css("cursor")), - d.css("cursor", e.cursor) - }, - stop: function(b, c) { - var d = a(this).data("draggable").options; - d._cursor && a("body").css("cursor", d._cursor) - } - }), - a.ui.plugin.add("draggable", "opacity", { - start: function(b, c) { - var d = a(c.helper), - e = a(this).data("draggable").options; - d.css("opacity") && (e._opacity = d.css("opacity")), - d.css("opacity", e.opacity) - }, - stop: function(b, c) { - var d = a(this).data("draggable").options; - d._opacity && a(c.helper).css("opacity", d._opacity) - } - }), - a.ui.plugin.add("draggable", "scroll", { - start: function(b, c) { - var d = a(this).data("draggable"); - d.scrollParent[0] != document && d.scrollParent[0].tagName != "HTML" && (d.overflowOffset = d.scrollParent.offset()) - }, - drag: function(b, c) { - var d = a(this).data("draggable"), - e = d.options, - f = !1; - if (d.scrollParent[0] != document && d.scrollParent[0].tagName != "HTML") { - if (!e.axis || e.axis != "x") d.overflowOffset.top + d.scrollParent[0].offsetHeight - b.pageY < e.scrollSensitivity ? d.scrollParent[0].scrollTop = f = d.scrollParent[0].scrollTop + e.scrollSpeed: b.pageY - d.overflowOffset.top < e.scrollSensitivity && (d.scrollParent[0].scrollTop = f = d.scrollParent[0].scrollTop - e.scrollSpeed); - if (!e.axis || e.axis != "y") d.overflowOffset.left + d.scrollParent[0].offsetWidth - b.pageX < e.scrollSensitivity ? d.scrollParent[0].scrollLeft = f = d.scrollParent[0].scrollLeft + e.scrollSpeed: b.pageX - d.overflowOffset.left < e.scrollSensitivity && (d.scrollParent[0].scrollLeft = f = d.scrollParent[0].scrollLeft - e.scrollSpeed) - } else { - if (!e.axis || e.axis != "x") b.pageY - a(document).scrollTop() < e.scrollSensitivity ? f = a(document).scrollTop(a(document).scrollTop() - e.scrollSpeed) : a(window).height() - (b.pageY - a(document).scrollTop()) < e.scrollSensitivity && (f = a(document).scrollTop(a(document).scrollTop() + e.scrollSpeed)); - if (!e.axis || e.axis != "y") b.pageX - a(document).scrollLeft() < e.scrollSensitivity ? f = a(document).scrollLeft(a(document).scrollLeft() - e.scrollSpeed) : a(window).width() - (b.pageX - a(document).scrollLeft()) < e.scrollSensitivity && (f = a(document).scrollLeft(a(document).scrollLeft() + e.scrollSpeed)) - } - f !== !1 && a.ui.ddmanager && !e.dropBehaviour && a.ui.ddmanager.prepareOffsets(d, b) - } - }), - a.ui.plugin.add("draggable", "snap", { - start: function(b, c) { - var d = a(this).data("draggable"), - e = d.options; - d.snapElements = [], - a(e.snap.constructor != String ? e.snap.items || ":data(draggable)": e.snap).each(function() { - var b = a(this), - c = b.offset(); - this != d.element[0] && d.snapElements.push({ - item: this, - width: b.outerWidth(), - height: b.outerHeight(), - top: c.top, - left: c.left - }) - }) - }, - drag: function(b, c) { - var d = a(this).data("draggable"), - e = d.options, - f = e.snapTolerance, - g = c.offset.left, - h = g + d.helperProportions.width, - i = c.offset.top, - j = i + d.helperProportions.height; - for (var k = d.snapElements.length - 1; k >= 0; k--) { - var l = d.snapElements[k].left, - m = l + d.snapElements[k].width, - n = d.snapElements[k].top, - o = n + d.snapElements[k].height; - if (! (l - f < g && g < m + f && n - f < i && i < o + f || l - f < g && g < m + f && n - f < j && j < o + f || l - f < h && h < m + f && n - f < i && i < o + f || l - f < h && h < m + f && n - f < j && j < o + f)) { - d.snapElements[k].snapping && d.options.snap.release && d.options.snap.release.call(d.element, b, a.extend(d._uiHash(), { - snapItem: d.snapElements[k].item - })), - d.snapElements[k].snapping = !1; - continue - } - if (e.snapMode != "inner") { - var p = Math.abs(n - j) <= f, - q = Math.abs(o - i) <= f, - r = Math.abs(l - h) <= f, - s = Math.abs(m - g) <= f; - p && (c.position.top = d._convertPositionTo("relative", { - top: n - d.helperProportions.height, - left: 0 - }).top - d.margins.top), - q && (c.position.top = d._convertPositionTo("relative", { - top: o, - left: 0 - }).top - d.margins.top), - r && (c.position.left = d._convertPositionTo("relative", { - top: 0, - left: l - d.helperProportions.width - }).left - d.margins.left), - s && (c.position.left = d._convertPositionTo("relative", { - top: 0, - left: m - }).left - d.margins.left) - } - var t = p || q || r || s; - if (e.snapMode != "outer") { - var p = Math.abs(n - i) <= f, - q = Math.abs(o - j) <= f, - r = Math.abs(l - g) <= f, - s = Math.abs(m - h) <= f; - p && (c.position.top = d._convertPositionTo("relative", { - top: n, - left: 0 - }).top - d.margins.top), - q && (c.position.top = d._convertPositionTo("relative", { - top: o - d.helperProportions.height, - left: 0 - }).top - d.margins.top), - r && (c.position.left = d._convertPositionTo("relative", { - top: 0, - left: l - }).left - d.margins.left), - s && (c.position.left = d._convertPositionTo("relative", { - top: 0, - left: m - d.helperProportions.width - }).left - d.margins.left) - } ! d.snapElements[k].snapping && (p || q || r || s || t) && d.options.snap.snap && d.options.snap.snap.call(d.element, b, a.extend(d._uiHash(), { - snapItem: d.snapElements[k].item - })), - d.snapElements[k].snapping = p || q || r || s || t - } - } - }), - a.ui.plugin.add("draggable", "stack", { - start: function(b, c) { - var d = a(this).data("draggable").options, - e = a.makeArray(a(d.stack)).sort(function(b, c) { - return (parseInt(a(b).css("zIndex"), 10) || 0) - (parseInt(a(c).css("zIndex"), 10) || 0) - }); - if ( !! e.length) { - var f = parseInt(e[0].style.zIndex) || 0; - a(e).each(function(a) { - this.style.zIndex = f + a - }), - this[0].style.zIndex = f + e.length - } - } - }), - a.ui.plugin.add("draggable", "zIndex", { - start: function(b, c) { - var d = a(c.helper), - e = a(this).data("draggable").options; - d.css("zIndex") && (e._zIndex = d.css("zIndex")), - d.css("zIndex", e.zIndex) - }, - stop: function(b, c) { - var d = a(this).data("draggable").options; - d._zIndex && a(c.helper).css("zIndex", d._zIndex) - } - }) -})(jQuery); -/* - * jQuery UI Droppable 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Droppables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.widget.js - * jquery.ui.mouse.js - * jquery.ui.draggable.js - */ -(function(a, b) { - a.widget("ui.droppable", { - widgetEventPrefix: "drop", - options: { - accept: "*", - activeClass: !1, - addClasses: !0, - greedy: !1, - hoverClass: !1, - scope: "default", - tolerance: "intersect" - }, - _create: function() { - var b = this.options, - c = b.accept; - this.isover = 0, - this.isout = 1, - this.accept = a.isFunction(c) ? c: function(a) { - return a.is(c) - }, - this.proportions = { - width: this.element[0].offsetWidth, - height: this.element[0].offsetHeight - }, - a.ui.ddmanager.droppables[b.scope] = a.ui.ddmanager.droppables[b.scope] || [], - a.ui.ddmanager.droppables[b.scope].push(this), - b.addClasses && this.element.addClass("ui-droppable") - }, - destroy: function() { - var b = a.ui.ddmanager.droppables[this.options.scope]; - for (var c = 0; c < b.length; c++) b[c] == this && b.splice(c, 1); - this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable"); - return this - }, - _setOption: function(b, c) { - b == "accept" && (this.accept = a.isFunction(c) ? c: function(a) { - return a.is(c) - }), - a.Widget.prototype._setOption.apply(this, arguments) - }, - _activate: function(b) { - var c = a.ui.ddmanager.current; - this.options.activeClass && this.element.addClass(this.options.activeClass), - c && this._trigger("activate", b, this.ui(c)) - }, - _deactivate: function(b) { - var c = a.ui.ddmanager.current; - this.options.activeClass && this.element.removeClass(this.options.activeClass), - c && this._trigger("deactivate", b, this.ui(c)) - }, - _over: function(b) { - var c = a.ui.ddmanager.current; !! c && (c.currentItem || c.element)[0] != this.element[0] && this.accept.call(this.element[0], c.currentItem || c.element) && (this.options.hoverClass && this.element.addClass(this.options.hoverClass), this._trigger("over", b, this.ui(c))) - }, - _out: function(b) { - var c = a.ui.ddmanager.current; !! c && (c.currentItem || c.element)[0] != this.element[0] && this.accept.call(this.element[0], c.currentItem || c.element) && (this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("out", b, this.ui(c))) - }, - _drop: function(b, c) { - var d = c || a.ui.ddmanager.current; - if (!d || (d.currentItem || d.element)[0] == this.element[0]) return ! 1; - var e = !1; - this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() { - var b = a.data(this, "droppable"); - if (b.options.greedy && !b.options.disabled && b.options.scope == d.options.scope && b.accept.call(b.element[0], d.currentItem || d.element) && a.ui.intersect(d, a.extend(b, { - offset: b.element.offset() - }), b.options.tolerance)) { - e = !0; - return ! 1 - } - }); - if (e) return ! 1; - if (this.accept.call(this.element[0], d.currentItem || d.element)) { - this.options.activeClass && this.element.removeClass(this.options.activeClass), - this.options.hoverClass && this.element.removeClass(this.options.hoverClass), - this._trigger("drop", b, this.ui(d)); - return this.element - } - return ! 1 - }, - ui: function(a) { - return { - draggable: a.currentItem || a.element, - helper: a.helper, - position: a.position, - offset: a.positionAbs - } - } - }), - a.extend(a.ui.droppable, { - version: "1.8.18" - }), - a.ui.intersect = function(b, c, d) { - if (!c.offset) return ! 1; - var e = (b.positionAbs || b.position.absolute).left, - f = e + b.helperProportions.width, - g = (b.positionAbs || b.position.absolute).top, - h = g + b.helperProportions.height, - i = c.offset.left, - j = i + c.proportions.width, - k = c.offset.top, - l = k + c.proportions.height; - switch (d) { - case "fit": - return i <= e && f <= j && k <= g && h <= l; - case "intersect": - return i < e + b.helperProportions.width / 2 && f - b.helperProportions.width / 2 < j && k < g + b.helperProportions.height / 2 && h - b.helperProportions.height / 2 < l; - case "pointer": - var m = (b.positionAbs || b.position.absolute).left + (b.clickOffset || b.offset.click).left, - n = (b.positionAbs || b.position.absolute).top + (b.clickOffset || b.offset.click).top, - o = a.ui.isOver(n, m, k, i, c.proportions.height, c.proportions.width); - return o; - case "touch": - return (g >= k && g <= l || h >= k && h <= l || g < k && h > l) && (e >= i && e <= j || f >= i && f <= j || e < i && f > j); - default: - return ! 1 - } - }, - a.ui.ddmanager = { - current: null, - droppables: { - "default": [] - }, - prepareOffsets: function(b, c) { - var d = a.ui.ddmanager.droppables[b.options.scope] || [], - e = c ? c.type: null, - f = (b.currentItem || b.element).find(":data(droppable)").andSelf(); - droppablesLoop: for (var g = 0; g < d.length; g++) { - if (d[g].options.disabled || b && !d[g].accept.call(d[g].element[0], b.currentItem || b.element)) continue; - for (var h = 0; h < f.length; h++) if (f[h] == d[g].element[0]) { - d[g].proportions.height = 0; - continue droppablesLoop - } - d[g].visible = d[g].element.css("display") != "none"; - if (!d[g].visible) continue; - e == "mousedown" && d[g]._activate.call(d[g], c), - d[g].offset = d[g].element.offset(), - d[g].proportions = { - width: d[g].element[0].offsetWidth, - height: d[g].element[0].offsetHeight - } - } - }, - drop: function(b, c) { - var d = !1; - a.each(a.ui.ddmanager.droppables[b.options.scope] || [], - function() { ! this.options || (!this.options.disabled && this.visible && a.ui.intersect(b, this, this.options.tolerance) && (d = this._drop.call(this, c) || d), !this.options.disabled && this.visible && this.accept.call(this.element[0], b.currentItem || b.element) && (this.isout = 1, this.isover = 0, this._deactivate.call(this, c))) - }); - return d - }, - dragStart: function(b, c) { - b.element.parents(":not(body,html)").bind("scroll.droppable", - function() { - b.options.refreshPositions || a.ui.ddmanager.prepareOffsets(b, c) - }) - }, - drag: function(b, c) { - b.options.refreshPositions && a.ui.ddmanager.prepareOffsets(b, c), - a.each(a.ui.ddmanager.droppables[b.options.scope] || [], - function() { - if (! (this.options.disabled || this.greedyChild || !this.visible)) { - var d = a.ui.intersect(b, this, this.options.tolerance), - e = !d && this.isover == 1 ? "isout": d && this.isover == 0 ? "isover": null; - if (!e) return; - var f; - if (this.options.greedy) { - var g = this.element.parents(":data(droppable):eq(0)"); - g.length && (f = a.data(g[0], "droppable"), f.greedyChild = e == "isover" ? 1 : 0) - } - f && e == "isover" && (f.isover = 0, f.isout = 1, f._out.call(f, c)), - this[e] = 1, - this[e == "isout" ? "isover": "isout"] = 0, - this[e == "isover" ? "_over": "_out"].call(this, c), - f && e == "isout" && (f.isout = 0, f.isover = 1, f._over.call(f, c)) - } - }) - }, - dragStop: function(b, c) { - b.element.parents(":not(body,html)").unbind("scroll.droppable"), - b.options.refreshPositions || a.ui.ddmanager.prepareOffsets(b, c) - } - } -})(jQuery); -/* - * jQuery UI Resizable 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Resizables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function(a, b) { - a.widget("ui.resizable", a.ui.mouse, { - widgetEventPrefix: "resize", - options: { - alsoResize: !1, - animate: !1, - animateDuration: "slow", - animateEasing: "swing", - aspectRatio: !1, - autoHide: !1, - containment: !1, - ghost: !1, - grid: !1, - handles: "e,s,se", - helper: !1, - maxHeight: null, - maxWidth: null, - minHeight: 10, - minWidth: 10, - zIndex: 1e3 - }, - _create: function() { - var b = this, - c = this.options; - this.element.addClass("ui-resizable"), - a.extend(this, { - _aspectRatio: !!c.aspectRatio, - aspectRatio: c.aspectRatio, - originalElement: this.element, - _proportionallyResizeElements: [], - _helper: c.helper || c.ghost || c.animate ? c.helper || "ui-resizable-helper": null - }), - this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i) && (this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({ - position: this.element.css("position"), - width: this.element.outerWidth(), - height: this.element.outerHeight(), - top: this.element.css("top"), - left: this.element.css("left") - })), this.element = this.element.parent().data("resizable", this.element.data("resizable")), this.elementIsWrapper = !0, this.element.css({ - marginLeft: this.originalElement.css("marginLeft"), - marginTop: this.originalElement.css("marginTop"), - marginRight: this.originalElement.css("marginRight"), - marginBottom: this.originalElement.css("marginBottom") - }), this.originalElement.css({ - marginLeft: 0, - marginTop: 0, - marginRight: 0, - marginBottom: 0 - }), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({ - position: "static", - zoom: 1, - display: "block" - })), this.originalElement.css({ - margin: this.originalElement.css("margin") - }), this._proportionallyResize()), - this.handles = c.handles || (a(".ui-resizable-handle", this.element).length ? { - n: ".ui-resizable-n", - e: ".ui-resizable-e", - s: ".ui-resizable-s", - w: ".ui-resizable-w", - se: ".ui-resizable-se", - sw: ".ui-resizable-sw", - ne: ".ui-resizable-ne", - nw: ".ui-resizable-nw" - }: "e,s,se"); - if (this.handles.constructor == String) { - this.handles == "all" && (this.handles = "n,e,s,w,se,sw,ne,nw"); - var d = this.handles.split(","); - this.handles = {}; - for (var e = 0; e < d.length; e++) { - var f = a.trim(d[e]), - g = "ui-resizable-" + f, - h = a('<div class="ui-resizable-handle ' + g + '"></div>'); - /sw|se|ne|nw/.test(f) && h.css({ - zIndex: ++c.zIndex - }), - "se" == f && h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"), - this.handles[f] = ".ui-resizable-" + f, - this.element.append(h) - } - } - this._renderAxis = function(b) { - b = b || this.element; - for (var c in this.handles) { - this.handles[c].constructor == String && (this.handles[c] = a(this.handles[c], this.element).show()); - if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) { - var d = a(this.handles[c], this.element), - e = 0; - e = /sw|ne|nw|se|n|s/.test(c) ? d.outerHeight() : d.outerWidth(); - var f = ["padding", /ne|nw|n/.test(c) ? "Top": /se|sw|s/.test(c) ? "Bottom": /^e$/.test(c) ? "Right": "Left"].join(""); - b.css(f, e), - this._proportionallyResize() - } - if (!a(this.handles[c]).length) continue - } - }, - this._renderAxis(this.element), - this._handles = a(".ui-resizable-handle", this.element).disableSelection(), - this._handles.mouseover(function() { - if (!b.resizing) { - if (this.className) var a = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); - b.axis = a && a[1] ? a[1] : "se" - } - }), - c.autoHide && (this._handles.hide(), a(this.element).addClass("ui-resizable-autohide").hover(function() { - c.disabled || (a(this).removeClass("ui-resizable-autohide"), b._handles.show()) - }, - function() { - c.disabled || b.resizing || (a(this).addClass("ui-resizable-autohide"), b._handles.hide()) - })), - this._mouseInit() - }, - destroy: function() { - this._mouseDestroy(); - var b = function(b) { - a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove() - }; - if (this.elementIsWrapper) { - b(this.element); - var c = this.element; - c.after(this.originalElement.css({ - position: c.css("position"), - width: c.outerWidth(), - height: c.outerHeight(), - top: c.css("top"), - left: c.css("left") - })).remove() - } - this.originalElement.css("resize", this.originalResizeStyle), - b(this.originalElement); - return this - }, - _mouseCapture: function(b) { - var c = !1; - for (var d in this.handles) a(this.handles[d])[0] == b.target && (c = !0); - return ! this.options.disabled && c - }, - _mouseStart: function(b) { - var d = this.options, - e = this.element.position(), - f = this.element; - this.resizing = !0, - this.documentScroll = { - top: a(document).scrollTop(), - left: a(document).scrollLeft() - }, - (f.is(".ui-draggable") || /absolute/.test(f.css("position"))) && f.css({ - position: "absolute", - top: e.top, - left: e.left - }), - this._renderProxy(); - var g = c(this.helper.css("left")), - h = c(this.helper.css("top")); - d.containment && (g += a(d.containment).scrollLeft() || 0, h += a(d.containment).scrollTop() || 0), - this.offset = this.helper.offset(), - this.position = { - left: g, - top: h - }, - this.size = this._helper ? { - width: f.outerWidth(), - height: f.outerHeight() - }: { - width: f.width(), - height: f.height() - }, - this.originalSize = this._helper ? { - width: f.outerWidth(), - height: f.outerHeight() - }: { - width: f.width(), - height: f.height() - }, - this.originalPosition = { - left: g, - top: h - }, - this.sizeDiff = { - width: f.outerWidth() - f.width(), - height: f.outerHeight() - f.height() - }, - this.originalMousePosition = { - left: b.pageX, - top: b.pageY - }, - this.aspectRatio = typeof d.aspectRatio == "number" ? d.aspectRatio: this.originalSize.width / this.originalSize.height || 1; - var i = a(".ui-resizable-" + this.axis).css("cursor"); - a("body").css("cursor", i == "auto" ? this.axis + "-resize": i), - f.addClass("ui-resizable-resizing"), - this._propagate("start", b); - return ! 0 - }, - _mouseDrag: function(b) { - var c = this.helper, - d = this.options, - e = {}, - f = this, - g = this.originalMousePosition, - h = this.axis, - i = b.pageX - g.left || 0, - j = b.pageY - g.top || 0, - k = this._change[h]; - if (!k) return ! 1; - var l = k.apply(this, [b, i, j]), - m = a.browser.msie && a.browser.version < 7, - n = this.sizeDiff; - this._updateVirtualBoundaries(b.shiftKey); - if (this._aspectRatio || b.shiftKey) l = this._updateRatio(l, b); - l = this._respectSize(l, b), - this._propagate("resize", b), - c.css({ - top: this.position.top + "px", - left: this.position.left + "px", - width: this.size.width + "px", - height: this.size.height + "px" - }), - !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), - this._updateCache(l), - this._trigger("resize", b, this.ui()); - return ! 1 - }, - _mouseStop: function(b) { - this.resizing = !1; - var c = this.options, - d = this; - if (this._helper) { - var e = this._proportionallyResizeElements, - f = e.length && /textarea/i.test(e[0].nodeName), - g = f && a.ui.hasScroll(e[0], "left") ? 0 : d.sizeDiff.height, - h = f ? 0 : d.sizeDiff.width, - i = { - width: d.helper.width() - h, - height: d.helper.height() - g - }, - j = parseInt(d.element.css("left"), 10) + (d.position.left - d.originalPosition.left) || null, - k = parseInt(d.element.css("top"), 10) + (d.position.top - d.originalPosition.top) || null; - c.animate || this.element.css(a.extend(i, { - top: k, - left: j - })), - d.helper.height(d.size.height), - d.helper.width(d.size.width), - this._helper && !c.animate && this._proportionallyResize() - } - a("body").css("cursor", "auto"), - this.element.removeClass("ui-resizable-resizing"), - this._propagate("stop", b), - this._helper && this.helper.remove(); - return ! 1 - }, - _updateVirtualBoundaries: function(a) { - var b = this.options, - c, e, f, g, h; - h = { - minWidth: d(b.minWidth) ? b.minWidth: 0, - maxWidth: d(b.maxWidth) ? b.maxWidth: Infinity, - minHeight: d(b.minHeight) ? b.minHeight: 0, - maxHeight: d(b.maxHeight) ? b.maxHeight: Infinity - }; - if (this._aspectRatio || a) c = h.minHeight * this.aspectRatio, - f = h.minWidth / this.aspectRatio, - e = h.maxHeight * this.aspectRatio, - g = h.maxWidth / this.aspectRatio, - c > h.minWidth && (h.minWidth = c), - f > h.minHeight && (h.minHeight = f), - e < h.maxWidth && (h.maxWidth = e), - g < h.maxHeight && (h.maxHeight = g); - this._vBoundaries = h - }, - _updateCache: function(a) { - var b = this.options; - this.offset = this.helper.offset(), - d(a.left) && (this.position.left = a.left), - d(a.top) && (this.position.top = a.top), - d(a.height) && (this.size.height = a.height), - d(a.width) && (this.size.width = a.width) - }, - _updateRatio: function(a, b) { - var c = this.options, - e = this.position, - f = this.size, - g = this.axis; - d(a.height) ? a.width = a.height * this.aspectRatio: d(a.width) && (a.height = a.width / this.aspectRatio), - g == "sw" && (a.left = e.left + (f.width - a.width), a.top = null), - g == "nw" && (a.top = e.top + (f.height - a.height), a.left = e.left + (f.width - a.width)); - return a - }, - _respectSize: function(a, b) { - var c = this.helper, - e = this._vBoundaries, - f = this._aspectRatio || b.shiftKey, - g = this.axis, - h = d(a.width) && e.maxWidth && e.maxWidth < a.width, - i = d(a.height) && e.maxHeight && e.maxHeight < a.height, - j = d(a.width) && e.minWidth && e.minWidth > a.width, - k = d(a.height) && e.minHeight && e.minHeight > a.height; - j && (a.width = e.minWidth), - k && (a.height = e.minHeight), - h && (a.width = e.maxWidth), - i && (a.height = e.maxHeight); - var l = this.originalPosition.left + this.originalSize.width, - m = this.position.top + this.size.height, - n = /sw|nw|w/.test(g), - o = /nw|ne|n/.test(g); - j && n && (a.left = l - e.minWidth), - h && n && (a.left = l - e.maxWidth), - k && o && (a.top = m - e.minHeight), - i && o && (a.top = m - e.maxHeight); - var p = !a.width && !a.height; - p && !a.left && a.top ? a.top = null: p && !a.top && a.left && (a.left = null); - return a - }, - _proportionallyResize: function() { - var b = this.options; - if ( !! this._proportionallyResizeElements.length) { - var c = this.helper || this.element; - for (var d = 0; d < this._proportionallyResizeElements.length; d++) { - var e = this._proportionallyResizeElements[d]; - if (!this.borderDif) { - var f = [e.css("borderTopWidth"), e.css("borderRightWidth"), e.css("borderBottomWidth"), e.css("borderLeftWidth")], - g = [e.css("paddingTop"), e.css("paddingRight"), e.css("paddingBottom"), e.css("paddingLeft")]; - this.borderDif = a.map(f, - function(a, b) { - var c = parseInt(a, 10) || 0, - d = parseInt(g[b], 10) || 0; - return c + d - }) - } - if (a.browser.msie && ( !! a(c).is(":hidden") || !!a(c).parents(":hidden").length)) continue; - e.css({ - height: c.height() - this.borderDif[0] - this.borderDif[2] || 0, - width: c.width() - this.borderDif[1] - this.borderDif[3] || 0 - }) - } - } - }, - _renderProxy: function() { - var b = this.element, - c = this.options; - this.elementOffset = b.offset(); - if (this._helper) { - this.helper = this.helper || a('<div style="overflow:hidden;"></div>'); - var d = a.browser.msie && a.browser.version < 7, - e = d ? 1 : 0, - f = d ? 2 : -1; - this.helper.addClass(this._helper).css({ - width: this.element.outerWidth() + f, - height: this.element.outerHeight() + f, - position: "absolute", - left: this.elementOffset.left - e + "px", - top: this.elementOffset.top - e + "px", - zIndex: ++c.zIndex - }), - this.helper.appendTo("body").disableSelection() - } else this.helper = this.element - }, - _change: { - e: function(a, b, c) { - return { - width: this.originalSize.width + b - } - }, - w: function(a, b, c) { - var d = this.options, - e = this.originalSize, - f = this.originalPosition; - return { - left: f.left + b, - width: e.width - b - } - }, - n: function(a, b, c) { - var d = this.options, - e = this.originalSize, - f = this.originalPosition; - return { - top: f.top + c, - height: e.height - c - } - }, - s: function(a, b, c) { - return { - height: this.originalSize.height + c - } - }, - se: function(b, c, d) { - return a.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [b, c, d])) - }, - sw: function(b, c, d) { - return a.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [b, c, d])) - }, - ne: function(b, c, d) { - return a.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [b, c, d])) - }, - nw: function(b, c, d) { - return a.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [b, c, d])) - } - }, - _propagate: function(b, c) { - a.ui.plugin.call(this, b, [c, this.ui()]), - b != "resize" && this._trigger(b, c, this.ui()) - }, - plugins: {}, - ui: function() { - return { - originalElement: this.originalElement, - element: this.element, - helper: this.helper, - position: this.position, - size: this.size, - originalSize: this.originalSize, - originalPosition: this.originalPosition - } - } - }), - a.extend(a.ui.resizable, { - version: "1.8.18" - }), - a.ui.plugin.add("resizable", "alsoResize", { - start: function(b, c) { - var d = a(this).data("resizable"), - e = d.options, - f = function(b) { - a(b).each(function() { - var b = a(this); - b.data("resizable-alsoresize", { - width: parseInt(b.width(), 10), - height: parseInt(b.height(), 10), - left: parseInt(b.css("left"), 10), - top: parseInt(b.css("top"), 10) - }) - }) - }; - typeof e.alsoResize == "object" && !e.alsoResize.parentNode ? e.alsoResize.length ? (e.alsoResize = e.alsoResize[0], f(e.alsoResize)) : a.each(e.alsoResize, - function(a) { - f(a) - }) : f(e.alsoResize) - }, - resize: function(b, c) { - var d = a(this).data("resizable"), - e = d.options, - f = d.originalSize, - g = d.originalPosition, - h = { - height: d.size.height - f.height || 0, - width: d.size.width - f.width || 0, - top: d.position.top - g.top || 0, - left: d.position.left - g.left || 0 - }, - i = function(b, d) { - a(b).each(function() { - var b = a(this), - e = a(this).data("resizable-alsoresize"), - f = {}, - g = d && d.length ? d: b.parents(c.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"]; - a.each(g, - function(a, b) { - var c = (e[b] || 0) + (h[b] || 0); - c && c >= 0 && (f[b] = c || null) - }), - b.css(f) - }) - }; - typeof e.alsoResize == "object" && !e.alsoResize.nodeType ? a.each(e.alsoResize, - function(a, b) { - i(a, b) - }) : i(e.alsoResize) - }, - stop: function(b, c) { - a(this).removeData("resizable-alsoresize") - } - }), - a.ui.plugin.add("resizable", "animate", { - stop: function(b, c) { - var d = a(this).data("resizable"), - e = d.options, - f = d._proportionallyResizeElements, - g = f.length && /textarea/i.test(f[0].nodeName), - h = g && a.ui.hasScroll(f[0], "left") ? 0 : d.sizeDiff.height, - i = g ? 0 : d.sizeDiff.width, - j = { - width: d.size.width - i, - height: d.size.height - h - }, - k = parseInt(d.element.css("left"), 10) + (d.position.left - d.originalPosition.left) || null, - l = parseInt(d.element.css("top"), 10) + (d.position.top - d.originalPosition.top) || null; - d.element.animate(a.extend(j, l && k ? { - top: l, - left: k - }: {}), { - duration: e.animateDuration, - easing: e.animateEasing, - step: function() { - var c = { - width: parseInt(d.element.css("width"), 10), - height: parseInt(d.element.css("height"), 10), - top: parseInt(d.element.css("top"), 10), - left: parseInt(d.element.css("left"), 10) - }; - f && f.length && a(f[0]).css({ - width: c.width, - height: c.height - }), - d._updateCache(c), - d._propagate("resize", b) - } - }) - } - }), - a.ui.plugin.add("resizable", "containment", { - start: function(b, d) { - var e = a(this).data("resizable"), - f = e.options, - g = e.element, - h = f.containment, - i = h instanceof a ? h.get(0) : /parent/.test(h) ? g.parent().get(0) : h; - if ( !! i) { - e.containerElement = a(i); - if (/document/.test(h) || h == document) e.containerOffset = { - left: 0, - top: 0 - }, - e.containerPosition = { - left: 0, - top: 0 - }, - e.parentData = { - element: a(document), - left: 0, - top: 0, - width: a(document).width(), - height: a(document).height() || document.body.parentNode.scrollHeight - }; - else { - var j = a(i), - k = []; - a(["Top", "Right", "Left", "Bottom"]).each(function(a, b) { - k[a] = c(j.css("padding" + b)) - }), - e.containerOffset = j.offset(), - e.containerPosition = j.position(), - e.containerSize = { - height: j.innerHeight() - k[3], - width: j.innerWidth() - k[1] - }; - var l = e.containerOffset, - m = e.containerSize.height, - n = e.containerSize.width, - o = a.ui.hasScroll(i, "left") ? i.scrollWidth: n, - p = a.ui.hasScroll(i) ? i.scrollHeight: m; - e.parentData = { - element: i, - left: l.left, - top: l.top, - width: o, - height: p - } - } - } - }, - resize: function(b, c) { - var d = a(this).data("resizable"), - e = d.options, - f = d.containerSize, - g = d.containerOffset, - h = d.size, - i = d.position, - j = d._aspectRatio || b.shiftKey, - k = { - top: 0, - left: 0 - }, - l = d.containerElement; - l[0] != document && /static/.test(l.css("position")) && (k = g), - i.left < (d._helper ? g.left: 0) && (d.size.width = d.size.width + (d._helper ? d.position.left - g.left: d.position.left - k.left), j && (d.size.height = d.size.width / e.aspectRatio), d.position.left = e.helper ? g.left: 0), - i.top < (d._helper ? g.top: 0) && (d.size.height = d.size.height + (d._helper ? d.position.top - g.top: d.position.top), j && (d.size.width = d.size.height * e.aspectRatio), d.position.top = d._helper ? g.top: 0), - d.offset.left = d.parentData.left + d.position.left, - d.offset.top = d.parentData.top + d.position.top; - var m = Math.abs((d._helper ? d.offset.left - k.left: d.offset.left - k.left) + d.sizeDiff.width), - n = Math.abs((d._helper ? d.offset.top - k.top: d.offset.top - g.top) + d.sizeDiff.height), - o = d.containerElement.get(0) == d.element.parent().get(0), - p = /relative|absolute/.test(d.containerElement.css("position")); - o && p && (m -= d.parentData.left), - m + d.size.width >= d.parentData.width && (d.size.width = d.parentData.width - m, j && (d.size.height = d.size.width / d.aspectRatio)), - n + d.size.height >= d.parentData.height && (d.size.height = d.parentData.height - n, j && (d.size.width = d.size.height * d.aspectRatio)) - }, - stop: function(b, c) { - var d = a(this).data("resizable"), - e = d.options, - f = d.position, - g = d.containerOffset, - h = d.containerPosition, - i = d.containerElement, - j = a(d.helper), - k = j.offset(), - l = j.outerWidth() - d.sizeDiff.width, - m = j.outerHeight() - d.sizeDiff.height; - d._helper && !e.animate && /relative/.test(i.css("position")) && a(this).css({ - left: k.left - h.left - g.left, - width: l, - height: m - }), - d._helper && !e.animate && /static/.test(i.css("position")) && a(this).css({ - left: k.left - h.left - g.left, - width: l, - height: m - }) - } - }), - a.ui.plugin.add("resizable", "ghost", { - start: function(b, c) { - var d = a(this).data("resizable"), - e = d.options, - f = d.size; - d.ghost = d.originalElement.clone(), - d.ghost.css({ - opacity: .25, - display: "block", - position: "relative", - height: f.height, - width: f.width, - margin: 0, - left: 0, - top: 0 - }).addClass("ui-resizable-ghost").addClass(typeof e.ghost == "string" ? e.ghost: ""), - d.ghost.appendTo(d.helper) - }, - resize: function(b, c) { - var d = a(this).data("resizable"), - e = d.options; - d.ghost && d.ghost.css({ - position: "relative", - height: d.size.height, - width: d.size.width - }) - }, - stop: function(b, c) { - var d = a(this).data("resizable"), - e = d.options; - d.ghost && d.helper && d.helper.get(0).removeChild(d.ghost.get(0)) - } - }), - a.ui.plugin.add("resizable", "grid", { - resize: function(b, c) { - var d = a(this).data("resizable"), - e = d.options, - f = d.size, - g = d.originalSize, - h = d.originalPosition, - i = d.axis, - j = e._aspectRatio || b.shiftKey; - e.grid = typeof e.grid == "number" ? [e.grid, e.grid] : e.grid; - var k = Math.round((f.width - g.width) / (e.grid[0] || 1)) * (e.grid[0] || 1), - l = Math.round((f.height - g.height) / (e.grid[1] || 1)) * (e.grid[1] || 1); - /^(se|s|e)$/.test(i) ? (d.size.width = g.width + k, d.size.height = g.height + l) : /^(ne)$/.test(i) ? (d.size.width = g.width + k, d.size.height = g.height + l, d.position.top = h.top - l) : /^(sw)$/.test(i) ? (d.size.width = g.width + k, d.size.height = g.height + l, d.position.left = h.left - k) : (d.size.width = g.width + k, d.size.height = g.height + l, d.position.top = h.top - l, d.position.left = h.left - k) - } - }); - var c = function(a) { - return parseInt(a, 10) || 0 - }, - d = function(a) { - return ! isNaN(parseInt(a, 10)) - } -})(jQuery); -/* - * jQuery UI Selectable 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Selectables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function(a, b) { - a.widget("ui.selectable", a.ui.mouse, { - options: { - appendTo: "body", - autoRefresh: !0, - distance: 0, - filter: "*", - tolerance: "touch" - }, - _create: function() { - var b = this; - this.element.addClass("ui-selectable"), - this.dragged = !1; - var c; - this.refresh = function() { - c = a(b.options.filter, b.element[0]), - c.addClass("ui-selectee"), - c.each(function() { - var b = a(this), - c = b.offset(); - a.data(this, "selectable-item", { - element: this, - $element: b, - left: c.left, - top: c.top, - right: c.left + b.outerWidth(), - bottom: c.top + b.outerHeight(), - startselected: !1, - selected: b.hasClass("ui-selected"), - selecting: b.hasClass("ui-selecting"), - unselecting: b.hasClass("ui-unselecting") - }) - }) - }, - this.refresh(), - this.selectees = c.addClass("ui-selectee"), - this._mouseInit(), - this.helper = a("<div class='ui-selectable-helper'></div>") - }, - destroy: function() { - this.selectees.removeClass("ui-selectee").removeData("selectable-item"), - this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"), - this._mouseDestroy(); - return this - }, - _mouseStart: function(b) { - var c = this; - this.opos = [b.pageX, b.pageY]; - if (!this.options.disabled) { - var d = this.options; - this.selectees = a(d.filter, this.element[0]), - this._trigger("start", b), - a(d.appendTo).append(this.helper), - this.helper.css({ - left: b.clientX, - top: b.clientY, - width: 0, - height: 0 - }), - d.autoRefresh && this.refresh(), - this.selectees.filter(".ui-selected").each(function() { - var d = a.data(this, "selectable-item"); - d.startselected = !0, - !b.metaKey && !b.ctrlKey && (d.$element.removeClass("ui-selected"), d.selected = !1, d.$element.addClass("ui-unselecting"), d.unselecting = !0, c._trigger("unselecting", b, { - unselecting: d.element - })) - }), - a(b.target).parents().andSelf().each(function() { - var d = a.data(this, "selectable-item"); - if (d) { - var e = !b.metaKey && !b.ctrlKey || !d.$element.hasClass("ui-selected"); - d.$element.removeClass(e ? "ui-unselecting": "ui-selected").addClass(e ? "ui-selecting": "ui-unselecting"), - d.unselecting = !e, - d.selecting = e, - d.selected = e, - e ? c._trigger("selecting", b, { - selecting: d.element - }) : c._trigger("unselecting", b, { - unselecting: d.element - }); - return ! 1 - } - }) - } - }, - _mouseDrag: function(b) { - var c = this; - this.dragged = !0; - if (!this.options.disabled) { - var d = this.options, - e = this.opos[0], - f = this.opos[1], - g = b.pageX, - h = b.pageY; - if (e > g) { - var i = g; - g = e, - e = i - } - if (f > h) { - var i = h; - h = f, - f = i - } - this.helper.css({ - left: e, - top: f, - width: g - e, - height: h - f - }), - this.selectees.each(function() { - var i = a.data(this, "selectable-item"); - if ( !! i && i.element != c.element[0]) { - var j = !1; - d.tolerance == "touch" ? j = !(i.left > g || i.right < e || i.top > h || i.bottom < f) : d.tolerance == "fit" && (j = i.left > e && i.right < g && i.top > f && i.bottom < h), - j ? (i.selected && (i.$element.removeClass("ui-selected"), i.selected = !1), i.unselecting && (i.$element.removeClass("ui-unselecting"), i.unselecting = !1), i.selecting || (i.$element.addClass("ui-selecting"), i.selecting = !0, c._trigger("selecting", b, { - selecting: i.element - }))) : (i.selecting && ((b.metaKey || b.ctrlKey) && i.startselected ? (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.$element.addClass("ui-selected"), i.selected = !0) : (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.startselected && (i.$element.addClass("ui-unselecting"), i.unselecting = !0), c._trigger("unselecting", b, { - unselecting: i.element - }))), i.selected && !b.metaKey && !b.ctrlKey && !i.startselected && (i.$element.removeClass("ui-selected"), i.selected = !1, i.$element.addClass("ui-unselecting"), i.unselecting = !0, c._trigger("unselecting", b, { - unselecting: i.element - }))) - } - }); - return ! 1 - } - }, - _mouseStop: function(b) { - var c = this; - this.dragged = !1; - var d = this.options; - a(".ui-unselecting", this.element[0]).each(function() { - var d = a.data(this, "selectable-item"); - d.$element.removeClass("ui-unselecting"), - d.unselecting = !1, - d.startselected = !1, - c._trigger("unselected", b, { - unselected: d.element - }) - }), - a(".ui-selecting", this.element[0]).each(function() { - var d = a.data(this, "selectable-item"); - d.$element.removeClass("ui-selecting").addClass("ui-selected"), - d.selecting = !1, - d.selected = !0, - d.startselected = !0, - c._trigger("selected", b, { - selected: d.element - }) - }), - this._trigger("stop", b), - this.helper.remove(); - return ! 1 - } - }), - a.extend(a.ui.selectable, { - version: "1.8.18" - }) -})(jQuery); -/* - * jQuery UI Sortable 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Sortables - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ -(function(a, b) { - a.widget("ui.sortable", a.ui.mouse, { - widgetEventPrefix: "sort", - ready: !1, - options: { - appendTo: "parent", - axis: !1, - connectWith: !1, - containment: !1, - cursor: "auto", - cursorAt: !1, - dropOnEmpty: !0, - forcePlaceholderSize: !1, - forceHelperSize: !1, - grid: !1, - handle: !1, - helper: "original", - items: "> *", - opacity: !1, - placeholder: !1, - revert: !1, - scroll: !0, - scrollSensitivity: 20, - scrollSpeed: 20, - scope: "default", - tolerance: "intersect", - zIndex: 1e3 - }, - _create: function() { - var a = this.options; - this.containerCache = {}, - this.element.addClass("ui-sortable"), - this.refresh(), - this.floating = this.items.length ? a.axis === "x" || /left|right/.test(this.items[0].item.css("float")) || /inline|table-cell/.test(this.items[0].item.css("display")) : !1, - this.offset = this.element.offset(), - this._mouseInit(), - this.ready = !0 - }, - destroy: function() { - a.Widget.prototype.destroy.call(this), - this.element.removeClass("ui-sortable ui-sortable-disabled"), - this._mouseDestroy(); - for (var b = this.items.length - 1; b >= 0; b--) this.items[b].item.removeData(this.widgetName + "-item"); - return this - }, - _setOption: function(b, c) { - b === "disabled" ? (this.options[b] = c, this.widget()[c ? "addClass": "removeClass"]("ui-sortable-disabled")) : a.Widget.prototype._setOption.apply(this, arguments) - }, - _mouseCapture: function(b, c) { - var d = this; - if (this.reverting) return ! 1; - if (this.options.disabled || this.options.type == "static") return ! 1; - this._refreshItems(b); - var e = null, - f = this, - g = a(b.target).parents().each(function() { - if (a.data(this, d.widgetName + "-item") == f) { - e = a(this); - return ! 1 - } - }); - a.data(b.target, d.widgetName + "-item") == f && (e = a(b.target)); - if (!e) return ! 1; - if (this.options.handle && !c) { - var h = !1; - a(this.options.handle, e).find("*").andSelf().each(function() { - this == b.target && (h = !0) - }); - if (!h) return ! 1 - } - this.currentItem = e, - - this._removeCurrentsFromItems(); - return ! 0 - }, - _mouseStart: function(b, c, d) { - var e = this.options, - f = this; - this.currentContainer = this, - this.refreshPositions(), - this.helper = this._createHelper(b), - this._cacheHelperProportions(), - this._cacheMargins(), - this.scrollParent = this.helper.scrollParent(), - this.offset = this.currentItem.offset(), - this.offset = { - top: this.offset.top - this.margins.top, - left: this.offset.left - this.margins.left - }, - this.helper.css("position", "absolute"), - this.cssPosition = this.helper.css("position"), - a.extend(this.offset, { - click: { - left: b.pageX - this.offset.left, - top: b.pageY - this.offset.top - }, - parent: this._getParentOffset(), - relative: this._getRelativeOffset() - }), - this.originalPosition = this._generatePosition(b), - this.originalPageX = b.pageX, - this.originalPageY = b.pageY, - e.cursorAt && this._adjustOffsetFromHelper(e.cursorAt), - this.domPosition = { - prev: this.currentItem.prev()[0], - parent: this.currentItem.parent()[0] - }, - this.helper[0] != this.currentItem[0] && this.currentItem.hide(), - this._createPlaceholder(), - e.containment && this._setContainment(), - e.cursor && (a("body").css("cursor") && (this._storedCursor = a("body").css("cursor")), a("body").css("cursor", e.cursor)), - e.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", e.opacity)), - e.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", e.zIndex)), - this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML" && (this.overflowOffset = this.scrollParent.offset()), - this._trigger("start", b, this._uiHash()), - this._preserveHelperProportions || this._cacheHelperProportions(); - if (!d) for (var g = this.containers.length - 1; g >= 0; g--) this.containers[g]._trigger("activate", b, f._uiHash(this)); - a.ui.ddmanager && (a.ui.ddmanager.current = this), - a.ui.ddmanager && !e.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b), - this.dragging = !0, - this.helper.addClass("ui-sortable-helper"), - this._mouseDrag(b); - return ! 0 - }, - _mouseDrag: function(b) { - this.position = this._generatePosition(b), - this.positionAbs = this._convertPositionTo("absolute"), - this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs); - if (this.options.scroll) { - var c = this.options, - d = !1; - this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML" ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - b.pageY < c.scrollSensitivity ? this.scrollParent[0].scrollTop = d = this.scrollParent[0].scrollTop + c.scrollSpeed: b.pageY - this.overflowOffset.top < c.scrollSensitivity && (this.scrollParent[0].scrollTop = d = this.scrollParent[0].scrollTop - c.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - b.pageX < c.scrollSensitivity ? this.scrollParent[0].scrollLeft = d = this.scrollParent[0].scrollLeft + c.scrollSpeed: b.pageX - this.overflowOffset.left < c.scrollSensitivity && (this.scrollParent[0].scrollLeft = d = this.scrollParent[0].scrollLeft - c.scrollSpeed)) : (b.pageY - a(document).scrollTop() < c.scrollSensitivity ? d = a(document).scrollTop(a(document).scrollTop() - c.scrollSpeed) : a(window).height() - (b.pageY - a(document).scrollTop()) < c.scrollSensitivity && (d = a(document).scrollTop(a(document).scrollTop() + c.scrollSpeed)), b.pageX - a(document).scrollLeft() < c.scrollSensitivity ? d = a(document).scrollLeft(a(document).scrollLeft() - c.scrollSpeed) : a(window).width() - (b.pageX - a(document).scrollLeft()) < c.scrollSensitivity && (d = a(document).scrollLeft(a(document).scrollLeft() + c.scrollSpeed))), - d !== !1 && a.ui.ddmanager && !c.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b) - } - this.positionAbs = this._convertPositionTo("absolute"); - if (!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left + "px"; - if (!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top + "px"; - for (var e = this.items.length - 1; e >= 0; e--) { - var f = this.items[e], - g = f.item[0], - h = this._intersectsWithPointer(f); - if (!h) continue; - if (g != this.currentItem[0] && this.placeholder[h == 1 ? "next": "prev"]()[0] != g && !a.ui.contains(this.placeholder[0], g) && (this.options.type == "semi-dynamic" ? !a.ui.contains(this.element[0], g) : !0)) { - this.direction = h == 1 ? "down": "up"; - if (this.options.tolerance == "pointer" || this._intersectsWithSides(f)) this._rearrange(b, f); - else break; - this._trigger("change", b, this._uiHash()); - break - } - } - this._contactContainers(b), - a.ui.ddmanager && a.ui.ddmanager.drag(this, b), - this._trigger("sort", b, this._uiHash()), - this.lastPositionAbs = this.positionAbs; - return ! 1 - }, - _mouseStop: function(b, c) { - if ( !! b) { - a.ui.ddmanager && !this.options.dropBehaviour && a.ui.ddmanager.drop(this, b); - if (this.options.revert) { - var d = this, - e = d.placeholder.offset(); - d.reverting = !0, - a(this.helper).animate({ - left: e.left - this.offset.parent.left - d.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), - top: e.top - this.offset.parent.top - d.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) - }, - parseInt(this.options.revert, 10) || 500, - function() { - d._clear(b) - }) - } else this._clear(b, c); - return ! 1 - } - }, - cancel: function() { - var b = this; - if (this.dragging) { - this._mouseUp({ - target: null - }), - this.options.helper == "original" ? this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") : this.currentItem.show(); - for (var c = this.containers.length - 1; c >= 0; c--) this.containers[c]._trigger("deactivate", null, b._uiHash(this)), - this.containers[c].containerCache.over && (this.containers[c]._trigger("out", null, b._uiHash(this)), this.containers[c].containerCache.over = 0) - } - this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.options.helper != "original" && this.helper && this.helper[0].parentNode && this.helper.remove(), a.extend(this, { - helper: null, - dragging: !1, - reverting: !1, - _noFinalSort: null - }), this.domPosition.prev ? a(this.domPosition.prev).after(this.currentItem) : a(this.domPosition.parent).prepend(this.currentItem)); - return this - }, - serialize: function(b) { - var c = this._getItemsAsjQuery(b && b.connected), - d = []; - b = b || {}, - a(c).each(function() { - var c = (a(b.item || this).attr(b.attribute || "id") || "").match(b.expression || /(.+)[-=_](.+)/); - c && d.push((b.key || c[1] + "[]") + "=" + (b.key && b.expression ? c[1] : c[2])) - }), - !d.length && b.key && d.push(b.key + "="); - return d.join("&") - }, - toArray: function(b) { - var c = this._getItemsAsjQuery(b && b.connected), - d = []; - b = b || {}, - c.each(function() { - d.push(a(b.item || this).attr(b.attribute || "id") || "") - }); - return d - }, - _intersectsWith: function(a) { - var b = this.positionAbs.left, - c = b + this.helperProportions.width, - d = this.positionAbs.top, - e = d + this.helperProportions.height, - f = a.left, - g = f + a.width, - h = a.top, - i = h + a.height, - j = this.offset.click.top, - k = this.offset.click.left, - l = d + j > h && d + j < i && b + k > f && b + k < g; - return this.options.tolerance == "pointer" || this.options.forcePointerForContainers || this.options.tolerance != "pointer" && this.helperProportions[this.floating ? "width": "height"] > a[this.floating ? "width": "height"] ? l: f < b + this.helperProportions.width / 2 && c - this.helperProportions.width / 2 < g && h < d + this.helperProportions.height / 2 && e - this.helperProportions.height / 2 < i - }, - _intersectsWithPointer: function(b) { - var c = a.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, b.top, b.height), - d = a.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, b.left, b.width), - e = c && d, - f = this._getDragVerticalDirection(), - g = this._getDragHorizontalDirection(); - if (!e) return ! 1; - return this.floating ? g && g == "right" || f == "down" ? 2 : 1 : f && (f == "down" ? 2 : 1) - }, - _intersectsWithSides: function(b) { - var c = a.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, b.top + b.height / 2, b.height), - d = a.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, b.left + b.width / 2, b.width), - e = this._getDragVerticalDirection(), - f = this._getDragHorizontalDirection(); - return this.floating && f ? f == "right" && d || f == "left" && !d: e && (e == "down" && c || e == "up" && !c) - }, - _getDragVerticalDirection: function() { - var a = this.positionAbs.top - this.lastPositionAbs.top; - return a != 0 && (a > 0 ? "down": "up") - }, - _getDragHorizontalDirection: function() { - var a = this.positionAbs.left - this.lastPositionAbs.left; - return a != 0 && (a > 0 ? "right": "left") - }, - refresh: function(a) { - this._refreshItems(a), - this.refreshPositions(); - return this - }, - _connectWith: function() { - var a = this.options; - return a.connectWith.constructor == String ? [a.connectWith] : a.connectWith - }, - _getItemsAsjQuery: function(b) { - var c = this, - d = [], - e = [], - f = this._connectWith(); - if (f && b) for (var g = f.length - 1; g >= 0; g--) { - var h = a(f[g]); - for (var i = h.length - 1; i >= 0; i--) { - var j = a.data(h[i], this.widgetName); - j && j != this && !j.options.disabled && e.push([a.isFunction(j.options.items) ? j.options.items.call(j.element) : a(j.options.items, j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), j]) - } - } - e.push([a.isFunction(this.options.items) ? this.options.items.call(this.element, null, { - options: this.options, - item: this.currentItem - }) : a(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); - for (var g = e.length - 1; g >= 0; g--) e[g][0].each(function() { - d.push(this) - }); - return a(d) - }, - _removeCurrentsFromItems: function() { - var a = this.currentItem.find(":data(" + this.widgetName + "-item)"); - for (var b = 0; b < this.items.length; b++) for (var c = 0; c < a.length; c++) a[c] == this.items[b].item[0] && this.items.splice(b, 1) - }, - _refreshItems: function(b) { - this.items = [], - this.containers = [this]; - var c = this.items, - d = this, - e = [[a.isFunction(this.options.items) ? this.options.items.call(this.element[0], b, { - item: this.currentItem - }) : a(this.options.items, this.element), this]], - f = this._connectWith(); - if (f && this.ready) for (var g = f.length - 1; g >= 0; g--) { - var h = a(f[g]); - for (var i = h.length - 1; i >= 0; i--) { - var j = a.data(h[i], this.widgetName); - j && j != this && !j.options.disabled && (e.push([a.isFunction(j.options.items) ? j.options.items.call(j.element[0], b, { - item: this.currentItem - }) : a(j.options.items, j.element), j]), this.containers.push(j)) - } - } - for (var g = e.length - 1; g >= 0; g--) { - var k = e[g][1], - l = e[g][0]; - for (var i = 0, - m = l.length; i < m; i++) { - var n = a(l[i]); - n.data(this.widgetName + "-item", k), - c.push({ - item: n, - instance: k, - width: 0, - height: 0, - left: 0, - top: 0 - }) - } - } - }, - refreshPositions: function(b) { - this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset()); - for (var c = this.items.length - 1; c >= 0; c--) { - var d = this.items[c]; - if (d.instance != this.currentContainer && this.currentContainer && d.item[0] != this.currentItem[0]) continue; - var e = this.options.toleranceElement ? a(this.options.toleranceElement, d.item) : d.item; - b || (d.width = e.outerWidth(), d.height = e.outerHeight()); - var f = e.offset(); - d.left = f.left, - d.top = f.top - } - if (this.options.custom && this.options.custom.refreshContainers) this.options.custom.refreshContainers.call(this); - else for (var c = this.containers.length - 1; c >= 0; c--) { - var f = this.containers[c].element.offset(); - this.containers[c].containerCache.left = f.left, - this.containers[c].containerCache.top = f.top, - this.containers[c].containerCache.width = this.containers[c].element.outerWidth(), - this.containers[c].containerCache.height = this.containers[c].element.outerHeight() - } - return this - }, - _createPlaceholder: function(b) { - var c = b || this, - d = c.options; - if (!d.placeholder || d.placeholder.constructor == String) { - var e = d.placeholder; - d.placeholder = { - element: function() { - var b = a(document.createElement(c.currentItem[0].nodeName)).addClass(e || c.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper")[0]; - e || (b.style.visibility = "hidden"); - return b - }, - update: function(a, b) { - if (!e || !!d.forcePlaceholderSize) b.height() || b.height(c.currentItem.innerHeight() - parseInt(c.currentItem.css("paddingTop") || 0, 10) - parseInt(c.currentItem.css("paddingBottom") || 0, 10)), - b.width() || b.width(c.currentItem.innerWidth() - parseInt(c.currentItem.css("paddingLeft") || 0, 10) - parseInt(c.currentItem.css("paddingRight") || 0, 10)) - } - } - } - c.placeholder = a(d.placeholder.element.call(c.element, c.currentItem)), - c.currentItem.after(c.placeholder), - d.placeholder.update(c, c.placeholder) - }, - _contactContainers: function(b) { - var c = null, - d = null; - for (var e = this.containers.length - 1; e >= 0; e--) { - if (a.ui.contains(this.currentItem[0], this.containers[e].element[0])) continue; - if (this._intersectsWith(this.containers[e].containerCache)) { - if (c && a.ui.contains(this.containers[e].element[0], c.element[0])) continue; - c = this.containers[e], - d = e - } else this.containers[e].containerCache.over && (this.containers[e]._trigger("out", b, this._uiHash(this)), this.containers[e].containerCache.over = 0) - } - if ( !! c) if (this.containers.length === 1) this.containers[d]._trigger("over", b, this._uiHash(this)), - this.containers[d].containerCache.over = 1; - else if (this.currentContainer != this.containers[d]) { - var f = 1e4, - g = null, - h = this.positionAbs[this.containers[d].floating ? "left": "top"]; - for (var i = this.items.length - 1; i >= 0; i--) { - if (!a.ui.contains(this.containers[d].element[0], this.items[i].item[0])) continue; - var j = this.items[i][this.containers[d].floating ? "left": "top"]; - Math.abs(j - h) < f && (f = Math.abs(j - h), g = this.items[i]) - } - if (!g && !this.options.dropOnEmpty) return; - this.currentContainer = this.containers[d], - g ? this._rearrange(b, g, null, !0) : this._rearrange(b, null, this.containers[d].element, !0), - this._trigger("change", b, this._uiHash()), - this.containers[d]._trigger("change", b, this._uiHash(this)), - this.options.placeholder.update(this.currentContainer, this.placeholder), - this.containers[d]._trigger("over", b, this._uiHash(this)), - this.containers[d].containerCache.over = 1 - } - }, - _createHelper: function(b) { - var c = this.options, - d = a.isFunction(c.helper) ? a(c.helper.apply(this.element[0], [b, this.currentItem])) : c.helper == "clone" ? this.currentItem.clone() : this.currentItem; - d.parents("body").length || a(c.appendTo != "parent" ? c.appendTo: this.currentItem[0].parentNode)[0].appendChild(d[0]), - d[0] == this.currentItem[0] && (this._storedCSS = { - width: this.currentItem[0].style.width, - height: this.currentItem[0].style.height, - position: this.currentItem.css("position"), - top: this.currentItem.css("top"), - left: this.currentItem.css("left") - }), - (d[0].style.width == "" || c.forceHelperSize) && d.width(this.currentItem.width()), - (d[0].style.height == "" || c.forceHelperSize) && d.height(this.currentItem.height()); - return d - }, - _adjustOffsetFromHelper: function(b) { - typeof b == "string" && (b = b.split(" ")), - a.isArray(b) && (b = { - left: +b[0], - top: +b[1] || 0 - }), - "left" in b && (this.offset.click.left = b.left + this.margins.left), - "right" in b && (this.offset.click.left = this.helperProportions.width - b.right + this.margins.left), - "top" in b && (this.offset.click.top = b.top + this.margins.top), - "bottom" in b && (this.offset.click.top = this.helperProportions.height - b.bottom + this.margins.top) - }, - _getParentOffset: function() { - this.offsetParent = this.helper.offsetParent(); - var b = this.offsetParent.offset(); - this.cssPosition == "absolute" && this.scrollParent[0] != document && a.ui.contains(this.scrollParent[0], this.offsetParent[0]) && (b.left += this.scrollParent.scrollLeft(), b.top += this.scrollParent.scrollTop()); - if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && a.browser.msie) b = { - top: 0, - left: 0 - }; - return { - top: b.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), - left: b.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) - } - }, - _getRelativeOffset: function() { - if (this.cssPosition == "relative") { - var a = this.currentItem.position(); - return { - top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(), - left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft() - } - } - return { - top: 0, - left: 0 - } - }, - _cacheMargins: function() { - this.margins = { - left: parseInt(this.currentItem.css("marginLeft"), 10) || 0, - top: parseInt(this.currentItem.css("marginTop"), 10) || 0 - } - }, - _cacheHelperProportions: function() { - this.helperProportions = { - width: this.helper.outerWidth(), - height: this.helper.outerHeight() - } - }, - _setContainment: function() { - var b = this.options; - b.containment == "parent" && (b.containment = this.helper[0].parentNode); - if (b.containment == "document" || b.containment == "window") this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, a(b.containment == "document" ? document: window).width() - this.helperProportions.width - this.margins.left, (a(b.containment == "document" ? document: window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top]; - if (!/^(document|window|parent)$/.test(b.containment)) { - var c = a(b.containment)[0], - d = a(b.containment).offset(), - e = a(c).css("overflow") != "hidden"; - this.containment = [d.left + (parseInt(a(c).css("borderLeftWidth"), 10) || 0) + (parseInt(a(c).css("paddingLeft"), 10) || 0) - this.margins.left, d.top + (parseInt(a(c).css("borderTopWidth"), 10) || 0) + (parseInt(a(c).css("paddingTop"), 10) || 0) - this.margins.top, d.left + (e ? Math.max(c.scrollWidth, c.offsetWidth) : c.offsetWidth) - (parseInt(a(c).css("borderLeftWidth"), 10) || 0) - (parseInt(a(c).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, d.top + (e ? Math.max(c.scrollHeight, c.offsetHeight) : c.offsetHeight) - (parseInt(a(c).css("borderTopWidth"), 10) || 0) - (parseInt(a(c).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top] - } - }, - _convertPositionTo: function(b, c) { - c || (c = this.position); - var d = b == "absolute" ? 1 : -1, - e = this.options, - f = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent: this.scrollParent, - g = /(html|body)/i.test(f[0].tagName); - return { - top: c.top + this.offset.relative.top * d + this.offset.parent.top * d - (a.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : g ? 0 : f.scrollTop()) * d), - left: c.left + this.offset.relative.left * d + this.offset.parent.left * d - (a.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : g ? 0 : f.scrollLeft()) * d) - } - }, - _generatePosition: function(b) { - var c = this.options, - d = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent: this.scrollParent, - e = /(html|body)/i.test(d[0].tagName); - this.cssPosition == "relative" && (this.scrollParent[0] == document || this.scrollParent[0] == this.offsetParent[0]) && (this.offset.relative = this._getRelativeOffset()); - var f = b.pageX, - g = b.pageY; - if (this.originalPosition) { - this.containment && (b.pageX - this.offset.click.left < this.containment[0] && (f = this.containment[0] + this.offset.click.left), b.pageY - this.offset.click.top < this.containment[1] && (g = this.containment[1] + this.offset.click.top), b.pageX - this.offset.click.left > this.containment[2] && (f = this.containment[2] + this.offset.click.left), b.pageY - this.offset.click.top > this.containment[3] && (g = this.containment[3] + this.offset.click.top)); - if (c.grid) { - var h = this.originalPageY + Math.round((g - this.originalPageY) / c.grid[1]) * c.grid[1]; - g = this.containment ? h - this.offset.click.top < this.containment[1] || h - this.offset.click.top > this.containment[3] ? h - this.offset.click.top < this.containment[1] ? h + c.grid[1] : h - c.grid[1] : h: h; - var i = this.originalPageX + Math.round((f - this.originalPageX) / c.grid[0]) * c.grid[0]; - f = this.containment ? i - this.offset.click.left < this.containment[0] || i - this.offset.click.left > this.containment[2] ? i - this.offset.click.left < this.containment[0] ? i + c.grid[0] : i - c.grid[0] : i: i - } - } - return { - top: g - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (a.browser.safari && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : d.scrollTop()), - left: f - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (a.browser.safari && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : d.scrollLeft()) - } - }, - _rearrange: function(a, b, c, d) { - c ? c[0].appendChild(this.placeholder[0]) : b.item[0].parentNode.insertBefore(this.placeholder[0], this.direction == "down" ? b.item[0] : b.item[0].nextSibling), - this.counter = this.counter ? ++this.counter: 1; - var e = this, - f = this.counter; - window.setTimeout(function() { - f == e.counter && e.refreshPositions(!d) - }, - 0) - }, - _clear: function(b, c) { - this.reverting = !1; - var d = [], - e = this; ! this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem), - this._noFinalSort = null; - if (this.helper[0] == this.currentItem[0]) { - for (var f in this._storedCSS) if (this._storedCSS[f] == "auto" || this._storedCSS[f] == "static") this._storedCSS[f] = ""; - this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") - } else this.currentItem.show(); - this.fromOutside && !c && d.push(function(a) { - this._trigger("receive", a, this._uiHash(this.fromOutside)) - }), - (this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !c && d.push(function(a) { - this._trigger("update", a, this._uiHash()) - }); - if (!a.ui.contains(this.element[0], this.currentItem[0])) { - c || d.push(function(a) { - this._trigger("remove", a, this._uiHash()) - }); - for (var f = this.containers.length - 1; f >= 0; f--) a.ui.contains(this.containers[f].element[0], this.currentItem[0]) && !c && (d.push(function(a) { - return function(b) { - a._trigger("receive", b, this._uiHash(this)) - } - }.call(this, this.containers[f])), d.push(function(a) { - return function(b) { - a._trigger("update", b, this._uiHash(this)) - } - }.call(this, this.containers[f]))) - } - for (var f = this.containers.length - 1; f >= 0; f--) c || d.push(function(a) { - return function(b) { - a._trigger("deactivate", b, this._uiHash(this)) - } - }.call(this, this.containers[f])), - this.containers[f].containerCache.over && (d.push(function(a) { - return function(b) { - a._trigger("out", b, this._uiHash(this)) - } - }.call(this, this.containers[f])), this.containers[f].containerCache.over = 0); - this._storedCursor && a("body").css("cursor", this._storedCursor), - this._storedOpacity && this.helper.css("opacity", this._storedOpacity), - this._storedZIndex && this.helper.css("zIndex", this._storedZIndex == "auto" ? "": this._storedZIndex), - this.dragging = !1; - if (this.cancelHelperRemoval) { - if (!c) { - this._trigger("beforeStop", b, this._uiHash()); - for (var f = 0; f < d.length; f++) d[f].call(this, b); - this._trigger("stop", b, this._uiHash()) - } - return ! 1 - } - c || this._trigger("beforeStop", b, this._uiHash()), - this.placeholder[0].parentNode.removeChild(this.placeholder[0]), - this.helper[0] != this.currentItem[0] && this.helper.remove(), - this.helper = null; - if (!c) { - for (var f = 0; f < d.length; f++) d[f].call(this, b); - this._trigger("stop", b, this._uiHash()) - } - this.fromOutside = !1; - return ! 0 - }, - _trigger: function() { - a.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel() - }, - _uiHash: function(b) { - var c = b || this; - return { - helper: c.helper, - placeholder: c.placeholder || a([]), - position: c.position, - originalPosition: c.originalPosition, - offset: c.positionAbs, - item: c.currentItem, - sender: b ? b.element: null - } - } - }), - a.extend(a.ui.sortable, { - version: "1.8.18" - }) -})(jQuery); -/* - * jQuery UI Datepicker 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Datepicker - * - * Depends: - * jquery.ui.core.js - */ -(function($, undefined) { - function isArray(a) { - return a && ($.browser.safari && typeof a == "object" && a.length || a.constructor && a.constructor.toString().match(/\Array\(\)/)) - } - function extendRemove(a, b) { - $.extend(a, b); - for (var c in b) if (b[c] == null || b[c] == undefined) a[c] = b[c]; - return a - } - function bindHover(a) { - var b = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; - return a.bind("mouseout", - function(a) { - var c = $(a.target).closest(b); ! c.length || c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover") - }).bind("mouseover", - function(c) { - var d = $(c.target).closest(b); ! $.datepicker._isDisabledDatepicker(instActive.inline ? a.parent()[0] : instActive.input[0]) && !!d.length && (d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), d.addClass("ui-state-hover"), d.hasClass("ui-datepicker-prev") && d.addClass("ui-datepicker-prev-hover"), d.hasClass("ui-datepicker-next") && d.addClass("ui-datepicker-next-hover")) - }) - } - function Datepicker() { - this.debug = !1, - this._curInst = null, - this._keyEvent = !1, - this._disabledInputs = [], - this._datepickerShowing = !1, - this._inDialog = !1, - this._mainDivId = "ui-datepicker-div", - this._inlineClass = "ui-datepicker-inline", - this._appendClass = "ui-datepicker-append", - this._triggerClass = "ui-datepicker-trigger", - this._dialogClass = "ui-datepicker-dialog", - this._disableClass = "ui-datepicker-disabled", - this._unselectableClass = "ui-datepicker-unselectable", - this._currentClass = "ui-datepicker-current-day", - this._dayOverClass = "ui-datepicker-days-cell-over", - this.regional = [], - this.regional[""] = { - closeText: "Done", - prevText: "Prev", - nextText: "Next", - currentText: "Today", - monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], - dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], - dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], - weekHeader: "Wk", - dateFormat: "mm/dd/yy", - firstDay: 0, - isRTL: !1, - showMonthAfterYear: !1, - yearSuffix: "" - }, - this._defaults = { - showOn: "focus", - showAnim: "fadeIn", - showOptions: {}, - defaultDate: null, - appendText: "", - buttonText: "...", - buttonImage: "", - buttonImageOnly: !1, - hideIfNoPrevNext: !1, - navigationAsDateFormat: !1, - gotoCurrent: !1, - changeMonth: !1, - changeYear: !1, - yearRange: "c-10:c+10", - showOtherMonths: !1, - selectOtherMonths: !1, - showWeek: !1, - calculateWeek: this.iso8601Week, - shortYearCutoff: "+10", - minDate: null, - maxDate: null, - duration: "fast", - beforeShowDay: null, - beforeShow: null, - onSelect: null, - onChangeMonthYear: null, - onClose: null, - numberOfMonths: 1, - showCurrentAtPos: 0, - stepMonths: 1, - stepBigMonths: 12, - altField: "", - altFormat: "", - constrainInput: !0, - showButtonPanel: !1, - autoSize: !1, - disabled: !1 - }, - $.extend(this._defaults, this.regional[""]), - this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')) - } - $.extend($.ui, { - datepicker: { - version: "1.8.18" - } - }); - var PROP_NAME = "datepicker", - dpuuid = (new Date).getTime(), - instActive; - $.extend(Datepicker.prototype, { - markerClassName: "hasDatepicker", - maxRows: 4, - log: function() { - this.debug && console.log.apply("", arguments) - }, - _widgetDatepicker: function() { - return this.dpDiv - }, - setDefaults: function(a) { - extendRemove(this._defaults, a || {}); - return this - }, - _attachDatepicker: function(target, settings) { - var inlineSettings = null; - for (var attrName in this._defaults) { - var attrValue = target.getAttribute("date:" + attrName); - if (attrValue) { - inlineSettings = inlineSettings || {}; - try { - inlineSettings[attrName] = eval(attrValue) - } catch(err) { - inlineSettings[attrName] = attrValue - } - } - } - var nodeName = target.nodeName.toLowerCase(), - inline = nodeName == "div" || nodeName == "span"; - target.id || (this.uuid += 1, target.id = "dp" + this.uuid); - var inst = this._newInst($(target), inline); - inst.settings = $.extend({}, - settings || {}, - inlineSettings || {}), - nodeName == "input" ? this._connectDatepicker(target, inst) : inline && this._inlineDatepicker(target, inst) - }, - _newInst: function(a, b) { - var c = a[0].id.replace(/([^A-Za-z0-9_-])/g, "\\\\$1"); - return { - id: c, - input: a, - selectedDay: 0, - selectedMonth: 0, - selectedYear: 0, - drawMonth: 0, - drawYear: 0, - inline: b, - dpDiv: b ? bindHover($('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')) : this.dpDiv - } - }, - _connectDatepicker: function(a, b) { - var c = $(a); - b.append = $([]), - b.trigger = $([]); - c.hasClass(this.markerClassName) || (this._attachments(c, b), c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker", - function(a, c, d) { - b.settings[c] = d - }).bind("getData.datepicker", - function(a, c) { - return this._get(b, c) - }), this._autoSize(b), $.data(a, PROP_NAME, b), b.settings.disabled && this._disableDatepicker(a)) - }, - _attachments: function(a, b) { - var c = this._get(b, "appendText"), - d = this._get(b, "isRTL"); - b.append && b.append.remove(), - c && (b.append = $('<span class="' + this._appendClass + '">' + c + "</span>"), a[d ? "before": "after"](b.append)), - a.unbind("focus", this._showDatepicker), - b.trigger && b.trigger.remove(); - var e = this._get(b, "showOn"); (e == "focus" || e == "both") && a.focus(this._showDatepicker); - if (e == "button" || e == "both") { - var f = this._get(b, "buttonText"), - g = this._get(b, "buttonImage"); - b.trigger = $(this._get(b, "buttonImageOnly") ? $("<img/>").addClass(this._triggerClass).attr({ - src: g, - alt: f, - title: f - }) : $('<button type="button"></button>').addClass(this._triggerClass).html(g == "" ? f: $("<img/>").attr({ - src: g, - alt: f, - title: f - }))), - a[d ? "before": "after"](b.trigger), - b.trigger.click(function() { - $.datepicker._datepickerShowing && $.datepicker._lastInput == a[0] ? $.datepicker._hideDatepicker() : $.datepicker._datepickerShowing && $.datepicker._lastInput != a[0] ? ($.datepicker._hideDatepicker(), $.datepicker._showDatepicker(a[0])) : $.datepicker._showDatepicker(a[0]); - return ! 1 - }) - } - }, - _autoSize: function(a) { - if (this._get(a, "autoSize") && !a.inline) { - var b = new Date(2009, 11, 20), - c = this._get(a, "dateFormat"); - if (c.match(/[DM]/)) { - var d = function(a) { - var b = 0, - c = 0; - for (var d = 0; d < a.length; d++) a[d].length > b && (b = a[d].length, c = d); - return c - }; - b.setMonth(d(this._get(a, c.match(/MM/) ? "monthNames": "monthNamesShort"))), - b.setDate(d(this._get(a, c.match(/DD/) ? "dayNames": "dayNamesShort")) + 20 - b.getDay()) - } - a.input.attr("size", this._formatDate(a, b).length) - } - }, - _inlineDatepicker: function(a, b) { - var c = $(a); - c.hasClass(this.markerClassName) || (c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker", - function(a, c, d) { - b.settings[c] = d - }).bind("getData.datepicker", - function(a, c) { - return this._get(b, c) - }), $.data(a, PROP_NAME, b), this._setDate(b, this._getDefaultDate(b), !0), this._updateDatepicker(b), this._updateAlternate(b), b.settings.disabled && this._disableDatepicker(a), b.dpDiv.css("display", "block")) - }, - _dialogDatepicker: function(a, b, c, d, e) { - var f = this._dialogInst; - if (!f) { - this.uuid += 1; - var g = "dp" + this.uuid; - this._dialogInput = $('<input type="text" id="' + g + '" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'), - this._dialogInput.keydown(this._doKeyDown), - $("body").append(this._dialogInput), - f = this._dialogInst = this._newInst(this._dialogInput, !1), - f.settings = {}, - $.data(this._dialogInput[0], PROP_NAME, f) - } - extendRemove(f.settings, d || {}), - b = b && b.constructor == Date ? this._formatDate(f, b) : b, - this._dialogInput.val(b), - this._pos = e ? e.length ? e: [e.pageX, e.pageY] : null; - if (!this._pos) { - var h = document.documentElement.clientWidth, - i = document.documentElement.clientHeight, - j = document.documentElement.scrollLeft || document.body.scrollLeft, - k = document.documentElement.scrollTop || document.body.scrollTop; - this._pos = [h / 2 - 100 + j, i / 2 - 150 + k] - } - this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"), - f.settings.onSelect = c, - this._inDialog = !0, - this.dpDiv.addClass(this._dialogClass), - this._showDatepicker(this._dialogInput[0]), - $.blockUI && $.blockUI(this.dpDiv), - $.data(this._dialogInput[0], PROP_NAME, f); - return this - }, - _destroyDatepicker: function(a) { - var b = $(a), - c = $.data(a, PROP_NAME); - if ( !! b.hasClass(this.markerClassName)) { - var d = a.nodeName.toLowerCase(); - $.removeData(a, PROP_NAME), - d == "input" ? (c.append.remove(), c.trigger.remove(), b.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp)) : (d == "div" || d == "span") && b.removeClass(this.markerClassName).empty() - } - }, - _enableDatepicker: function(a) { - var b = $(a), - c = $.data(a, PROP_NAME); - if ( !! b.hasClass(this.markerClassName)) { - var d = a.nodeName.toLowerCase(); - if (d == "input") a.disabled = !1, - c.trigger.filter("button").each(function() { - this.disabled = !1 - }).end().filter("img").css({ - opacity: "1.0", - cursor: "" - }); - else if (d == "div" || d == "span") { - var e = b.children("." + this._inlineClass); - e.children().removeClass("ui-state-disabled"), - e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled") - } - this._disabledInputs = $.map(this._disabledInputs, - function(b) { - return b == a ? null: b - }) - } - }, - _disableDatepicker: function(a) { - var b = $(a), - c = $.data(a, PROP_NAME); - if ( !! b.hasClass(this.markerClassName)) { - var d = a.nodeName.toLowerCase(); - if (d == "input") a.disabled = !0, - c.trigger.filter("button").each(function() { - this.disabled = !0 - }).end().filter("img").css({ - opacity: "0.5", - cursor: "default" - }); - else if (d == "div" || d == "span") { - var e = b.children("." + this._inlineClass); - e.children().addClass("ui-state-disabled"), - e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled", "disabled") - } - this._disabledInputs = $.map(this._disabledInputs, - function(b) { - return b == a ? null: b - }), - this._disabledInputs[this._disabledInputs.length] = a - } - }, - _isDisabledDatepicker: function(a) { - if (!a) return ! 1; - for (var b = 0; b < this._disabledInputs.length; b++) if (this._disabledInputs[b] == a) return ! 0; - return ! 1 - }, - _getInst: function(a) { - try { - return $.data(a, PROP_NAME) - } catch(b) { - throw "Missing instance data for this datepicker" - } - }, - _optionDatepicker: function(a, b, c) { - var d = this._getInst(a); - if (arguments.length == 2 && typeof b == "string") return b == "defaults" ? $.extend({}, - $.datepicker._defaults) : d ? b == "all" ? $.extend({}, - d.settings) : this._get(d, b) : null; - var e = b || {}; - typeof b == "string" && (e = {}, - e[b] = c); - if (d) { - this._curInst == d && this._hideDatepicker(); - var f = this._getDateDatepicker(a, !0), - g = this._getMinMaxDate(d, "min"), - h = this._getMinMaxDate(d, "max"); - extendRemove(d.settings, e), - g !== null && e.dateFormat !== undefined && e.minDate === undefined && (d.settings.minDate = this._formatDate(d, g)), - h !== null && e.dateFormat !== undefined && e.maxDate === undefined && (d.settings.maxDate = this._formatDate(d, h)), - this._attachments($(a), d), - this._autoSize(d), - this._setDate(d, f), - this._updateAlternate(d), - this._updateDatepicker(d) - } - }, - _changeDatepicker: function(a, b, c) { - this._optionDatepicker(a, b, c) - }, - _refreshDatepicker: function(a) { - var b = this._getInst(a); - b && this._updateDatepicker(b) - }, - _setDateDatepicker: function(a, b) { - var c = this._getInst(a); - c && (this._setDate(c, b), this._updateDatepicker(c), this._updateAlternate(c)) - }, - _getDateDatepicker: function(a, b) { - var c = this._getInst(a); - c && !c.inline && this._setDateFromField(c, b); - return c ? this._getDate(c) : null - }, - _doKeyDown: function(a) { - var b = $.datepicker._getInst(a.target), - c = !0, - d = b.dpDiv.is(".ui-datepicker-rtl"); - b._keyEvent = !0; - if ($.datepicker._datepickerShowing) switch (a.keyCode) { - case 9: - $.datepicker._hideDatepicker(), - c = !1; - break; - case 13: - var e = $("td." + $.datepicker._dayOverClass + ":not(." + $.datepicker._currentClass + ")", b.dpDiv); - e[0] && $.datepicker._selectDay(a.target, b.selectedMonth, b.selectedYear, e[0]); - var f = $.datepicker._get(b, "onSelect"); - if (f) { - var g = $.datepicker._formatDate(b); - f.apply(b.input ? b.input[0] : null, [g, b]) - } else $.datepicker._hideDatepicker(); - return ! 1; - case 27: - $.datepicker._hideDatepicker(); - break; - case 33: - $.datepicker._adjustDate(a.target, a.ctrlKey ? -$.datepicker._get(b, "stepBigMonths") : -$.datepicker._get(b, "stepMonths"), "M"); - break; - case 34: - $.datepicker._adjustDate(a.target, a.ctrlKey ? +$.datepicker._get(b, "stepBigMonths") : +$.datepicker._get(b, "stepMonths"), "M"); - break; - case 35: - (a.ctrlKey || a.metaKey) && $.datepicker._clearDate(a.target), - c = a.ctrlKey || a.metaKey; - break; - case 36: - (a.ctrlKey || a.metaKey) && $.datepicker._gotoToday(a.target), - c = a.ctrlKey || a.metaKey; - break; - case 37: - (a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, d ? 1 : -1, "D"), - c = a.ctrlKey || a.metaKey, - a.originalEvent.altKey && $.datepicker._adjustDate(a.target, a.ctrlKey ? -$.datepicker._get(b, "stepBigMonths") : -$.datepicker._get(b, "stepMonths"), "M"); - break; - case 38: - (a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, -7, "D"), - c = a.ctrlKey || a.metaKey; - break; - case 39: - (a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, d ? -1 : 1, "D"), - c = a.ctrlKey || a.metaKey, - a.originalEvent.altKey && $.datepicker._adjustDate(a.target, a.ctrlKey ? +$.datepicker._get(b, "stepBigMonths") : +$.datepicker._get(b, "stepMonths"), "M"); - break; - case 40: - (a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, 7, "D"), - c = a.ctrlKey || a.metaKey; - break; - default: - c = !1 - } else a.keyCode == 36 && a.ctrlKey ? $.datepicker._showDatepicker(this) : c = !1; - c && (a.preventDefault(), a.stopPropagation()) - }, - _doKeyPress: function(a) { - var b = $.datepicker._getInst(a.target); - if ($.datepicker._get(b, "constrainInput")) { - var c = $.datepicker._possibleChars($.datepicker._get(b, "dateFormat")), - d = String.fromCharCode(a.charCode == undefined ? a.keyCode: a.charCode); - return a.ctrlKey || a.metaKey || d < " " || !c || c.indexOf(d) > -1 - } - }, - _doKeyUp: function(a) { - var b = $.datepicker._getInst(a.target); - if (b.input.val() != b.lastVal) try { - var c = $.datepicker.parseDate($.datepicker._get(b, "dateFormat"), b.input ? b.input.val() : null, $.datepicker._getFormatConfig(b)); - c && ($.datepicker._setDateFromField(b), $.datepicker._updateAlternate(b), $.datepicker._updateDatepicker(b)) - } catch(a) { - $.datepicker.log(a) - } - return ! 0 - }, - _showDatepicker: function(a) { - a = a.target || a, - a.nodeName.toLowerCase() != "input" && (a = $("input", a.parentNode)[0]); - if (!$.datepicker._isDisabledDatepicker(a) && $.datepicker._lastInput != a) { - var b = $.datepicker._getInst(a); - $.datepicker._curInst && $.datepicker._curInst != b && ($.datepicker._curInst.dpDiv.stop(!0, !0), b && $.datepicker._datepickerShowing && $.datepicker._hideDatepicker($.datepicker._curInst.input[0])); - var c = $.datepicker._get(b, "beforeShow"), - d = c ? c.apply(a, [a, b]) : {}; - if (d === !1) return; - extendRemove(b.settings, d), - b.lastVal = null, - $.datepicker._lastInput = a, - $.datepicker._setDateFromField(b), - $.datepicker._inDialog && (a.value = ""), - $.datepicker._pos || ($.datepicker._pos = $.datepicker._findPos(a), $.datepicker._pos[1] += a.offsetHeight); - var e = !1; - $(a).parents().each(function() { - e |= $(this).css("position") == "fixed"; - return ! e - }), - e && $.browser.opera && ($.datepicker._pos[0] -= document.documentElement.scrollLeft, $.datepicker._pos[1] -= document.documentElement.scrollTop); - var f = { - left: $.datepicker._pos[0], - top: $.datepicker._pos[1] - }; - $.datepicker._pos = null, - b.dpDiv.empty(), - b.dpDiv.css({ - position: "absolute", - display: "block", - top: "-1000px" - }), - $.datepicker._updateDatepicker(b), - f = $.datepicker._checkOffset(b, f, e), - b.dpDiv.css({ - position: $.datepicker._inDialog && $.blockUI ? "static": e ? "fixed": "absolute", - display: "none", - left: f.left + "px", - top: f.top + "px" - }); - if (!b.inline) { - var g = $.datepicker._get(b, "showAnim"), - h = $.datepicker._get(b, "duration"), - i = function() { - var a = b.dpDiv.find("iframe.ui-datepicker-cover"); - if ( !! a.length) { - var c = $.datepicker._getBorders(b.dpDiv); - a.css({ - left: -c[0], - top: -c[1], - width: b.dpDiv.outerWidth(), - height: b.dpDiv.outerHeight() - }) - } - }; - b.dpDiv.zIndex($(a).zIndex() + 1), - $.datepicker._datepickerShowing = !0, - $.effects && $.effects[g] ? b.dpDiv.show(g, $.datepicker._get(b, "showOptions"), h, i) : b.dpDiv[g || "show"](g ? h: null, i), - (!g || !h) && i(), - b.input.is(":visible") && !b.input.is(":disabled") && b.input.focus(), - $.datepicker._curInst = b - } - } - }, - _updateDatepicker: function(a) { - var b = this; - b.maxRows = 4; - var c = $.datepicker._getBorders(a.dpDiv); - instActive = a, - a.dpDiv.empty().append(this._generateHTML(a)); - var d = a.dpDiv.find("iframe.ui-datepicker-cover"); ! d.length || d.css({ - left: -c[0], - top: -c[1], - width: a.dpDiv.outerWidth(), - height: a.dpDiv.outerHeight() - }), - a.dpDiv.find("." + this._dayOverClass + " a").mouseover(); - var e = this._getNumberOfMonths(a), - f = e[1], - g = 17; - a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""), - f > 1 && a.dpDiv.addClass("ui-datepicker-multi-" + f).css("width", g * f + "em"), - a.dpDiv[(e[0] != 1 || e[1] != 1 ? "add": "remove") + "Class"]("ui-datepicker-multi"), - a.dpDiv[(this._get(a, "isRTL") ? "add": "remove") + "Class"]("ui-datepicker-rtl"), - a == $.datepicker._curInst && $.datepicker._datepickerShowing && a.input && a.input.is(":visible") && !a.input.is(":disabled") && a.input[0] != document.activeElement && a.input.focus(); - if (a.yearshtml) { - var h = a.yearshtml; - setTimeout(function() { - h === a.yearshtml && a.yearshtml && a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml), - h = a.yearshtml = null - }, - 0) - } - }, - _getBorders: function(a) { - var b = function(a) { - return { - thin: 1, - medium: 2, - thick: 3 - } [a] || a - }; - return [parseFloat(b(a.css("border-left-width"))), parseFloat(b(a.css("border-top-width")))] - }, - _checkOffset: function(a, b, c) { - var d = a.dpDiv.outerWidth(), - e = a.dpDiv.outerHeight(), - f = a.input ? a.input.outerWidth() : 0, - g = a.input ? a.input.outerHeight() : 0, - h = document.documentElement.clientWidth + $(document).scrollLeft(), - i = document.documentElement.clientHeight + $(document).scrollTop(); - b.left -= this._get(a, "isRTL") ? d - f: 0, - b.left -= c && b.left == a.input.offset().left ? $(document).scrollLeft() : 0, - b.top -= c && b.top == a.input.offset().top + g ? $(document).scrollTop() : 0, - b.left -= Math.min(b.left, b.left + d > h && h > d ? Math.abs(b.left + d - h) : 0), - b.top -= Math.min(b.top, b.top + e > i && i > e ? Math.abs(e + g) : 0); - return b - }, - _findPos: function(a) { - var b = this._getInst(a), - c = this._get(b, "isRTL"); - while (a && (a.type == "hidden" || a.nodeType != 1 || $.expr.filters.hidden(a))) a = a[c ? "previousSibling": "nextSibling"]; - var d = $(a).offset(); - return [d.left, d.top] - }, - _hideDatepicker: function(a) { - var b = this._curInst; - if (! (!b || a && b != $.data(a, PROP_NAME)) && this._datepickerShowing) { - var c = this._get(b, "showAnim"), - d = this._get(b, "duration"), - e = this, - f = function() { - $.datepicker._tidyDialog(b), - e._curInst = null - }; - $.effects && $.effects[c] ? b.dpDiv.hide(c, $.datepicker._get(b, "showOptions"), d, f) : b.dpDiv[c == "slideDown" ? "slideUp": c == "fadeIn" ? "fadeOut": "hide"](c ? d: null, f), - c || f(), - this._datepickerShowing = !1; - var g = this._get(b, "onClose"); - g && g.apply(b.input ? b.input[0] : null, [b.input ? b.input.val() : "", b]), - this._lastInput = null, - this._inDialog && (this._dialogInput.css({ - position: "absolute", - left: "0", - top: "-100px" - }), $.blockUI && ($.unblockUI(), $("body").append(this.dpDiv))), - this._inDialog = !1 - } - }, - _tidyDialog: function(a) { - a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar") - }, - _checkExternalClick: function(a) { - if ( !! $.datepicker._curInst) { - var b = $(a.target), - c = $.datepicker._getInst(b[0]); (b[0].id != $.datepicker._mainDivId && b.parents("#" + $.datepicker._mainDivId).length == 0 && !b.hasClass($.datepicker.markerClassName) && !b.closest("." + $.datepicker._triggerClass).length && $.datepicker._datepickerShowing && (!$.datepicker._inDialog || !$.blockUI) || b.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != c) && $.datepicker._hideDatepicker() - } - }, - _adjustDate: function(a, b, c) { - var d = $(a), - e = this._getInst(d[0]); - this._isDisabledDatepicker(d[0]) || (this._adjustInstDate(e, b + (c == "M" ? this._get(e, "showCurrentAtPos") : 0), c), this._updateDatepicker(e)) - }, - _gotoToday: function(a) { - var b = $(a), - c = this._getInst(b[0]); - if (this._get(c, "gotoCurrent") && c.currentDay) c.selectedDay = c.currentDay, - c.drawMonth = c.selectedMonth = c.currentMonth, - c.drawYear = c.selectedYear = c.currentYear; - else { - var d = new Date; - c.selectedDay = d.getDate(), - c.drawMonth = c.selectedMonth = d.getMonth(), - c.drawYear = c.selectedYear = d.getFullYear() - } - this._notifyChange(c), - this._adjustDate(b) - }, - _selectMonthYear: function(a, b, c) { - var d = $(a), - e = this._getInst(d[0]); - e["selected" + (c == "M" ? "Month": "Year")] = e["draw" + (c == "M" ? "Month": "Year")] = parseInt(b.options[b.selectedIndex].value, 10), - this._notifyChange(e), - this._adjustDate(d) - }, - _selectDay: function(a, b, c, d) { - var e = $(a); - if (!$(d).hasClass(this._unselectableClass) && !this._isDisabledDatepicker(e[0])) { - var f = this._getInst(e[0]); - f.selectedDay = f.currentDay = $("a", d).html(), - f.selectedMonth = f.currentMonth = b, - f.selectedYear = f.currentYear = c, - this._selectDate(a, this._formatDate(f, f.currentDay, f.currentMonth, f.currentYear)) - } - }, - _clearDate: function(a) { - var b = $(a), - c = this._getInst(b[0]); - this._selectDate(b, "") - }, - _selectDate: function(a, b) { - var c = $(a), - d = this._getInst(c[0]); - b = b != null ? b: this._formatDate(d), - d.input && d.input.val(b), - this._updateAlternate(d); - var e = this._get(d, "onSelect"); - e ? e.apply(d.input ? d.input[0] : null, [b, d]) : d.input && d.input.trigger("change"), - d.inline ? this._updateDatepicker(d) : (this._hideDatepicker(), this._lastInput = d.input[0], typeof d.input[0] != "object" && d.input.focus(), this._lastInput = null) - }, - _updateAlternate: function(a) { - var b = this._get(a, "altField"); - if (b) { - var c = this._get(a, "altFormat") || this._get(a, "dateFormat"), - d = this._getDate(a), - e = this.formatDate(c, d, this._getFormatConfig(a)); - $(b).each(function() { - $(this).val(e) - }) - } - }, - noWeekends: function(a) { - var b = a.getDay(); - return [b > 0 && b < 6, ""] - }, - iso8601Week: function(a) { - var b = new Date(a.getTime()); - b.setDate(b.getDate() + 4 - (b.getDay() || 7)); - var c = b.getTime(); - b.setMonth(0), - b.setDate(1); - return Math.floor(Math.round((c - b) / 864e5) / 7) + 1 - }, - parseDate: function(a, b, c) { - if (a == null || b == null) throw "Invalid arguments"; - b = typeof b == "object" ? b.toString() : b + ""; - if (b == "") return null; - var d = (c ? c.shortYearCutoff: null) || this._defaults.shortYearCutoff; - d = typeof d != "string" ? d: (new Date).getFullYear() % 100 + parseInt(d, 10); - var e = (c ? c.dayNamesShort: null) || this._defaults.dayNamesShort, - f = (c ? c.dayNames: null) || this._defaults.dayNames, - g = (c ? c.monthNamesShort: null) || this._defaults.monthNamesShort, - h = (c ? c.monthNames: null) || this._defaults.monthNames, - i = -1, - j = -1, - k = -1, - l = -1, - m = !1, - n = function(b) { - var c = s + 1 < a.length && a.charAt(s + 1) == b; - c && s++; - return c - }, - o = function(a) { - var c = n(a), - d = a == "@" ? 14 : a == "!" ? 20 : a == "y" && c ? 4 : a == "o" ? 3 : 2, - e = new RegExp("^\\d{1," + d + "}"), - f = b.substring(r).match(e); - if (!f) throw "Missing number at position " + r; - r += f[0].length; - return parseInt(f[0], 10) - }, - p = function(a, c, d) { - var e = $.map(n(a) ? d: c, - function(a, b) { - return [[b, a]] - }).sort(function(a, b) { - return - (a[1].length - b[1].length) - }), - f = -1; - $.each(e, - function(a, c) { - var d = c[1]; - if (b.substr(r, d.length).toLowerCase() == d.toLowerCase()) { - f = c[0], - r += d.length; - return ! 1 - } - }); - if (f != -1) return f + 1; - throw "Unknown name at position " + r - }, - q = function() { - if (b.charAt(r) != a.charAt(s)) throw "Unexpected literal at position " + r; - r++ - }, - r = 0; - for (var s = 0; s < a.length; s++) if (m) a.charAt(s) == "'" && !n("'") ? m = !1 : q(); - else switch (a.charAt(s)) { - case "d": - k = o("d"); - break; - case "D": - p("D", e, f); - break; - case "o": - l = o("o"); - break; - case "m": - j = o("m"); - break; - case "M": - j = p("M", g, h); - break; - case "y": - i = o("y"); - break; - case "@": - var t = new Date(o("@")); - i = t.getFullYear(), - j = t.getMonth() + 1, - k = t.getDate(); - break; - case "!": - var t = new Date((o("!") - this._ticksTo1970) / 1e4); - i = t.getFullYear(), - j = t.getMonth() + 1, - k = t.getDate(); - break; - case "'": - n("'") ? q() : m = !0; - break; - default: - q() - } - if (r < b.length) throw "Extra/unparsed characters found in date: " + b.substring(r); - i == -1 ? i = (new Date).getFullYear() : i < 100 && (i += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (i <= d ? 0 : -100)); - if (l > -1) { - j = 1, - k = l; - for (;;) { - var u = this._getDaysInMonth(i, j - 1); - if (k <= u) break; - j++, - k -= u - } - } - var t = this._daylightSavingAdjust(new Date(i, j - 1, k)); - if (t.getFullYear() != i || t.getMonth() + 1 != j || t.getDate() != k) throw "Invalid date"; - return t - }, - ATOM: "yy-mm-dd", - COOKIE: "D, dd M yy", - ISO_8601: "yy-mm-dd", - RFC_822: "D, d M y", - RFC_850: "DD, dd-M-y", - RFC_1036: "D, d M y", - RFC_1123: "D, d M yy", - RFC_2822: "D, d M yy", - RSS: "D, d M y", - TICKS: "!", - TIMESTAMP: "@", - W3C: "yy-mm-dd", - _ticksTo1970: (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) * 24 * 60 * 60 * 1e7, - formatDate: function(a, b, c) { - if (!b) return ""; - var d = (c ? c.dayNamesShort: null) || this._defaults.dayNamesShort, - e = (c ? c.dayNames: null) || this._defaults.dayNames, - f = (c ? c.monthNamesShort: null) || this._defaults.monthNamesShort, - g = (c ? c.monthNames: null) || this._defaults.monthNames, - h = function(b) { - var c = m + 1 < a.length && a.charAt(m + 1) == b; - c && m++; - return c - }, - i = function(a, b, c) { - var d = "" + b; - if (h(a)) while (d.length < c) d = "0" + d; - return d - }, - j = function(a, b, c, d) { - return h(a) ? d[b] : c[b] - }, - k = "", - l = !1; - if (b) for (var m = 0; m < a.length; m++) if (l) a.charAt(m) == "'" && !h("'") ? l = !1 : k += a.charAt(m); - else switch (a.charAt(m)) { - case "d": - k += i("d", b.getDate(), 2); - break; - case "D": - k += j("D", b.getDay(), d, e); - break; - case "o": - k += i("o", Math.round(((new Date(b.getFullYear(), b.getMonth(), b.getDate())).getTime() - (new Date(b.getFullYear(), 0, 0)).getTime()) / 864e5), 3); - break; - case "m": - k += i("m", b.getMonth() + 1, 2); - break; - case "M": - k += j("M", b.getMonth(), f, g); - break; - case "y": - k += h("y") ? b.getFullYear() : (b.getYear() % 100 < 10 ? "0": "") + b.getYear() % 100; - break; - case "@": - k += b.getTime(); - break; - case "!": - k += b.getTime() * 1e4 + this._ticksTo1970; - break; - case "'": - h("'") ? k += "'": l = !0; - break; - default: - k += a.charAt(m) - } - return k - }, - _possibleChars: function(a) { - var b = "", - c = !1, - d = function(b) { - var c = e + 1 < a.length && a.charAt(e + 1) == b; - c && e++; - return c - }; - for (var e = 0; e < a.length; e++) if (c) a.charAt(e) == "'" && !d("'") ? c = !1 : b += a.charAt(e); - else switch (a.charAt(e)) { - case "d": - case "m": - case "y": - case "@": - b += "0123456789"; - break; - case "D": - case "M": - return null; - case "'": - d("'") ? b += "'": c = !0; - break; - default: - b += a.charAt(e) - } - return b - }, - _get: function(a, b) { - return a.settings[b] !== undefined ? a.settings[b] : this._defaults[b] - }, - _setDateFromField: function(a, b) { - if (a.input.val() != a.lastVal) { - var c = this._get(a, "dateFormat"), - d = a.lastVal = a.input ? a.input.val() : null, - e, - f; - e = f = this._getDefaultDate(a); - var g = this._getFormatConfig(a); - try { - e = this.parseDate(c, d, g) || f - } catch(h) { - this.log(h), - d = b ? "": d - } - a.selectedDay = e.getDate(), - a.drawMonth = a.selectedMonth = e.getMonth(), - a.drawYear = a.selectedYear = e.getFullYear(), - a.currentDay = d ? e.getDate() : 0, - a.currentMonth = d ? e.getMonth() : 0, - a.currentYear = d ? e.getFullYear() : 0, - this._adjustInstDate(a) - } - }, - _getDefaultDate: function(a) { - return this._restrictMinMax(a, this._determineDate(a, this._get(a, "defaultDate"), new Date)) - }, - _determineDate: function(a, b, c) { - var d = function(a) { - var b = new Date; - b.setDate(b.getDate() + a); - return b - }, - e = function(b) { - try { - return $.datepicker.parseDate($.datepicker._get(a, "dateFormat"), b, $.datepicker._getFormatConfig(a)) - } catch(c) {} - var d = (b.toLowerCase().match(/^c/) ? $.datepicker._getDate(a) : null) || new Date, - e = d.getFullYear(), - f = d.getMonth(), - g = d.getDate(), - h = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, - i = h.exec(b); - while (i) { - switch (i[2] || "d") { - case "d": - case "D": - g += parseInt(i[1], 10); - break; - case "w": - case "W": - g += parseInt(i[1], 10) * 7; - break; - case "m": - case "M": - f += parseInt(i[1], 10), - g = Math.min(g, $.datepicker._getDaysInMonth(e, f)); - break; - case "y": - case "Y": - e += parseInt(i[1], 10), - g = Math.min(g, $.datepicker._getDaysInMonth(e, f)) - } - i = h.exec(b) - } - return new Date(e, f, g) - }, - f = b == null || b === "" ? c: typeof b == "string" ? e(b) : typeof b == "number" ? isNaN(b) ? c: d(b) : new Date(b.getTime()); - f = f && f.toString() == "Invalid Date" ? c: f, - f && (f.setHours(0), f.setMinutes(0), f.setSeconds(0), f.setMilliseconds(0)); - return this._daylightSavingAdjust(f) - }, - _daylightSavingAdjust: function(a) { - if (!a) return null; - a.setHours(a.getHours() > 12 ? a.getHours() + 2 : 0); - return a - }, - _setDate: function(a, b, c) { - var d = !b, - e = a.selectedMonth, - f = a.selectedYear, - g = this._restrictMinMax(a, this._determineDate(a, b, new Date)); - a.selectedDay = a.currentDay = g.getDate(), - a.drawMonth = a.selectedMonth = a.currentMonth = g.getMonth(), - a.drawYear = a.selectedYear = a.currentYear = g.getFullYear(), - (e != a.selectedMonth || f != a.selectedYear) && !c && this._notifyChange(a), - this._adjustInstDate(a), - a.input && a.input.val(d ? "": this._formatDate(a)) - }, - _getDate: function(a) { - var b = !a.currentYear || a.input && a.input.val() == "" ? null: this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay)); - return b - }, - _generateHTML: function(a) { - var b = new Date; - b = this._daylightSavingAdjust(new Date(b.getFullYear(), b.getMonth(), b.getDate())); - var c = this._get(a, "isRTL"), - d = this._get(a, "showButtonPanel"), - e = this._get(a, "hideIfNoPrevNext"), - f = this._get(a, "navigationAsDateFormat"), - g = this._getNumberOfMonths(a), - h = this._get(a, "showCurrentAtPos"), - i = this._get(a, "stepMonths"), - j = g[0] != 1 || g[1] != 1, - k = this._daylightSavingAdjust(a.currentDay ? new Date(a.currentYear, a.currentMonth, a.currentDay) : new Date(9999, 9, 9)), - l = this._getMinMaxDate(a, "min"), - m = this._getMinMaxDate(a, "max"), - n = a.drawMonth - h, - o = a.drawYear; - n < 0 && (n += 12, o--); - if (m) { - var p = this._daylightSavingAdjust(new Date(m.getFullYear(), m.getMonth() - g[0] * g[1] + 1, m.getDate())); - p = l && p < l ? l: p; - while (this._daylightSavingAdjust(new Date(o, n, 1)) > p) n--, - n < 0 && (n = 11, o--) - } - a.drawMonth = n, - a.drawYear = o; - var q = this._get(a, "prevText"); - q = f ? this.formatDate(q, this._daylightSavingAdjust(new Date(o, n - i, 1)), this._getFormatConfig(a)) : q; - var r = this._canAdjustMonth(a, -1, o, n) ? '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_' + dpuuid + ".datepicker._adjustDate('#" + a.id + "', -" + i + ", 'M');\"" + ' title="' + q + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "e": "w") + '">' + q + "</span></a>": e ? "": '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + q + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "e": "w") + '">' + q + "</span></a>", - s = this._get(a, "nextText"); - s = f ? this.formatDate(s, this._daylightSavingAdjust(new Date(o, n + i, 1)), this._getFormatConfig(a)) : s; - var t = this._canAdjustMonth(a, 1, o, n) ? '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_' + dpuuid + ".datepicker._adjustDate('#" + a.id + "', +" + i + ", 'M');\"" + ' title="' + s + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "w": "e") + '">' + s + "</span></a>": e ? "": '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + s + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "w": "e") + '">' + s + "</span></a>", - u = this._get(a, "currentText"), - v = this._get(a, "gotoCurrent") && a.currentDay ? k: b; - u = f ? this.formatDate(u, v, this._getFormatConfig(a)) : u; - var w = a.inline ? "": '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_' + dpuuid + '.datepicker._hideDatepicker();">' + this._get(a, "closeText") + "</button>", - x = d ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (c ? w: "") + (this._isInRange(a, v) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_' + dpuuid + ".datepicker._gotoToday('#" + a.id + "');\"" + ">" + u + "</button>": "") + (c ? "": w) + "</div>": "", - y = parseInt(this._get(a, "firstDay"), 10); - y = isNaN(y) ? 0 : y; - var z = this._get(a, "showWeek"), - A = this._get(a, "dayNames"), - B = this._get(a, "dayNamesShort"), - C = this._get(a, "dayNamesMin"), - D = this._get(a, "monthNames"), - E = this._get(a, "monthNamesShort"), - F = this._get(a, "beforeShowDay"), - G = this._get(a, "showOtherMonths"), - H = this._get(a, "selectOtherMonths"), - I = this._get(a, "calculateWeek") || this.iso8601Week, - J = this._getDefaultDate(a), - K = ""; - for (var L = 0; L < g[0]; L++) { - var M = ""; - this.maxRows = 4; - for (var N = 0; N < g[1]; N++) { - var O = this._daylightSavingAdjust(new Date(o, n, a.selectedDay)), - P = " ui-corner-all", - Q = ""; - if (j) { - Q += '<div class="ui-datepicker-group'; - if (g[1] > 1) switch (N) { - case 0: - Q += " ui-datepicker-group-first", - P = " ui-corner-" + (c ? "right": "left"); - break; - case g[1] - 1 : Q += " ui-datepicker-group-last", - P = " ui-corner-" + (c ? "left": "right"); - break; - default: - Q += " ui-datepicker-group-middle", - P = "" - } - Q += '">' - } - Q += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + P + '">' + (/all|left/.test(P) && L == 0 ? c ? t: r: "") + (/all|right/.test(P) && L == 0 ? c ? r: t: "") + this._generateMonthYearHeader(a, n, o, l, m, L > 0 || N > 0, D, E) + '</div><table class="ui-datepicker-calendar"><thead>' + "<tr>"; - var R = z ? '<th class="ui-datepicker-week-col">' + this._get(a, "weekHeader") + "</th>": ""; - for (var S = 0; S < 7; S++) { - var T = (S + y) % 7; - R += "<th" + ((S + y + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"': "") + ">" + '<span title="' + A[T] + '">' + C[T] + "</span></th>" - } - Q += R + "</tr></thead><tbody>"; - var U = this._getDaysInMonth(o, n); - o == a.selectedYear && n == a.selectedMonth && (a.selectedDay = Math.min(a.selectedDay, U)); - var V = (this._getFirstDayOfMonth(o, n) - y + 7) % 7, - W = Math.ceil((V + U) / 7), - X = j ? this.maxRows > W ? this.maxRows: W: W; - this.maxRows = X; - var Y = this._daylightSavingAdjust(new Date(o, n, 1 - V)); - for (var Z = 0; Z < X; Z++) { - Q += "<tr>"; - var _ = z ? '<td class="ui-datepicker-week-col">' + this._get(a, "calculateWeek")(Y) + "</td>": ""; - for (var S = 0; S < 7; S++) { - var ba = F ? F.apply(a.input ? a.input[0] : null, [Y]) : [!0, ""], - bb = Y.getMonth() != n, - bc = bb && !H || !ba[0] || l && Y < l || m && Y > m; - _ += '<td class="' + ((S + y + 6) % 7 >= 5 ? " ui-datepicker-week-end": "") + (bb ? " ui-datepicker-other-month": "") + (Y.getTime() == O.getTime() && n == a.selectedMonth && a._keyEvent || J.getTime() == Y.getTime() && J.getTime() == O.getTime() ? " " + this._dayOverClass: "") + (bc ? " " + this._unselectableClass + " ui-state-disabled": "") + (bb && !G ? "": " " + ba[1] + (Y.getTime() == k.getTime() ? " " + this._currentClass: "") + (Y.getTime() == b.getTime() ? " ui-datepicker-today": "")) + '"' + ((!bb || G) && ba[2] ? ' title="' + ba[2] + '"': "") + (bc ? "": ' onclick="DP_jQuery_' + dpuuid + ".datepicker._selectDay('#" + a.id + "'," + Y.getMonth() + "," + Y.getFullYear() + ', this);return false;"') + ">" + (bb && !G ? " ": bc ? '<span class="ui-state-default">' + Y.getDate() + "</span>": '<a class="ui-state-default' + (Y.getTime() == b.getTime() ? " ui-state-highlight": "") + (Y.getTime() == k.getTime() ? " ui-state-active": "") + (bb ? " ui-priority-secondary": "") + '" href="#">' + Y.getDate() + "</a>") + "</td>", - Y.setDate(Y.getDate() + 1), - Y = this._daylightSavingAdjust(Y) - } - Q += _ + "</tr>" - } - n++, - n > 11 && (n = 0, o++), - Q += "</tbody></table>" + (j ? "</div>" + (g[0] > 0 && N == g[1] - 1 ? '<div class="ui-datepicker-row-break"></div>': "") : ""), - M += Q - } - K += M - } - K += x + ($.browser.msie && parseInt($.browser.version, 10) < 7 && !a.inline ? '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>': ""), - a._keyEvent = !1; - return K - }, - _generateMonthYearHeader: function(a, b, c, d, e, f, g, h) { - var i = this._get(a, "changeMonth"), - j = this._get(a, "changeYear"), - k = this._get(a, "showMonthAfterYear"), - l = '<div class="ui-datepicker-title">', - m = ""; - if (f || !i) m += '<span class="ui-datepicker-month">' + g[b] + "</span>"; - else { - var n = d && d.getFullYear() == c, - o = e && e.getFullYear() == c; - m += '<select class="ui-datepicker-month" onchange="DP_jQuery_' + dpuuid + ".datepicker._selectMonthYear('#" + a.id + "', this, 'M');\" " + ">"; - for (var p = 0; p < 12; p++)(!n || p >= d.getMonth()) && (!o || p <= e.getMonth()) && (m += '<option value="' + p + '"' + (p == b ? ' selected="selected"': "") + ">" + h[p] + "</option>"); - m += "</select>" - } - k || (l += m + (f || !i || !j ? " ": "")); - if (!a.yearshtml) { - a.yearshtml = ""; - if (f || !j) l += '<span class="ui-datepicker-year">' + c + "</span>"; - else { - var q = this._get(a, "yearRange").split(":"), - r = (new Date).getFullYear(), - s = function(a) { - var b = a.match(/c[+-].*/) ? c + parseInt(a.substring(1), 10) : a.match(/[+-].*/) ? r + parseInt(a, 10) : parseInt(a, 10); - return isNaN(b) ? r: b - }, - t = s(q[0]), - u = Math.max(t, s(q[1] || "")); - t = d ? Math.max(t, d.getFullYear()) : t, - u = e ? Math.min(u, e.getFullYear()) : u, - a.yearshtml += '<select class="ui-datepicker-year" onchange="DP_jQuery_' + dpuuid + ".datepicker._selectMonthYear('#" + a.id + "', this, 'Y');\" " + ">"; - for (; t <= u; t++) a.yearshtml += '<option value="' + t + '"' + (t == c ? ' selected="selected"': "") + ">" + t + "</option>"; - a.yearshtml += "</select>", - l += a.yearshtml, - a.yearshtml = null - } - } - l += this._get(a, "yearSuffix"), - k && (l += (f || !i || !j ? " ": "") + m), - l += "</div>"; - return l - }, - _adjustInstDate: function(a, b, c) { - var d = a.drawYear + (c == "Y" ? b: 0), - e = a.drawMonth + (c == "M" ? b: 0), - f = Math.min(a.selectedDay, this._getDaysInMonth(d, e)) + (c == "D" ? b: 0), - g = this._restrictMinMax(a, this._daylightSavingAdjust(new Date(d, e, f))); - a.selectedDay = g.getDate(), - a.drawMonth = a.selectedMonth = g.getMonth(), - a.drawYear = a.selectedYear = g.getFullYear(), - (c == "M" || c == "Y") && this._notifyChange(a) - }, - _restrictMinMax: function(a, b) { - var c = this._getMinMaxDate(a, "min"), - d = this._getMinMaxDate(a, "max"), - e = c && b < c ? c: b; - e = d && e > d ? d: e; - return e - }, - _notifyChange: function(a) { - var b = this._get(a, "onChangeMonthYear"); - b && b.apply(a.input ? a.input[0] : null, [a.selectedYear, a.selectedMonth + 1, a]) - }, - _getNumberOfMonths: function(a) { - var b = this._get(a, "numberOfMonths"); - return b == null ? [1, 1] : typeof b == "number" ? [1, b] : b - }, - _getMinMaxDate: function(a, b) { - return this._determineDate(a, this._get(a, b + "Date"), null) - }, - _getDaysInMonth: function(a, b) { - return 32 - this._daylightSavingAdjust(new Date(a, b, 32)).getDate() - }, - _getFirstDayOfMonth: function(a, b) { - return (new Date(a, b, 1)).getDay() - }, - _canAdjustMonth: function(a, b, c, d) { - var e = this._getNumberOfMonths(a), - f = this._daylightSavingAdjust(new Date(c, d + (b < 0 ? b: e[0] * e[1]), 1)); - b < 0 && f.setDate(this._getDaysInMonth(f.getFullYear(), f.getMonth())); - return this._isInRange(a, f) - }, - _isInRange: function(a, b) { - var c = this._getMinMaxDate(a, "min"), - d = this._getMinMaxDate(a, "max"); - return (!c || b.getTime() >= c.getTime()) && (!d || b.getTime() <= d.getTime()) - }, - _getFormatConfig: function(a) { - var b = this._get(a, "shortYearCutoff"); - b = typeof b != "string" ? b: (new Date).getFullYear() % 100 + parseInt(b, 10); - return { - shortYearCutoff: b, - dayNamesShort: this._get(a, "dayNamesShort"), - dayNames: this._get(a, "dayNames"), - monthNamesShort: this._get(a, "monthNamesShort"), - monthNames: this._get(a, "monthNames") - } - }, - _formatDate: function(a, b, c, d) { - b || (a.currentDay = a.selectedDay, a.currentMonth = a.selectedMonth, a.currentYear = a.selectedYear); - var e = b ? typeof b == "object" ? b: this._daylightSavingAdjust(new Date(d, c, b)) : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay)); - return this.formatDate(this._get(a, "dateFormat"), e, this._getFormatConfig(a)) - } - }), - $.fn.datepicker = function(a) { - if (!this.length) return this; - $.datepicker.initialized || ($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv), $.datepicker.initialized = !0); - var b = Array.prototype.slice.call(arguments, 1); - if (typeof a == "string" && (a == "isDisabled" || a == "getDate" || a == "widget")) return $.datepicker["_" + a + "Datepicker"].apply($.datepicker, [this[0]].concat(b)); - if (a == "option" && arguments.length == 2 && typeof arguments[1] == "string") return $.datepicker["_" + a + "Datepicker"].apply($.datepicker, [this[0]].concat(b)); - return this.each(function() { - typeof a == "string" ? $.datepicker["_" + a + "Datepicker"].apply($.datepicker, [this].concat(b)) : $.datepicker._attachDatepicker(this, a) - }) - }, - $.datepicker = new Datepicker, - $.datepicker.initialized = !1, - $.datepicker.uuid = (new Date).getTime(), - $.datepicker.version = "1.8.18", - window["DP_jQuery_" + dpuuid] = $ -})(jQuery); -/* - * jQuery UI Effects 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/ - */ -jQuery.effects || -function(a, b) { - function l(b) { - if (!b || typeof b == "number" || a.fx.speeds[b]) return ! 0; - if (typeof b == "string" && !a.effects[b]) return ! 0; - return ! 1 - } - function k(b, c, d, e) { - typeof b == "object" && (e = c, d = null, c = b, b = c.effect), - a.isFunction(c) && (e = c, d = null, c = {}); - if (typeof c == "number" || a.fx.speeds[c]) e = d, - d = c, - c = {}; - a.isFunction(d) && (e = d, d = null), - c = c || {}, - d = d || c.duration, - d = a.fx.off ? 0 : typeof d == "number" ? d: d in a.fx.speeds ? a.fx.speeds[d] : a.fx.speeds._default, - e = e || c.complete; - return [b, c, d, e] - } - function j(a, b) { - var c = { - _: 0 - }, - d; - for (d in b) a[d] != b[d] && (c[d] = b[d]); - return c - } - function i(b) { - var c, d; - for (c in b) d = b[c], - (d == null || a.isFunction(d) || c in g || /scrollbar/.test(c) || !/color/i.test(c) && isNaN(parseFloat(d))) && delete b[c]; - return b - } - function h() { - var a = document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle, - b = {}, - c, - d; - if (a && a.length && a[0] && a[a[0]]) { - var e = a.length; - while (e--) c = a[e], - typeof a[c] == "string" && (d = c.replace(/\-(\w)/g, - function(a, b) { - return b.toUpperCase() - }), b[d] = a[c]) - } else for (c in a) typeof a[c] == "string" && (b[c] = a[c]); - return b - } - function d(b, d) { - var e; - do { - e = a.curCSS(b, d); - if (e != "" && e != "transparent" || a.nodeName(b, "body")) break; - d = "backgroundColor" - } while ( b = b . parentNode ); - return c(e) - } - function c(b) { - var c; - if (b && b.constructor == Array && b.length == 3) return b; - if (c = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b)) return [parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10)]; - if (c = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b)) return [parseFloat(c[1]) * 2.55, parseFloat(c[2]) * 2.55, parseFloat(c[3]) * 2.55]; - if (c = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b)) return [parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16)]; - if (c = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b)) return [parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16)]; - if (c = /rgba\(0, 0, 0, 0\)/.exec(b)) return e.transparent; - return e[a.trim(b).toLowerCase()] - } - a.effects = {}, - a.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderColor", "color", "outlineColor"], - function(b, e) { - a.fx.step[e] = function(a) { - a.colorInit || (a.start = d(a.elem, e), a.end = c(a.end), a.colorInit = !0), - a.elem.style[e] = "rgb(" + Math.max(Math.min(parseInt(a.pos * (a.end[0] - a.start[0]) + a.start[0], 10), 255), 0) + "," + Math.max(Math.min(parseInt(a.pos * (a.end[1] - a.start[1]) + a.start[1], 10), 255), 0) + "," + Math.max(Math.min(parseInt(a.pos * (a.end[2] - a.start[2]) + a.start[2], 10), 255), 0) + ")" - } - }); - var e = { - aqua: [0, 255, 255], - azure: [240, 255, 255], - beige: [245, 245, 220], - black: [0, 0, 0], - blue: [0, 0, 255], - brown: [165, 42, 42], - cyan: [0, 255, 255], - darkblue: [0, 0, 139], - darkcyan: [0, 139, 139], - darkgrey: [169, 169, 169], - darkgreen: [0, 100, 0], - darkkhaki: [189, 183, 107], - darkmagenta: [139, 0, 139], - darkolivegreen: [85, 107, 47], - darkorange: [255, 140, 0], - darkorchid: [153, 50, 204], - darkred: [139, 0, 0], - darksalmon: [233, 150, 122], - darkviolet: [148, 0, 211], - fuchsia: [255, 0, 255], - gold: [255, 215, 0], - green: [0, 128, 0], - indigo: [75, 0, 130], - khaki: [240, 230, 140], - lightblue: [173, 216, 230], - lightcyan: [224, 255, 255], - lightgreen: [144, 238, 144], - lightgrey: [211, 211, 211], - lightpink: [255, 182, 193], - lightyellow: [255, 255, 224], - lime: [0, 255, 0], - magenta: [255, 0, 255], - maroon: [128, 0, 0], - navy: [0, 0, 128], - olive: [128, 128, 0], - orange: [255, 165, 0], - pink: [255, 192, 203], - purple: [128, 0, 128], - violet: [128, 0, 128], - red: [255, 0, 0], - silver: [192, 192, 192], - white: [255, 255, 255], - yellow: [255, 255, 0], - transparent: [255, 255, 255] - }, - f = ["add", "remove", "toggle"], - g = { - border: 1, - borderBottom: 1, - borderColor: 1, - borderLeft: 1, - borderRight: 1, - borderTop: 1, - borderWidth: 1, - margin: 1, - padding: 1 - }; - a.effects.animateClass = function(b, c, d, e) { - a.isFunction(d) && (e = d, d = null); - return this.queue(function() { - var g = a(this), - k = g.attr("style") || " ", - l = i(h.call(this)), - m, - n = g.attr("class"); - a.each(f, - function(a, c) { - b[c] && g[c + "Class"](b[c]) - }), - m = i(h.call(this)), - g.attr("class", n), - g.animate(j(l, m), { - queue: !1, - duration: c, - easing: d, - complete: function() { - a.each(f, - function(a, c) { - b[c] && g[c + "Class"](b[c]) - }), - typeof g.attr("style") == "object" ? (g.attr("style").cssText = "", g.attr("style").cssText = k) : g.attr("style", k), - e && e.apply(this, arguments), - a.dequeue(this) - } - }) - }) - }, - a.fn.extend({ - _addClass: a.fn.addClass, - addClass: function(b, c, d, e) { - return c ? a.effects.animateClass.apply(this, [{ - add: b - }, - c, d, e]) : this._addClass(b) - }, - _removeClass: a.fn.removeClass, - removeClass: function(b, c, d, e) { - return c ? a.effects.animateClass.apply(this, [{ - remove: b - }, - c, d, e]) : this._removeClass(b) - }, - _toggleClass: a.fn.toggleClass, - toggleClass: function(c, d, e, f, g) { - return typeof d == "boolean" || d === b ? e ? a.effects.animateClass.apply(this, [d ? { - add: c - }: { - remove: c - }, - e, f, g]) : this._toggleClass(c, d) : a.effects.animateClass.apply(this, [{ - toggle: c - }, - d, e, f]) - }, - switchClass: function(b, c, d, e, f) { - return a.effects.animateClass.apply(this, [{ - add: c, - remove: b - }, - d, e, f]) - } - }), - a.extend(a.effects, { - version: "1.8.18", - save: function(a, b) { - for (var c = 0; c < b.length; c++) b[c] !== null && a.data("ec.storage." + b[c], a[0].style[b[c]]) - }, - restore: function(a, b) { - for (var c = 0; c < b.length; c++) b[c] !== null && a.css(b[c], a.data("ec.storage." + b[c])) - }, - setMode: function(a, b) { - b == "toggle" && (b = a.is(":hidden") ? "show": "hide"); - return b - }, - getBaseline: function(a, b) { - var c, d; - switch (a[0]) { - case "top": - c = 0; - break; - case "middle": - c = .5; - break; - case "bottom": - c = 1; - break; - default: - c = a[0] / b.height - } - switch (a[1]) { - case "left": - d = 0; - break; - case "center": - d = .5; - break; - case "right": - d = 1; - break; - default: - d = a[1] / b.width - } - return { - x: d, - y: c - } - }, - createWrapper: function(b) { - if (b.parent().is(".ui-effects-wrapper")) return b.parent(); - var c = { - width: b.outerWidth(!0), - height: b.outerHeight(!0), - "float": b.css("float") - }, - d = a("<div></div>").addClass("ui-effects-wrapper").css({ - fontSize: "100%", - background: "transparent", - border: "none", - margin: 0, - padding: 0 - }), - e = document.activeElement; - b.wrap(d), - (b[0] === e || a.contains(b[0], e)) && a(e).focus(), - d = b.parent(), - b.css("position") == "static" ? (d.css({ - position: "relative" - }), b.css({ - position: "relative" - })) : (a.extend(c, { - position: b.css("position"), - zIndex: b.css("z-index") - }), a.each(["top", "left", "bottom", "right"], - function(a, d) { - c[d] = b.css(d), - isNaN(parseInt(c[d], 10)) && (c[d] = "auto") - }), b.css({ - position: "relative", - top: 0, - left: 0, - right: "auto", - bottom: "auto" - })); - return d.css(c).show() - }, - removeWrapper: function(b) { - var c, d = document.activeElement; - if (b.parent().is(".ui-effects-wrapper")) { - c = b.parent().replaceWith(b), - (b[0] === d || a.contains(b[0], d)) && a(d).focus(); - return c - } - return b - }, - setTransition: function(b, c, d, e) { - e = e || {}, - a.each(c, - function(a, c) { - unit = b.cssUnit(c), - unit[0] > 0 && (e[c] = unit[0] * d + unit[1]) - }); - return e - } - }), - a.fn.extend({ - effect: function(b, c, d, e) { - var f = k.apply(this, arguments), - g = { - options: f[1], - duration: f[2], - callback: f[3] - }, - h = g.options.mode, - i = a.effects[b]; - if (a.fx.off || !i) return h ? this[h](g.duration, g.callback) : this.each(function() { - g.callback && g.callback.call(this) - }); - return i.call(this, g) - }, - _show: a.fn.show, - show: function(a) { - if (l(a)) return this._show.apply(this, arguments); - var b = k.apply(this, arguments); - b[1].mode = "show"; - return this.effect.apply(this, b) - }, - _hide: a.fn.hide, - hide: function(a) { - if (l(a)) return this._hide.apply(this, arguments); - var b = k.apply(this, arguments); - b[1].mode = "hide"; - return this.effect.apply(this, b) - }, - __toggle: a.fn.toggle, - toggle: function(b) { - if (l(b) || typeof b == "boolean" || a.isFunction(b)) return this.__toggle.apply(this, arguments); - var c = k.apply(this, arguments); - c[1].mode = "toggle"; - return this.effect.apply(this, c) - }, - cssUnit: function(b) { - var c = this.css(b), - d = []; - a.each(["em", "px", "%", "pt"], - function(a, b) { - c.indexOf(b) > 0 && (d = [parseFloat(c), b]) - }); - return d - } - }), - a.easing.jswing = a.easing.swing, - a.extend(a.easing, { - def: "easeOutQuad", - swing: function(b, c, d, e, f) { - return a.easing[a.easing.def](b, c, d, e, f) - }, - easeInQuad: function(a, b, c, d, e) { - return d * (b /= e) * b + c - }, - easeOutQuad: function(a, b, c, d, e) { - return - d * (b /= e) * (b - 2) + c - }, - easeInOutQuad: function(a, b, c, d, e) { - if ((b /= e / 2) < 1) return d / 2 * b * b + c; - return - d / 2 * (--b * (b - 2) - 1) + c - }, - easeInCubic: function(a, b, c, d, e) { - return d * (b /= e) * b * b + c - }, - easeOutCubic: function(a, b, c, d, e) { - return d * ((b = b / e - 1) * b * b + 1) + c - }, - easeInOutCubic: function(a, b, c, d, e) { - if ((b /= e / 2) < 1) return d / 2 * b * b * b + c; - return d / 2 * ((b -= 2) * b * b + 2) + c - }, - easeInQuart: function(a, b, c, d, e) { - return d * (b /= e) * b * b * b + c - }, - easeOutQuart: function(a, b, c, d, e) { - return - d * ((b = b / e - 1) * b * b * b - 1) + c - }, - easeInOutQuart: function(a, b, c, d, e) { - if ((b /= e / 2) < 1) return d / 2 * b * b * b * b + c; - return - d / 2 * ((b -= 2) * b * b * b - 2) + c - }, - easeInQuint: function(a, b, c, d, e) { - return d * (b /= e) * b * b * b * b + c - }, - easeOutQuint: function(a, b, c, d, e) { - return d * ((b = b / e - 1) * b * b * b * b + 1) + c - }, - easeInOutQuint: function(a, b, c, d, e) { - if ((b /= e / 2) < 1) return d / 2 * b * b * b * b * b + c; - return d / 2 * ((b -= 2) * b * b * b * b + 2) + c - }, - easeInSine: function(a, b, c, d, e) { - return - d * Math.cos(b / e * (Math.PI / 2)) + d + c - }, - easeOutSine: function(a, b, c, d, e) { - return d * Math.sin(b / e * (Math.PI / 2)) + c - }, - easeInOutSine: function(a, b, c, d, e) { - return - d / 2 * (Math.cos(Math.PI * b / e) - 1) + c - }, - easeInExpo: function(a, b, c, d, e) { - return b == 0 ? c: d * Math.pow(2, 10 * (b / e - 1)) + c - }, - easeOutExpo: function(a, b, c, d, e) { - return b == e ? c + d: d * ( - Math.pow(2, -10 * b / e) + 1) + c - }, - easeInOutExpo: function(a, b, c, d, e) { - if (b == 0) return c; - if (b == e) return c + d; - if ((b /= e / 2) < 1) return d / 2 * Math.pow(2, 10 * (b - 1)) + c; - return d / 2 * ( - Math.pow(2, -10 * --b) + 2) + c - }, - easeInCirc: function(a, b, c, d, e) { - return - d * (Math.sqrt(1 - (b /= e) * b) - 1) + c - }, - easeOutCirc: function(a, b, c, d, e) { - return d * Math.sqrt(1 - (b = b / e - 1) * b) + c - }, - easeInOutCirc: function(a, b, c, d, e) { - if ((b /= e / 2) < 1) return - d / 2 * (Math.sqrt(1 - b * b) - 1) + c; - return d / 2 * (Math.sqrt(1 - (b -= 2) * b) + 1) + c - }, - easeInElastic: function(a, b, c, d, e) { - var f = 1.70158, - g = 0, - h = d; - if (b == 0) return c; - if ((b /= e) == 1) return c + d; - g || (g = e * .3); - if (h < Math.abs(d)) { - h = d; - var f = g / 4 - } else var f = g / (2 * Math.PI) * Math.asin(d / h); - return - (h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g)) + c - }, - easeOutElastic: function(a, b, c, d, e) { - var f = 1.70158, - g = 0, - h = d; - if (b == 0) return c; - if ((b /= e) == 1) return c + d; - g || (g = e * .3); - if (h < Math.abs(d)) { - h = d; - var f = g / 4 - } else var f = g / (2 * Math.PI) * Math.asin(d / h); - return h * Math.pow(2, -10 * b) * Math.sin((b * e - f) * 2 * Math.PI / g) + d + c - }, - easeInOutElastic: function(a, b, c, d, e) { - var f = 1.70158, - g = 0, - h = d; - if (b == 0) return c; - if ((b /= e / 2) == 2) return c + d; - g || (g = e * .3 * 1.5); - if (h < Math.abs(d)) { - h = d; - var f = g / 4 - } else var f = g / (2 * Math.PI) * Math.asin(d / h); - if (b < 1) return - 0.5 * h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) + c; - return h * Math.pow(2, -10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) * .5 + d + c - }, - easeInBack: function(a, c, d, e, f, g) { - g == b && (g = 1.70158); - return e * (c /= f) * c * ((g + 1) * c - g) + d - }, - easeOutBack: function(a, c, d, e, f, g) { - g == b && (g = 1.70158); - return e * ((c = c / f - 1) * c * ((g + 1) * c + g) + 1) + d - }, - easeInOutBack: function(a, c, d, e, f, g) { - g == b && (g = 1.70158); - if ((c /= f / 2) < 1) return e / 2 * c * c * (((g *= 1.525) + 1) * c - g) + d; - return e / 2 * ((c -= 2) * c * (((g *= 1.525) + 1) * c + g) + 2) + d - }, - easeInBounce: function(b, c, d, e, f) { - return e - a.easing.easeOutBounce(b, f - c, 0, e, f) + d - }, - easeOutBounce: function(a, b, c, d, e) { - return (b /= e) < 1 / 2.75 ? d * 7.5625 * b * b + c: b < 2 / 2.75 ? d * (7.5625 * (b -= 1.5 / 2.75) * b + .75) + c: b < 2.5 / 2.75 ? d * (7.5625 * (b -= 2.25 / 2.75) * b + .9375) + c: d * (7.5625 * (b -= 2.625 / 2.75) * b + .984375) + c - }, - easeInOutBounce: function(b, c, d, e, f) { - if (c < f / 2) return a.easing.easeInBounce(b, c * 2, 0, e, f) * .5 + d; - return a.easing.easeOutBounce(b, c * 2 - f, 0, e, f) * .5 + e * .5 + d - } - }) -} (jQuery); -/* - * jQuery UI Effects Blind 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Blind - * - * Depends: - * jquery.effects.core.js - */ -(function(a, b) { - a.effects.blind = function(b) { - return this.queue(function() { - var c = a(this), - d = ["position", "top", "bottom", "left", "right"], - e = a.effects.setMode(c, b.options.mode || "hide"), - f = b.options.direction || "vertical"; - a.effects.save(c, d), - c.show(); - var g = a.effects.createWrapper(c).css({ - overflow: "hidden" - }), - h = f == "vertical" ? "height": "width", - i = f == "vertical" ? g.height() : g.width(); - e == "show" && g.css(h, 0); - var j = {}; - j[h] = e == "show" ? i: 0, - g.animate(j, b.duration, b.options.easing, - function() { - e == "hide" && c.hide(), - a.effects.restore(c, d), - a.effects.removeWrapper(c), - b.callback && b.callback.apply(c[0], arguments), - c.dequeue() - }) - }) - } -})(jQuery); -/* - * jQuery UI Effects Bounce 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Bounce - * - * Depends: - * jquery.effects.core.js - */ -(function(a, b) { - a.effects.bounce = function(b) { - return this.queue(function() { - var c = a(this), - d = ["position", "top", "bottom", "left", "right"], - e = a.effects.setMode(c, b.options.mode || "effect"), - f = b.options.direction || "up", - g = b.options.distance || 20, - h = b.options.times || 5, - i = b.duration || 250; - /show|hide/.test(e) && d.push("opacity"), - a.effects.save(c, d), - c.show(), - a.effects.createWrapper(c); - var j = f == "up" || f == "down" ? "top": "left", - k = f == "up" || f == "left" ? "pos": "neg", - g = b.options.distance || (j == "top" ? c.outerHeight({ - margin: !0 - }) / 3 : c.outerWidth({ - margin: !0 - }) / 3); - e == "show" && c.css("opacity", 0).css(j, k == "pos" ? -g: g), - e == "hide" && (g = g / (h * 2)), - e != "hide" && h--; - if (e == "show") { - var l = { - opacity: 1 - }; - l[j] = (k == "pos" ? "+=": "-=") + g, - c.animate(l, i / 2, b.options.easing), - g = g / 2, - h-- - } - for (var m = 0; m < h; m++) { - var n = {}, - p = {}; - n[j] = (k == "pos" ? "-=": "+=") + g, - p[j] = (k == "pos" ? "+=": "-=") + g, - c.animate(n, i / 2, b.options.easing).animate(p, i / 2, b.options.easing), - g = e == "hide" ? g * 2 : g / 2 - } - if (e == "hide") { - var l = { - opacity: 0 - }; - l[j] = (k == "pos" ? "-=": "+=") + g, - c.animate(l, i / 2, b.options.easing, - function() { - c.hide(), - a.effects.restore(c, d), - a.effects.removeWrapper(c), - b.callback && b.callback.apply(this, arguments) - }) - } else { - var n = {}, - p = {}; - n[j] = (k == "pos" ? "-=": "+=") + g, - p[j] = (k == "pos" ? "+=": "-=") + g, - c.animate(n, i / 2, b.options.easing).animate(p, i / 2, b.options.easing, - function() { - a.effects.restore(c, d), - a.effects.removeWrapper(c), - b.callback && b.callback.apply(this, arguments) - }) - } - c.queue("fx", - function() { - c.dequeue() - }), - c.dequeue() - }) - } -})(jQuery); -/* - * jQuery UI Effects Clip 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Clip - * - * Depends: - * jquery.effects.core.js - */ -(function(a, b) { - a.effects.clip = function(b) { - return this.queue(function() { - var c = a(this), - d = ["position", "top", "bottom", "left", "right", "height", "width"], - e = a.effects.setMode(c, b.options.mode || "hide"), - f = b.options.direction || "vertical"; - a.effects.save(c, d), - c.show(); - var g = a.effects.createWrapper(c).css({ - overflow: "hidden" - }), - h = c[0].tagName == "IMG" ? g: c, - i = { - size: f == "vertical" ? "height": "width", - position: f == "vertical" ? "top": "left" - }, - j = f == "vertical" ? h.height() : h.width(); - e == "show" && (h.css(i.size, 0), h.css(i.position, j / 2)); - var k = {}; - k[i.size] = e == "show" ? j: 0, - k[i.position] = e == "show" ? 0 : j / 2, - h.animate(k, { - queue: !1, - duration: b.duration, - easing: b.options.easing, - complete: function() { - e == "hide" && c.hide(), - a.effects.restore(c, d), - a.effects.removeWrapper(c), - b.callback && b.callback.apply(c[0], arguments), - c.dequeue() - } - }) - }) - } -})(jQuery); -/* - * jQuery UI Effects Drop 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Drop - * - * Depends: - * jquery.effects.core.js - */ -(function(a, b) { - a.effects.drop = function(b) { - return this.queue(function() { - var c = a(this), - d = ["position", "top", "bottom", "left", "right", "opacity"], - e = a.effects.setMode(c, b.options.mode || "hide"), - f = b.options.direction || "left"; - a.effects.save(c, d), - c.show(), - a.effects.createWrapper(c); - var g = f == "up" || f == "down" ? "top": "left", - h = f == "up" || f == "left" ? "pos": "neg", - i = b.options.distance || (g == "top" ? c.outerHeight({ - margin: !0 - }) / 2 : c.outerWidth({ - margin: !0 - }) / 2); - e == "show" && c.css("opacity", 0).css(g, h == "pos" ? -i: i); - var j = { - opacity: e == "show" ? 1 : 0 - }; - j[g] = (e == "show" ? h == "pos" ? "+=": "-=": h == "pos" ? "-=": "+=") + i, - c.animate(j, { - queue: !1, - duration: b.duration, - easing: b.options.easing, - complete: function() { - e == "hide" && c.hide(), - a.effects.restore(c, d), - a.effects.removeWrapper(c), - b.callback && b.callback.apply(this, arguments), - c.dequeue() - } - }) - }) - } -})(jQuery); -/* - * jQuery UI Effects Explode 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Explode - * - * Depends: - * jquery.effects.core.js - */ -(function(a, b) { - a.effects.explode = function(b) { - return this.queue(function() { - var c = b.options.pieces ? Math.round(Math.sqrt(b.options.pieces)) : 3, - d = b.options.pieces ? Math.round(Math.sqrt(b.options.pieces)) : 3; - b.options.mode = b.options.mode == "toggle" ? a(this).is(":visible") ? "hide": "show": b.options.mode; - var e = a(this).show().css("visibility", "hidden"), - f = e.offset(); - f.top -= parseInt(e.css("marginTop"), 10) || 0, - f.left -= parseInt(e.css("marginLeft"), 10) || 0; - var g = e.outerWidth(!0), - h = e.outerHeight(!0); - for (var i = 0; i < c; i++) for (var j = 0; j < d; j++) e.clone().appendTo("body").wrap("<div></div>").css({ - position: "absolute", - visibility: "visible", - left: -j * (g / d), - top: -i * (h / c) - }).parent().addClass("ui-effects-explode").css({ - position: "absolute", - overflow: "hidden", - width: g / d, - height: h / c, - left: f.left + j * (g / d) + (b.options.mode == "show" ? (j - Math.floor(d / 2)) * (g / d) : 0), - top: f.top + i * (h / c) + (b.options.mode == "show" ? (i - Math.floor(c / 2)) * (h / c) : 0), - opacity: b.options.mode == "show" ? 0 : 1 - }).animate({ - left: f.left + j * (g / d) + (b.options.mode == "show" ? 0 : (j - Math.floor(d / 2)) * (g / d)), - top: f.top + i * (h / c) + (b.options.mode == "show" ? 0 : (i - Math.floor(c / 2)) * (h / c)), - opacity: b.options.mode == "show" ? 1 : 0 - }, - b.duration || 500); - setTimeout(function() { - b.options.mode == "show" ? e.css({ - visibility: "visible" - }) : e.css({ - visibility: "visible" - }).hide(), - b.callback && b.callback.apply(e[0]), - e.dequeue(), - a("div.ui-effects-explode").remove() - }, - b.duration || 500) - }) - } -})(jQuery); -/* - * jQuery UI Effects Fade 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Fade - * - * Depends: - * jquery.effects.core.js - */ -(function(a, b) { - a.effects.fade = function(b) { - return this.queue(function() { - var c = a(this), - d = a.effects.setMode(c, b.options.mode || "hide"); - c.animate({ - opacity: d - }, - { - queue: !1, - duration: b.duration, - easing: b.options.easing, - complete: function() { - b.callback && b.callback.apply(this, arguments), - c.dequeue() - } - }) - }) - } -})(jQuery); -/* - * jQuery UI Effects Fold 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Fold - * - * Depends: - * jquery.effects.core.js - */ -(function(a, b) { - a.effects.fold = function(b) { - return this.queue(function() { - var c = a(this), - d = ["position", "top", "bottom", "left", "right"], - e = a.effects.setMode(c, b.options.mode || "hide"), - f = b.options.size || 15, - g = !!b.options.horizFirst, - h = b.duration ? b.duration / 2 : a.fx.speeds._default / 2; - a.effects.save(c, d), - c.show(); - var i = a.effects.createWrapper(c).css({ - overflow: "hidden" - }), - j = e == "show" != g, - k = j ? ["width", "height"] : ["height", "width"], - l = j ? [i.width(), i.height()] : [i.height(), i.width()], - m = /([0-9]+)%/.exec(f); - m && (f = parseInt(m[1], 10) / 100 * l[e == "hide" ? 0 : 1]), - e == "show" && i.css(g ? { - height: 0, - width: f - }: { - height: f, - width: 0 - }); - var n = {}, - p = {}; - n[k[0]] = e == "show" ? l[0] : f, - p[k[1]] = e == "show" ? l[1] : 0, - i.animate(n, h, b.options.easing).animate(p, h, b.options.easing, - function() { - e == "hide" && c.hide(), - a.effects.restore(c, d), - a.effects.removeWrapper(c), - b.callback && b.callback.apply(c[0], arguments), - c.dequeue() - }) - }) - } -})(jQuery); -/* - * jQuery UI Effects Highlight 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Highlight - * - * Depends: - * jquery.effects.core.js - */ -(function(a, b) { - a.effects.highlight = function(b) { - return this.queue(function() { - var c = a(this), - d = ["backgroundImage", "backgroundColor", "opacity"], - e = a.effects.setMode(c, b.options.mode || "show"), - f = { - backgroundColor: c.css("backgroundColor") - }; - e == "hide" && (f.opacity = 0), - a.effects.save(c, d), - c.show().css({ - backgroundImage: "none", - backgroundColor: b.options.color || "#ffff99" - }).animate(f, { - queue: !1, - duration: b.duration, - easing: b.options.easing, - complete: function() { - e == "hide" && c.hide(), - a.effects.restore(c, d), - e == "show" && !a.support.opacity && this.style.removeAttribute("filter"), - b.callback && b.callback.apply(this, arguments), - c.dequeue() - } - }) - }) - } -})(jQuery); -/* - * jQuery UI Effects Pulsate 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Pulsate - * - * Depends: - * jquery.effects.core.js - */ -(function(a, b) { - a.effects.pulsate = function(b) { - return this.queue(function() { - var c = a(this), - d = a.effects.setMode(c, b.options.mode || "show"); - times = (b.options.times || 5) * 2 - 1, - duration = b.duration ? b.duration / 2 : a.fx.speeds._default / 2, - isVisible = c.is(":visible"), - animateTo = 0, - isVisible || (c.css("opacity", 0).show(), animateTo = 1), - (d == "hide" && isVisible || d == "show" && !isVisible) && times--; - for (var e = 0; e < times; e++) c.animate({ - opacity: animateTo - }, - duration, b.options.easing), - animateTo = (animateTo + 1) % 2; - c.animate({ - opacity: animateTo - }, - duration, b.options.easing, - function() { - animateTo == 0 && c.hide(), - b.callback && b.callback.apply(this, arguments) - }), - c.queue("fx", - function() { - c.dequeue() - }).dequeue() - }) - } -})(jQuery); -/* - * jQuery UI Effects Scale 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Scale - * - * Depends: - * jquery.effects.core.js - */ -(function(a, b) { - a.effects.puff = function(b) { - return this.queue(function() { - var c = a(this), - d = a.effects.setMode(c, b.options.mode || "hide"), - e = parseInt(b.options.percent, 10) || 150, - f = e / 100, - g = { - height: c.height(), - width: c.width() - }; - a.extend(b.options, { - fade: !0, - mode: d, - percent: d == "hide" ? e: 100, - from: d == "hide" ? g: { - height: g.height * f, - width: g.width * f - } - }), - c.effect("scale", b.options, b.duration, b.callback), - c.dequeue() - }) - }, - a.effects.scale = function(b) { - return this.queue(function() { - var c = a(this), - d = a.extend(!0, {}, - b.options), - e = a.effects.setMode(c, b.options.mode || "effect"), - f = parseInt(b.options.percent, 10) || (parseInt(b.options.percent, 10) == 0 ? 0 : e == "hide" ? 0 : 100), - g = b.options.direction || "both", - h = b.options.origin; - e != "effect" && (d.origin = h || ["middle", "center"], d.restore = !0); - var i = { - height: c.height(), - width: c.width() - }; - c.from = b.options.from || (e == "show" ? { - height: 0, - width: 0 - }: i); - var j = { - y: g != "horizontal" ? f / 100 : 1, - x: g != "vertical" ? f / 100 : 1 - }; - c.to = { - height: i.height * j.y, - width: i.width * j.x - }, - b.options.fade && (e == "show" && (c.from.opacity = 0, c.to.opacity = 1), e == "hide" && (c.from.opacity = 1, c.to.opacity = 0)), - d.from = c.from, - d.to = c.to, - d.mode = e, - c.effect("size", d, b.duration, b.callback), - c.dequeue() - }) - }, - a.effects.size = function(b) { - return this.queue(function() { - var c = a(this), - d = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"], - e = ["position", "top", "bottom", "left", "right", "overflow", "opacity"], - f = ["width", "height", "overflow"], - g = ["fontSize"], - h = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"], - i = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"], - j = a.effects.setMode(c, b.options.mode || "effect"), - k = b.options.restore || !1, - l = b.options.scale || "both", - m = b.options.origin, - n = { - height: c.height(), - width: c.width() - }; - c.from = b.options.from || n, - c.to = b.options.to || n; - if (m) { - var p = a.effects.getBaseline(m, n); - c.from.top = (n.height - c.from.height) * p.y, - c.from.left = (n.width - c.from.width) * p.x, - c.to.top = (n.height - c.to.height) * p.y, - c.to.left = (n.width - c.to.width) * p.x - } - var q = { - from: { - y: c.from.height / n.height, - x: c.from.width / n.width - }, - to: { - y: c.to.height / n.height, - x: c.to.width / n.width - } - }; - if (l == "box" || l == "both") q.from.y != q.to.y && (d = d.concat(h), c.from = a.effects.setTransition(c, h, q.from.y, c.from), c.to = a.effects.setTransition(c, h, q.to.y, c.to)), - q.from.x != q.to.x && (d = d.concat(i), c.from = a.effects.setTransition(c, i, q.from.x, c.from), c.to = a.effects.setTransition(c, i, q.to.x, c.to)); (l == "content" || l == "both") && q.from.y != q.to.y && (d = d.concat(g), c.from = a.effects.setTransition(c, g, q.from.y, c.from), c.to = a.effects.setTransition(c, g, q.to.y, c.to)), - a.effects.save(c, k ? d: e), - c.show(), - a.effects.createWrapper(c), - c.css("overflow", "hidden").css(c.from); - if (l == "content" || l == "both") h = h.concat(["marginTop", "marginBottom"]).concat(g), - i = i.concat(["marginLeft", "marginRight"]), - f = d.concat(h).concat(i), - c.find("*[width]").each(function() { - child = a(this), - k && a.effects.save(child, f); - var c = { - height: child.height(), - width: child.width() - }; - child.from = { - height: c.height * q.from.y, - width: c.width * q.from.x - }, - child.to = { - height: c.height * q.to.y, - width: c.width * q.to.x - }, - q.from.y != q.to.y && (child.from = a.effects.setTransition(child, h, q.from.y, child.from), child.to = a.effects.setTransition(child, h, q.to.y, child.to)), - q.from.x != q.to.x && (child.from = a.effects.setTransition(child, i, q.from.x, child.from), child.to = a.effects.setTransition(child, i, q.to.x, child.to)), - child.css(child.from), - child.animate(child.to, b.duration, b.options.easing, - function() { - k && a.effects.restore(child, f) - }) - }); - c.animate(c.to, { - queue: !1, - duration: b.duration, - easing: b.options.easing, - complete: function() { - c.to.opacity === 0 && c.css("opacity", c.from.opacity), - j == "hide" && c.hide(), - a.effects.restore(c, k ? d: e), - a.effects.removeWrapper(c), - b.callback && b.callback.apply(this, arguments), - c.dequeue() - } - }) - }) - } -})(jQuery); -/* - * jQuery UI Effects Shake 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Shake - * - * Depends: - * jquery.effects.core.js - */ -(function(a, b) { - a.effects.shake = function(b) { - return this.queue(function() { - var c = a(this), - d = ["position", "top", "bottom", "left", "right"], - e = a.effects.setMode(c, b.options.mode || "effect"), - f = b.options.direction || "left", - g = b.options.distance || 20, - h = b.options.times || 3, - i = b.duration || b.options.duration || 140; - a.effects.save(c, d), - c.show(), - a.effects.createWrapper(c); - var j = f == "up" || f == "down" ? "top": "left", - k = f == "up" || f == "left" ? "pos": "neg", - l = {}, - m = {}, - n = {}; - l[j] = (k == "pos" ? "-=": "+=") + g, - m[j] = (k == "pos" ? "+=": "-=") + g * 2, - n[j] = (k == "pos" ? "-=": "+=") + g * 2, - c.animate(l, i, b.options.easing); - for (var p = 1; p < h; p++) c.animate(m, i, b.options.easing).animate(n, i, b.options.easing); - c.animate(m, i, b.options.easing).animate(l, i / 2, b.options.easing, - function() { - a.effects.restore(c, d), - a.effects.removeWrapper(c), - b.callback && b.callback.apply(this, arguments) - }), - c.queue("fx", - function() { - c.dequeue() - }), - c.dequeue() - }) - } -})(jQuery); -/* - * jQuery UI Effects Slide 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Slide - * - * Depends: - * jquery.effects.core.js - */ -(function(a, b) { - a.effects.slide = function(b) { - return this.queue(function() { - var c = a(this), - d = ["position", "top", "bottom", "left", "right"], - e = a.effects.setMode(c, b.options.mode || "show"), - f = b.options.direction || "left"; - a.effects.save(c, d), - c.show(), - a.effects.createWrapper(c).css({ - overflow: "hidden" - }); - var g = f == "up" || f == "down" ? "top": "left", - h = f == "up" || f == "left" ? "pos": "neg", - i = b.options.distance || (g == "top" ? c.outerHeight({ - margin: !0 - }) : c.outerWidth({ - margin: !0 - })); - e == "show" && c.css(g, h == "pos" ? isNaN(i) ? "-" + i: -i: i); - var j = {}; - j[g] = (e == "show" ? h == "pos" ? "+=": "-=": h == "pos" ? "-=": "+=") + i, - c.animate(j, { - queue: !1, - duration: b.duration, - easing: b.options.easing, - complete: function() { - e == "hide" && c.hide(), - a.effects.restore(c, d), - a.effects.removeWrapper(c), - b.callback && b.callback.apply(this, arguments), - c.dequeue() - } - }) - }) - } -})(jQuery); -/* - * jQuery UI Effects Transfer 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Effects/Transfer - * - * Depends: - * jquery.effects.core.js - */ -(function(a, b) { - a.effects.transfer = function(b) { - return this.queue(function() { - var c = a(this), - d = a(b.options.to), - e = d.offset(), - f = { - top: e.top, - left: e.left, - height: d.innerHeight(), - width: d.innerWidth() - }, - g = c.offset(), - h = a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({ - top: g.top, - left: g.left, - height: c.innerHeight(), - width: c.innerWidth(), - position: "absolute" - }).animate(f, b.duration, b.options.easing, - function() { - h.remove(), - b.callback && b.callback.apply(c[0], arguments), - c.dequeue() - }) - }) - } -})(jQuery); +/*!
+ * jQuery UI 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI
+ */
+(function(a, b) {
+ function d(b) {
+ return ! a(b).parents().andSelf().filter(function() {
+ return a.curCSS(this, "visibility") === "hidden" || a.expr.filters.hidden(this)
+ }).length
+ }
+ function c(b, c) {
+ var e = b.nodeName.toLowerCase();
+ if ("area" === e) {
+ var f = b.parentNode,
+ g = f.name,
+ h;
+ if (!b.href || !g || f.nodeName.toLowerCase() !== "map") return ! 1;
+ h = a("img[usemap=#" + g + "]")[0];
+ return !! h && d(h)
+ }
+ return (/input|select|textarea|button|object/.test(e) ? !b.disabled: "a" == e ? b.href || c: c) && d(b)
+ }
+ a.ui = a.ui || {};
+ a.ui.version || (a.extend(a.ui, {
+ version: "1.8.18",
+ keyCode: {
+ ALT: 18,
+ BACKSPACE: 8,
+ CAPS_LOCK: 20,
+ COMMA: 188,
+ COMMAND: 91,
+ COMMAND_LEFT: 91,
+ COMMAND_RIGHT: 93,
+ CONTROL: 17,
+ DELETE: 46,
+ DOWN: 40,
+ END: 35,
+ ENTER: 13,
+ ESCAPE: 27,
+ HOME: 36,
+ INSERT: 45,
+ LEFT: 37,
+ MENU: 93,
+ NUMPAD_ADD: 107,
+ NUMPAD_DECIMAL: 110,
+ NUMPAD_DIVIDE: 111,
+ NUMPAD_ENTER: 108,
+ NUMPAD_MULTIPLY: 106,
+ NUMPAD_SUBTRACT: 109,
+ PAGE_DOWN: 34,
+ PAGE_UP: 33,
+ PERIOD: 190,
+ RIGHT: 39,
+ SHIFT: 16,
+ SPACE: 32,
+ TAB: 9,
+ UP: 38,
+ WINDOWS: 91
+ }
+ }), a.fn.extend({
+ propAttr: a.fn.prop || a.fn.attr,
+ _focus: a.fn.focus,
+ focus: function(b, c) {
+ return typeof b == "number" ? this.each(function() {
+ var d = this;
+ setTimeout(function() {
+ a(d).focus(),
+ c && c.call(d)
+ },
+ b)
+ }) : this._focus.apply(this, arguments)
+ },
+ scrollParent: function() {
+ var b;
+ a.browser.msie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? b = this.parents().filter(function() {
+ return /(relative|absolute|fixed)/.test(a.curCSS(this, "position", 1)) && /(auto|scroll)/.test(a.curCSS(this, "overflow", 1) + a.curCSS(this, "overflow-y", 1) + a.curCSS(this, "overflow-x", 1))
+ }).eq(0) : b = this.parents().filter(function() {
+ return /(auto|scroll)/.test(a.curCSS(this, "overflow", 1) + a.curCSS(this, "overflow-y", 1) + a.curCSS(this, "overflow-x", 1))
+ }).eq(0);
+ return /fixed/.test(this.css("position")) || !b.length ? a(document) : b
+ },
+ zIndex: function(c) {
+ if (c !== b) return this.css("zIndex", c);
+ if (this.length) {
+ var d = a(this[0]),
+ e,
+ f;
+ while (d.length && d[0] !== document) {
+ e = d.css("position");
+ if (e === "absolute" || e === "relative" || e === "fixed") {
+ f = parseInt(d.css("zIndex"), 10);
+ if (!isNaN(f) && f !== 0) return f
+ }
+ d = d.parent()
+ }
+ }
+ return 0
+ },
+ disableSelection: function() {
+ return this.bind((a.support.selectstart ? "selectstart": "mousedown") + ".ui-disableSelection",
+ function(a) {
+ a.preventDefault()
+ })
+ },
+ enableSelection: function() {
+ return this.unbind(".ui-disableSelection")
+ }
+ }), a.each(["Width", "Height"],
+ function(c, d) {
+ function h(b, c, d, f) {
+ a.each(e,
+ function() {
+ c -= parseFloat(a.curCSS(b, "padding" + this, !0)) || 0,
+ d && (c -= parseFloat(a.curCSS(b, "border" + this + "Width", !0)) || 0),
+ f && (c -= parseFloat(a.curCSS(b, "margin" + this, !0)) || 0)
+ });
+ return c
+ }
+ var e = d === "Width" ? ["Left", "Right"] : ["Top", "Bottom"],
+ f = d.toLowerCase(),
+ g = {
+ innerWidth: a.fn.innerWidth,
+ innerHeight: a.fn.innerHeight,
+ outerWidth: a.fn.outerWidth,
+ outerHeight: a.fn.outerHeight
+ };
+ a.fn["inner" + d] = function(c) {
+ if (c === b) return g["inner" + d].call(this);
+ return this.each(function() {
+ a(this).css(f, h(this, c) + "px")
+ })
+ },
+ a.fn["outer" + d] = function(b, c) {
+ if (typeof b != "number") return g["outer" + d].call(this, b);
+ return this.each(function() {
+ a(this).css(f, h(this, b, !0, c) + "px")
+ })
+ }
+ }), a.extend(a.expr[":"], {
+ data: function(b, c, d) {
+ return !! a.data(b, d[3])
+ },
+ focusable: function(b) {
+ return c(b, !isNaN(a.attr(b, "tabindex")))
+ },
+ tabbable: function(b) {
+ var d = a.attr(b, "tabindex"),
+ e = isNaN(d);
+ return (e || d >= 0) && c(b, !e)
+ }
+ }), a(function() {
+ var b = document.body,
+ c = b.appendChild(c = document.createElement("div"));
+ c.offsetHeight,
+ a.extend(c.style, {
+ minHeight: "100px",
+ height: "auto",
+ padding: 0,
+ borderWidth: 0
+ }),
+ a.support.minHeight = c.offsetHeight === 100,
+ a.support.selectstart = "onselectstart" in c,
+ b.removeChild(c).style.display = "none"
+ }), a.extend(a.ui, {
+ plugin: {
+ add: function(b, c, d) {
+ var e = a.ui[b].prototype;
+ for (var f in d) e.plugins[f] = e.plugins[f] || [],
+ e.plugins[f].push([c, d[f]])
+ },
+ call: function(a, b, c) {
+ var d = a.plugins[b];
+ if ( !! d && !!a.element[0].parentNode) for (var e = 0; e < d.length; e++) a.options[d[e][0]] && d[e][1].apply(a.element, c)
+ }
+ },
+ contains: function(a, b) {
+ return document.compareDocumentPosition ? a.compareDocumentPosition(b) & 16 : a !== b && a.contains(b)
+ },
+ hasScroll: function(b, c) {
+ if (a(b).css("overflow") === "hidden") return ! 1;
+ var d = c && c === "left" ? "scrollLeft": "scrollTop",
+ e = !1;
+ if (b[d] > 0) return ! 0;
+ b[d] = 1,
+ e = b[d] > 0,
+ b[d] = 0;
+ return e
+ },
+ isOverAxis: function(a, b, c) {
+ return a > b && a < b + c
+ },
+ isOver: function(b, c, d, e, f, g) {
+ return a.ui.isOverAxis(b, d, f) && a.ui.isOverAxis(c, e, g)
+ }
+ }))
+})(jQuery);
+/*!
+ * jQuery UI Widget 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function(a, b) {
+ if (a.cleanData) {
+ var c = a.cleanData;
+ a.cleanData = function(b) {
+ for (var d = 0,
+ e; (e = b[d]) != null; d++) try {
+ a(e).triggerHandler("remove")
+ } catch(f) {}
+ c(b)
+ }
+ } else {
+ var d = a.fn.remove;
+ a.fn.remove = function(b, c) {
+ return this.each(function() {
+ c || (!b || a.filter(b, [this]).length) && a("*", this).add([this]).each(function() {
+ try {
+ a(this).triggerHandler("remove")
+ } catch(b) {}
+ });
+ return d.call(a(this), b, c)
+ })
+ }
+ }
+ a.widget = function(b, c, d) {
+ var e = b.split(".")[0],
+ f;
+ b = b.split(".")[1],
+ f = e + "-" + b,
+ d || (d = c, c = a.Widget),
+ a.expr[":"][f] = function(c) {
+ return !! a.data(c, b)
+ },
+ a[e] = a[e] || {},
+ a[e][b] = function(a, b) {
+ arguments.length && this._createWidget(a, b)
+ };
+ var g = new c;
+ g.options = a.extend(!0, {},
+ g.options),
+ a[e][b].prototype = a.extend(!0, g, {
+ namespace: e,
+ widgetName: b,
+ widgetEventPrefix: a[e][b].prototype.widgetEventPrefix || b,
+ widgetBaseClass: f
+ },
+ d),
+ a.widget.bridge(b, a[e][b])
+ },
+ a.widget.bridge = function(c, d) {
+ a.fn[c] = function(e) {
+ var f = typeof e == "string",
+ g = Array.prototype.slice.call(arguments, 1),
+ h = this;
+ e = !f && g.length ? a.extend.apply(null, [!0, e].concat(g)) : e;
+ if (f && e.charAt(0) === "_") return h;
+ f ? this.each(function() {
+ var d = a.data(this, c),
+ f = d && a.isFunction(d[e]) ? d[e].apply(d, g) : d;
+ if (f !== d && f !== b) {
+ h = f;
+ return ! 1
+ }
+ }) : this.each(function() {
+ var b = a.data(this, c);
+ b ? b.option(e || {})._init() : a.data(this, c, new d(e, this))
+ });
+ return h
+ }
+ },
+ a.Widget = function(a, b) {
+ arguments.length && this._createWidget(a, b)
+ },
+ a.Widget.prototype = {
+ widgetName: "widget",
+ widgetEventPrefix: "",
+ options: {
+ disabled: !1
+ },
+ _createWidget: function(b, c) {
+ a.data(c, this.widgetName, this),
+ this.element = a(c),
+ this.options = a.extend(!0, {},
+ this.options, this._getCreateOptions(), b);
+ var d = this;
+ this.element.bind("remove." + this.widgetName,
+ function() {
+ d.destroy()
+ }),
+ this._create(),
+ this._trigger("create"),
+ this._init()
+ },
+ _getCreateOptions: function() {
+ return a.metadata && a.metadata.get(this.element[0])[this.widgetName]
+ },
+ _create: function() {},
+ _init: function() {},
+ destroy: function() {
+ this.element.unbind("." + this.widgetName).removeData(this.widgetName),
+ this.widget().unbind("." + this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass + "-disabled " + "ui-state-disabled")
+ },
+ widget: function() {
+ return this.element
+ },
+ option: function(c, d) {
+ var e = c;
+ if (arguments.length === 0) return a.extend({},
+ this.options);
+ if (typeof c == "string") {
+ if (d === b) return this.options[c];
+ e = {},
+ e[c] = d
+ }
+ this._setOptions(e);
+ return this
+ },
+ _setOptions: function(b) {
+ var c = this;
+ a.each(b,
+ function(a, b) {
+ c._setOption(a, b)
+ });
+ return this
+ },
+ _setOption: function(a, b) {
+ this.options[a] = b,
+ a === "disabled" && this.widget()[b ? "addClass": "removeClass"](this.widgetBaseClass + "-disabled" + " " + "ui-state-disabled").attr("aria-disabled", b);
+ return this
+ },
+ enable: function() {
+ return this._setOption("disabled", !1)
+ },
+ disable: function() {
+ return this._setOption("disabled", !0)
+ },
+ _trigger: function(b, c, d) {
+ var e, f, g = this.options[b];
+ d = d || {},
+ c = a.Event(c),
+ c.type = (b === this.widgetEventPrefix ? b: this.widgetEventPrefix + b).toLowerCase(),
+ c.target = this.element[0],
+ f = c.originalEvent;
+ if (f) for (e in f) e in c || (c[e] = f[e]);
+ this.element.trigger(c, d);
+ return ! (a.isFunction(g) && g.call(this.element[0], c, d) === !1 || c.isDefaultPrevented())
+ }
+ }
+})(jQuery);
+/*!
+ * jQuery UI Mouse 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Mouse
+ *
+ * Depends:
+ * jquery.ui.widget.js
+ */
+(function(a, b) {
+ var c = !1;
+ a(document).mouseup(function(a) {
+ c = !1
+ }),
+ a.widget("ui.mouse", {
+ options: {
+ cancel: ":input,option",
+ distance: 1,
+ delay: 0
+ },
+ _mouseInit: function() {
+ var b = this;
+ this.element.bind("mousedown." + this.widgetName,
+ function(a) {
+ return b._mouseDown(a)
+ }).bind("click." + this.widgetName,
+ function(c) {
+ if (!0 === a.data(c.target, b.widgetName + ".preventClickEvent")) {
+ a.removeData(c.target, b.widgetName + ".preventClickEvent"),
+ c.stopImmediatePropagation();
+ return ! 1
+ }
+ }),
+ this.started = !1
+ },
+ _mouseDestroy: function() {
+ this.element.unbind("." + this.widgetName)
+ },
+ _mouseDown: function(b) {
+ if (!c) {
+ this._mouseStarted && this._mouseUp(b),
+ this._mouseDownEvent = b;
+ var d = this,
+ e = b.which == 1,
+ f = typeof this.options.cancel == "string" && b.target.nodeName ? a(b.target).closest(this.options.cancel).length: !1;
+ if (!e || f || !this._mouseCapture(b)) return ! 0;
+ this.mouseDelayMet = !this.options.delay,
+ this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function() {
+ d.mouseDelayMet = !0
+ },
+ this.options.delay));
+ if (this._mouseDistanceMet(b) && this._mouseDelayMet(b)) {
+ this._mouseStarted = this._mouseStart(b) !== !1;
+ if (!this._mouseStarted) {
+ b.preventDefault();
+ return ! 0
+ }
+ } ! 0 === a.data(b.target, this.widgetName + ".preventClickEvent") && a.removeData(b.target, this.widgetName + ".preventClickEvent"),
+ this._mouseMoveDelegate = function(a) {
+ return d._mouseMove(a)
+ },
+ this._mouseUpDelegate = function(a) {
+ return d._mouseUp(a)
+ },
+ a(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate),
+ b.preventDefault(),
+ c = !0;
+ return ! 0
+ }
+ },
+ _mouseMove: function(b) {
+ if (a.browser.msie && !(document.documentMode >= 9) && !b.button) return this._mouseUp(b);
+ if (this._mouseStarted) {
+ this._mouseDrag(b);
+ return b.preventDefault()
+ }
+ this._mouseDistanceMet(b) && this._mouseDelayMet(b) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, b) !== !1, this._mouseStarted ? this._mouseDrag(b) : this._mouseUp(b));
+ return ! this._mouseStarted
+ },
+ _mouseUp: function(b) {
+ a(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate),
+ this._mouseStarted && (this._mouseStarted = !1, b.target == this._mouseDownEvent.target && a.data(b.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(b));
+ return ! 1
+ },
+ _mouseDistanceMet: function(a) {
+ return Math.max(Math.abs(this._mouseDownEvent.pageX - a.pageX), Math.abs(this._mouseDownEvent.pageY - a.pageY)) >= this.options.distance
+ },
+ _mouseDelayMet: function(a) {
+ return this.mouseDelayMet
+ },
+ _mouseStart: function(a) {},
+ _mouseDrag: function(a) {},
+ _mouseStop: function(a) {},
+ _mouseCapture: function(a) {
+ return ! 0
+ }
+ })
+})(jQuery);
+/*
+ * jQuery UI Position 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Position
+ */
+(function(a, b) {
+ a.ui = a.ui || {};
+ var c = /left|center|right/,
+ d = /top|center|bottom/,
+ e = "center",
+ f = {},
+ g = a.fn.position,
+ h = a.fn.offset;
+ a.fn.position = function(b) {
+ if (!b || !b.of) return g.apply(this, arguments);
+ b = a.extend({},
+ b);
+ var h = a(b.of),
+ i = h[0],
+ j = (b.collision || "flip").split(" "),
+ k = b.offset ? b.offset.split(" ") : [0, 0],
+ l,
+ m,
+ n;
+ i.nodeType === 9 ? (l = h.width(), m = h.height(), n = {
+ top: 0,
+ left: 0
+ }) : i.setTimeout ? (l = h.width(), m = h.height(), n = {
+ top: h.scrollTop(),
+ left: h.scrollLeft()
+ }) : i.preventDefault ? (b.at = "left top", l = m = 0, n = {
+ top: b.of.pageY,
+ left: b.of.pageX
+ }) : (l = h.outerWidth(), m = h.outerHeight(), n = h.offset()),
+ a.each(["my", "at"],
+ function() {
+ var a = (b[this] || "").split(" ");
+ a.length === 1 && (a = c.test(a[0]) ? a.concat([e]) : d.test(a[0]) ? [e].concat(a) : [e, e]),
+ a[0] = c.test(a[0]) ? a[0] : e,
+ a[1] = d.test(a[1]) ? a[1] : e,
+ b[this] = a
+ }),
+ j.length === 1 && (j[1] = j[0]),
+ k[0] = parseInt(k[0], 10) || 0,
+ k.length === 1 && (k[1] = k[0]),
+ k[1] = parseInt(k[1], 10) || 0,
+ b.at[0] === "right" ? n.left += l: b.at[0] === e && (n.left += l / 2),
+ b.at[1] === "bottom" ? n.top += m: b.at[1] === e && (n.top += m / 2),
+ n.left += k[0],
+ n.top += k[1];
+ return this.each(function() {
+ var c = a(this),
+ d = c.outerWidth(),
+ g = c.outerHeight(),
+ h = parseInt(a.curCSS(this, "marginLeft", !0)) || 0,
+ i = parseInt(a.curCSS(this, "marginTop", !0)) || 0,
+ o = d + h + (parseInt(a.curCSS(this, "marginRight", !0)) || 0),
+ p = g + i + (parseInt(a.curCSS(this, "marginBottom", !0)) || 0),
+ q = a.extend({},
+ n),
+ r;
+ b.my[0] === "right" ? q.left -= d: b.my[0] === e && (q.left -= d / 2),
+ b.my[1] === "bottom" ? q.top -= g: b.my[1] === e && (q.top -= g / 2),
+ f.fractions || (q.left = Math.round(q.left), q.top = Math.round(q.top)),
+ r = {
+ left: q.left - h,
+ top: q.top - i
+ },
+ a.each(["left", "top"],
+ function(c, e) {
+ a.ui.position[j[c]] && a.ui.position[j[c]][e](q, {
+ targetWidth: l,
+ targetHeight: m,
+ elemWidth: d,
+ elemHeight: g,
+ collisionPosition: r,
+ collisionWidth: o,
+ collisionHeight: p,
+ offset: k,
+ my: b.my,
+ at: b.at
+ })
+ }),
+ a.fn.bgiframe && c.bgiframe(),
+ c.offset(a.extend(q, {
+ using: b.using
+ }))
+ })
+ },
+ a.ui.position = {
+ fit: {
+ left: function(b, c) {
+ var d = a(window),
+ e = c.collisionPosition.left + c.collisionWidth - d.width() - d.scrollLeft();
+ b.left = e > 0 ? b.left - e: Math.max(b.left - c.collisionPosition.left, b.left)
+ },
+ top: function(b, c) {
+ var d = a(window),
+ e = c.collisionPosition.top + c.collisionHeight - d.height() - d.scrollTop();
+ b.top = e > 0 ? b.top - e: Math.max(b.top - c.collisionPosition.top, b.top)
+ }
+ },
+ flip: {
+ left: function(b, c) {
+ if (c.at[0] !== e) {
+ var d = a(window),
+ f = c.collisionPosition.left + c.collisionWidth - d.width() - d.scrollLeft(),
+ g = c.my[0] === "left" ? -c.elemWidth: c.my[0] === "right" ? c.elemWidth: 0,
+ h = c.at[0] === "left" ? c.targetWidth: -c.targetWidth,
+ i = -2 * c.offset[0];
+ b.left += c.collisionPosition.left < 0 ? g + h + i: f > 0 ? g + h + i: 0
+ }
+ },
+ top: function(b, c) {
+ if (c.at[1] !== e) {
+ var d = a(window),
+ f = c.collisionPosition.top + c.collisionHeight - d.height() - d.scrollTop(),
+ g = c.my[1] === "top" ? -c.elemHeight: c.my[1] === "bottom" ? c.elemHeight: 0,
+ h = c.at[1] === "top" ? c.targetHeight: -c.targetHeight,
+ i = -2 * c.offset[1];
+ b.top += c.collisionPosition.top < 0 ? g + h + i: f > 0 ? g + h + i: 0
+ }
+ }
+ }
+ },
+ a.offset.setOffset || (a.offset.setOffset = function(b, c) { / static / .test(a.curCSS(b, "position")) && (b.style.position = "relative");
+ var d = a(b),
+ e = d.offset(),
+ f = parseInt(a.curCSS(b, "top", !0), 10) || 0,
+ g = parseInt(a.curCSS(b, "left", !0), 10) || 0,
+ h = {
+ top: c.top - e.top + f,
+ left: c.left - e.left + g
+ };
+ "using" in c ? c.using.call(b, h) : d.css(h)
+ },
+ a.fn.offset = function(b) {
+ var c = this[0];
+ if (!c || !c.ownerDocument) return null;
+ if (b) return this.each(function() {
+ a.offset.setOffset(this, b)
+ });
+ return h.call(this)
+ }),
+ function() {
+ var b = document.getElementsByTagName("body")[0],
+ c = document.createElement("div"),
+ d,
+ e,
+ g,
+ h,
+ i;
+ d = document.createElement(b ? "div": "body"),
+ g = {
+ visibility: "hidden",
+ width: 0,
+ height: 0,
+ border: 0,
+ margin: 0,
+ background: "none"
+ },
+ b && a.extend(g, {
+ position: "absolute",
+ left: "-1000px",
+ top: "-1000px"
+ });
+ for (var j in g) d.style[j] = g[j];
+ d.appendChild(c),
+ e = b || document.documentElement,
+ e.insertBefore(d, e.firstChild),
+ c.style.cssText = "position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",
+ h = a(c).offset(function(a, b) {
+ return b
+ }).offset(),
+ d.innerHTML = "",
+ e.removeChild(d),
+ i = h.top + h.left + (b ? 2e3: 0),
+ f.fractions = i > 21 && i < 22
+ } ()
+})(jQuery);
+/*
+ * jQuery UI Draggable 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Draggables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function(a, b) {
+ a.widget("ui.draggable", a.ui.mouse, {
+ widgetEventPrefix: "drag",
+ options: {
+ addClasses: !0,
+ appendTo: "parent",
+ axis: !1,
+
+ connectToSortable: !1,
+ containment: !1,
+ cursor: "auto",
+ cursorAt: !1,
+ grid: !1,
+ handle: !1,
+ helper: "original",
+ iframeFix: !1,
+ opacity: !1,
+ refreshPositions: !1,
+ revert: !1,
+ revertDuration: 500,
+ scope: "default",
+ scroll: !0,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ snap: !1,
+ snapMode: "both",
+ snapTolerance: 20,
+ stack: !1,
+ zIndex: !1
+ },
+ _create: function() {
+ this.options.helper == "original" && !/^(?:r|a|f)/.test(this.element.css("position")) && (this.element[0].style.position = "relative"),
+ this.options.addClasses && this.element.addClass("ui-draggable"),
+ this.options.disabled && this.element.addClass("ui-draggable-disabled"),
+ this._mouseInit()
+ },
+ destroy: function() {
+ if ( !! this.element.data("draggable")) {
+ this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),
+ this._mouseDestroy();
+ return this
+ }
+ },
+ _mouseCapture: function(b) {
+ var c = this.options;
+ if (this.helper || c.disabled || a(b.target).is(".ui-resizable-handle")) return ! 1;
+ this.handle = this._getHandle(b);
+ if (!this.handle) return ! 1;
+ c.iframeFix && a(c.iframeFix === !0 ? "iframe": c.iframeFix).each(function() {
+ a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({
+ width: this.offsetWidth + "px",
+ height: this.offsetHeight + "px",
+ position: "absolute",
+ opacity: "0.001",
+ zIndex: 1e3
+ }).css(a(this).offset()).appendTo("body")
+ });
+ return ! 0
+ },
+ _mouseStart: function(b) {
+ var c = this.options;
+ this.helper = this._createHelper(b),
+ this._cacheHelperProportions(),
+ a.ui.ddmanager && (a.ui.ddmanager.current = this),
+ this._cacheMargins(),
+ this.cssPosition = this.helper.css("position"),
+ this.scrollParent = this.helper.scrollParent(),
+ this.offset = this.positionAbs = this.element.offset(),
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ },
+ a.extend(this.offset, {
+ click: {
+ left: b.pageX - this.offset.left,
+ top: b.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset()
+ }),
+ this.originalPosition = this.position = this._generatePosition(b),
+ this.originalPageX = b.pageX,
+ this.originalPageY = b.pageY,
+ c.cursorAt && this._adjustOffsetFromHelper(c.cursorAt),
+ c.containment && this._setContainment();
+ if (this._trigger("start", b) === !1) {
+ this._clear();
+ return ! 1
+ }
+ this._cacheHelperProportions(),
+ a.ui.ddmanager && !c.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b),
+ this.helper.addClass("ui-draggable-dragging"),
+ this._mouseDrag(b, !0),
+ a.ui.ddmanager && a.ui.ddmanager.dragStart(this, b);
+ return ! 0
+ },
+ _mouseDrag: function(b, c) {
+ this.position = this._generatePosition(b),
+ this.positionAbs = this._convertPositionTo("absolute");
+ if (!c) {
+ var d = this._uiHash();
+ if (this._trigger("drag", b, d) === !1) {
+ this._mouseUp({});
+ return ! 1
+ }
+ this.position = d.position
+ }
+ if (!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left + "px";
+ if (!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top + "px";
+ a.ui.ddmanager && a.ui.ddmanager.drag(this, b);
+ return ! 1
+ },
+ _mouseStop: function(b) {
+ var c = !1;
+ a.ui.ddmanager && !this.options.dropBehaviour && (c = a.ui.ddmanager.drop(this, b)),
+ this.dropped && (c = this.dropped, this.dropped = !1);
+ if ((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original") return ! 1;
+ if (this.options.revert == "invalid" && !c || this.options.revert == "valid" && c || this.options.revert === !0 || a.isFunction(this.options.revert) && this.options.revert.call(this.element, c)) {
+ var d = this;
+ a(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10),
+ function() {
+ d._trigger("stop", b) !== !1 && d._clear()
+ })
+ } else this._trigger("stop", b) !== !1 && this._clear();
+ return ! 1
+ },
+ _mouseUp: function(b) {
+ this.options.iframeFix === !0 && a("div.ui-draggable-iframeFix").each(function() {
+ this.parentNode.removeChild(this)
+ }),
+ a.ui.ddmanager && a.ui.ddmanager.dragStop(this, b);
+ return a.ui.mouse.prototype._mouseUp.call(this, b)
+ },
+ cancel: function() {
+ this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear();
+ return this
+ },
+ _getHandle: function(b) {
+ var c = !this.options.handle || !a(this.options.handle, this.element).length ? !0 : !1;
+ a(this.options.handle, this.element).find("*").andSelf().each(function() {
+ this == b.target && (c = !0)
+ });
+ return c
+ },
+ _createHelper: function(b) {
+ var c = this.options,
+ d = a.isFunction(c.helper) ? a(c.helper.apply(this.element[0], [b])) : c.helper == "clone" ? this.element.clone().removeAttr("id") : this.element;
+ d.parents("body").length || d.appendTo(c.appendTo == "parent" ? this.element[0].parentNode: c.appendTo),
+ d[0] != this.element[0] && !/(fixed|absolute)/.test(d.css("position")) && d.css("position", "absolute");
+ return d
+ },
+ _adjustOffsetFromHelper: function(b) {
+ typeof b == "string" && (b = b.split(" ")),
+ a.isArray(b) && (b = {
+ left: +b[0],
+ top: +b[1] || 0
+ }),
+ "left" in b && (this.offset.click.left = b.left + this.margins.left),
+ "right" in b && (this.offset.click.left = this.helperProportions.width - b.right + this.margins.left),
+ "top" in b && (this.offset.click.top = b.top + this.margins.top),
+ "bottom" in b && (this.offset.click.top = this.helperProportions.height - b.bottom + this.margins.top)
+ },
+ _getParentOffset: function() {
+ this.offsetParent = this.helper.offsetParent();
+ var b = this.offsetParent.offset();
+ this.cssPosition == "absolute" && this.scrollParent[0] != document && a.ui.contains(this.scrollParent[0], this.offsetParent[0]) && (b.left += this.scrollParent.scrollLeft(), b.top += this.scrollParent.scrollTop());
+ if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && a.browser.msie) b = {
+ top: 0,
+ left: 0
+ };
+ return {
+ top: b.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
+ left: b.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
+ }
+ },
+ _getRelativeOffset: function() {
+ if (this.cssPosition == "relative") {
+ var a = this.element.position();
+ return {
+ top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
+ left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
+ }
+ }
+ return {
+ top: 0,
+ left: 0
+ }
+ },
+ _cacheMargins: function() {
+ this.margins = {
+ left: parseInt(this.element.css("marginLeft"), 10) || 0,
+ top: parseInt(this.element.css("marginTop"), 10) || 0,
+ right: parseInt(this.element.css("marginRight"), 10) || 0,
+ bottom: parseInt(this.element.css("marginBottom"), 10) || 0
+ }
+ },
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ }
+ },
+ _setContainment: function() {
+ var b = this.options;
+ b.containment == "parent" && (b.containment = this.helper[0].parentNode);
+ if (b.containment == "document" || b.containment == "window") this.containment = [b.containment == "document" ? 0 : a(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, b.containment == "document" ? 0 : a(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, (b.containment == "document" ? 0 : a(window).scrollLeft()) + a(b.containment == "document" ? document: window).width() - this.helperProportions.width - this.margins.left, (b.containment == "document" ? 0 : a(window).scrollTop()) + (a(b.containment == "document" ? document: window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top];
+ if (!/^(document|window|parent)$/.test(b.containment) && b.containment.constructor != Array) {
+ var c = a(b.containment),
+ d = c[0];
+ if (!d) return;
+ var e = c.offset(),
+ f = a(d).css("overflow") != "hidden";
+ this.containment = [(parseInt(a(d).css("borderLeftWidth"), 10) || 0) + (parseInt(a(d).css("paddingLeft"), 10) || 0), (parseInt(a(d).css("borderTopWidth"), 10) || 0) + (parseInt(a(d).css("paddingTop"), 10) || 0), (f ? Math.max(d.scrollWidth, d.offsetWidth) : d.offsetWidth) - (parseInt(a(d).css("borderLeftWidth"), 10) || 0) - (parseInt(a(d).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (f ? Math.max(d.scrollHeight, d.offsetHeight) : d.offsetHeight) - (parseInt(a(d).css("borderTopWidth"), 10) || 0) - (parseInt(a(d).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom],
+ this.relative_container = c
+ } else b.containment.constructor == Array && (this.containment = b.containment)
+ },
+ _convertPositionTo: function(b, c) {
+ c || (c = this.position);
+ var d = b == "absolute" ? 1 : -1,
+ e = this.options,
+ f = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent: this.scrollParent,
+ g = /(html|body)/i.test(f[0].tagName);
+ return {
+ top: c.top + this.offset.relative.top * d + this.offset.parent.top * d - (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : g ? 0 : f.scrollTop()) * d),
+ left: c.left + this.offset.relative.left * d + this.offset.parent.left * d - (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : g ? 0 : f.scrollLeft()) * d)
+ }
+ },
+ _generatePosition: function(b) {
+ var c = this.options,
+ d = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent: this.scrollParent,
+ e = /(html|body)/i.test(d[0].tagName),
+ f = b.pageX,
+ g = b.pageY;
+ if (this.originalPosition) {
+ var h;
+ if (this.containment) {
+ if (this.relative_container) {
+ var i = this.relative_container.offset();
+ h = [this.containment[0] + i.left, this.containment[1] + i.top, this.containment[2] + i.left, this.containment[3] + i.top]
+ } else h = this.containment;
+ b.pageX - this.offset.click.left < h[0] && (f = h[0] + this.offset.click.left),
+ b.pageY - this.offset.click.top < h[1] && (g = h[1] + this.offset.click.top),
+ b.pageX - this.offset.click.left > h[2] && (f = h[2] + this.offset.click.left),
+ b.pageY - this.offset.click.top > h[3] && (g = h[3] + this.offset.click.top)
+ }
+ if (c.grid) {
+ var j = c.grid[1] ? this.originalPageY + Math.round((g - this.originalPageY) / c.grid[1]) * c.grid[1] : this.originalPageY;
+ g = h ? j - this.offset.click.top < h[1] || j - this.offset.click.top > h[3] ? j - this.offset.click.top < h[1] ? j + c.grid[1] : j - c.grid[1] : j: j;
+ var k = c.grid[0] ? this.originalPageX + Math.round((f - this.originalPageX) / c.grid[0]) * c.grid[0] : this.originalPageX;
+ f = h ? k - this.offset.click.left < h[0] || k - this.offset.click.left > h[2] ? k - this.offset.click.left < h[0] ? k + c.grid[0] : k - c.grid[0] : k: k
+ }
+ }
+ return {
+ top: g - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : d.scrollTop()),
+ left: f - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (a.browser.safari && a.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : d.scrollLeft())
+ }
+ },
+ _clear: function() {
+ this.helper.removeClass("ui-draggable-dragging"),
+ this.helper[0] != this.element[0] && !this.cancelHelperRemoval && this.helper.remove(),
+ this.helper = null,
+ this.cancelHelperRemoval = !1
+ },
+ _trigger: function(b, c, d) {
+ d = d || this._uiHash(),
+ a.ui.plugin.call(this, b, [c, d]),
+ b == "drag" && (this.positionAbs = this._convertPositionTo("absolute"));
+ return a.Widget.prototype._trigger.call(this, b, c, d)
+ },
+ plugins: {},
+ _uiHash: function(a) {
+ return {
+ helper: this.helper,
+ position: this.position,
+ originalPosition: this.originalPosition,
+ offset: this.positionAbs
+ }
+ }
+ }),
+ a.extend(a.ui.draggable, {
+ version: "1.8.18"
+ }),
+ a.ui.plugin.add("draggable", "connectToSortable", {
+ start: function(b, c) {
+ var d = a(this).data("draggable"),
+ e = d.options,
+ f = a.extend({},
+ c, {
+ item: d.element
+ });
+ d.sortables = [],
+ a(e.connectToSortable).each(function() {
+ var c = a.data(this, "sortable");
+ c && !c.options.disabled && (d.sortables.push({
+ instance: c,
+ shouldRevert: c.options.revert
+ }), c.refreshPositions(), c._trigger("activate", b, f))
+ })
+ },
+ stop: function(b, c) {
+ var d = a(this).data("draggable"),
+ e = a.extend({},
+ c, {
+ item: d.element
+ });
+ a.each(d.sortables,
+ function() {
+ this.instance.isOver ? (this.instance.isOver = 0, d.cancelHelperRemoval = !0, this.instance.cancelHelperRemoval = !1, this.shouldRevert && (this.instance.options.revert = !0), this.instance._mouseStop(b), this.instance.options.helper = this.instance.options._helper, d.options.helper == "original" && this.instance.currentItem.css({
+ top: "auto",
+ left: "auto"
+ })) : (this.instance.cancelHelperRemoval = !1, this.instance._trigger("deactivate", b, e))
+ })
+ },
+ drag: function(b, c) {
+ var d = a(this).data("draggable"),
+ e = this,
+ f = function(b) {
+ var c = this.offset.click.top,
+ d = this.offset.click.left,
+ e = this.positionAbs.top,
+ f = this.positionAbs.left,
+ g = b.height,
+ h = b.width,
+ i = b.top,
+ j = b.left;
+ return a.ui.isOver(e + c, f + d, i, j, g, h)
+ };
+ a.each(d.sortables,
+ function(f) {
+ this.instance.positionAbs = d.positionAbs,
+ this.instance.helperProportions = d.helperProportions,
+ this.instance.offset.click = d.offset.click,
+ this.instance._intersectsWith(this.instance.containerCache) ? (this.instance.isOver || (this.instance.isOver = 1, this.instance.currentItem = a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item", !0), this.instance.options._helper = this.instance.options.helper, this.instance.options.helper = function() {
+ return c.helper[0]
+ },
+ b.target = this.instance.currentItem[0], this.instance._mouseCapture(b, !0), this.instance._mouseStart(b, !0, !0), this.instance.offset.click.top = d.offset.click.top, this.instance.offset.click.left = d.offset.click.left, this.instance.offset.parent.left -= d.offset.parent.left - this.instance.offset.parent.left, this.instance.offset.parent.top -= d.offset.parent.top - this.instance.offset.parent.top, d._trigger("toSortable", b), d.dropped = this.instance.element, d.currentItem = d.element, this.instance.fromOutside = d), this.instance.currentItem && this.instance._mouseDrag(b)) : this.instance.isOver && (this.instance.isOver = 0, this.instance.cancelHelperRemoval = !0, this.instance.options.revert = !1, this.instance._trigger("out", b, this.instance._uiHash(this.instance)), this.instance._mouseStop(b, !0), this.instance.options.helper = this.instance.options._helper, this.instance.currentItem.remove(), this.instance.placeholder && this.instance.placeholder.remove(), d._trigger("fromSortable", b), d.dropped = !1)
+ })
+ }
+ }),
+ a.ui.plugin.add("draggable", "cursor", {
+ start: function(b, c) {
+ var d = a("body"),
+ e = a(this).data("draggable").options;
+ d.css("cursor") && (e._cursor = d.css("cursor")),
+ d.css("cursor", e.cursor)
+ },
+ stop: function(b, c) {
+ var d = a(this).data("draggable").options;
+ d._cursor && a("body").css("cursor", d._cursor)
+ }
+ }),
+ a.ui.plugin.add("draggable", "opacity", {
+ start: function(b, c) {
+ var d = a(c.helper),
+ e = a(this).data("draggable").options;
+ d.css("opacity") && (e._opacity = d.css("opacity")),
+ d.css("opacity", e.opacity)
+ },
+ stop: function(b, c) {
+ var d = a(this).data("draggable").options;
+ d._opacity && a(c.helper).css("opacity", d._opacity)
+ }
+ }),
+ a.ui.plugin.add("draggable", "scroll", {
+ start: function(b, c) {
+ var d = a(this).data("draggable");
+ d.scrollParent[0] != document && d.scrollParent[0].tagName != "HTML" && (d.overflowOffset = d.scrollParent.offset())
+ },
+ drag: function(b, c) {
+ var d = a(this).data("draggable"),
+ e = d.options,
+ f = !1;
+ if (d.scrollParent[0] != document && d.scrollParent[0].tagName != "HTML") {
+ if (!e.axis || e.axis != "x") d.overflowOffset.top + d.scrollParent[0].offsetHeight - b.pageY < e.scrollSensitivity ? d.scrollParent[0].scrollTop = f = d.scrollParent[0].scrollTop + e.scrollSpeed: b.pageY - d.overflowOffset.top < e.scrollSensitivity && (d.scrollParent[0].scrollTop = f = d.scrollParent[0].scrollTop - e.scrollSpeed);
+ if (!e.axis || e.axis != "y") d.overflowOffset.left + d.scrollParent[0].offsetWidth - b.pageX < e.scrollSensitivity ? d.scrollParent[0].scrollLeft = f = d.scrollParent[0].scrollLeft + e.scrollSpeed: b.pageX - d.overflowOffset.left < e.scrollSensitivity && (d.scrollParent[0].scrollLeft = f = d.scrollParent[0].scrollLeft - e.scrollSpeed)
+ } else {
+ if (!e.axis || e.axis != "x") b.pageY - a(document).scrollTop() < e.scrollSensitivity ? f = a(document).scrollTop(a(document).scrollTop() - e.scrollSpeed) : a(window).height() - (b.pageY - a(document).scrollTop()) < e.scrollSensitivity && (f = a(document).scrollTop(a(document).scrollTop() + e.scrollSpeed));
+ if (!e.axis || e.axis != "y") b.pageX - a(document).scrollLeft() < e.scrollSensitivity ? f = a(document).scrollLeft(a(document).scrollLeft() - e.scrollSpeed) : a(window).width() - (b.pageX - a(document).scrollLeft()) < e.scrollSensitivity && (f = a(document).scrollLeft(a(document).scrollLeft() + e.scrollSpeed))
+ }
+ f !== !1 && a.ui.ddmanager && !e.dropBehaviour && a.ui.ddmanager.prepareOffsets(d, b)
+ }
+ }),
+ a.ui.plugin.add("draggable", "snap", {
+ start: function(b, c) {
+ var d = a(this).data("draggable"),
+ e = d.options;
+ d.snapElements = [],
+ a(e.snap.constructor != String ? e.snap.items || ":data(draggable)": e.snap).each(function() {
+ var b = a(this),
+ c = b.offset();
+ this != d.element[0] && d.snapElements.push({
+ item: this,
+ width: b.outerWidth(),
+ height: b.outerHeight(),
+ top: c.top,
+ left: c.left
+ })
+ })
+ },
+ drag: function(b, c) {
+ var d = a(this).data("draggable"),
+ e = d.options,
+ f = e.snapTolerance,
+ g = c.offset.left,
+ h = g + d.helperProportions.width,
+ i = c.offset.top,
+ j = i + d.helperProportions.height;
+ for (var k = d.snapElements.length - 1; k >= 0; k--) {
+ var l = d.snapElements[k].left,
+ m = l + d.snapElements[k].width,
+ n = d.snapElements[k].top,
+ o = n + d.snapElements[k].height;
+ if (! (l - f < g && g < m + f && n - f < i && i < o + f || l - f < g && g < m + f && n - f < j && j < o + f || l - f < h && h < m + f && n - f < i && i < o + f || l - f < h && h < m + f && n - f < j && j < o + f)) {
+ d.snapElements[k].snapping && d.options.snap.release && d.options.snap.release.call(d.element, b, a.extend(d._uiHash(), {
+ snapItem: d.snapElements[k].item
+ })),
+ d.snapElements[k].snapping = !1;
+ continue
+ }
+ if (e.snapMode != "inner") {
+ var p = Math.abs(n - j) <= f,
+ q = Math.abs(o - i) <= f,
+ r = Math.abs(l - h) <= f,
+ s = Math.abs(m - g) <= f;
+ p && (c.position.top = d._convertPositionTo("relative", {
+ top: n - d.helperProportions.height,
+ left: 0
+ }).top - d.margins.top),
+ q && (c.position.top = d._convertPositionTo("relative", {
+ top: o,
+ left: 0
+ }).top - d.margins.top),
+ r && (c.position.left = d._convertPositionTo("relative", {
+ top: 0,
+ left: l - d.helperProportions.width
+ }).left - d.margins.left),
+ s && (c.position.left = d._convertPositionTo("relative", {
+ top: 0,
+ left: m
+ }).left - d.margins.left)
+ }
+ var t = p || q || r || s;
+ if (e.snapMode != "outer") {
+ var p = Math.abs(n - i) <= f,
+ q = Math.abs(o - j) <= f,
+ r = Math.abs(l - g) <= f,
+ s = Math.abs(m - h) <= f;
+ p && (c.position.top = d._convertPositionTo("relative", {
+ top: n,
+ left: 0
+ }).top - d.margins.top),
+ q && (c.position.top = d._convertPositionTo("relative", {
+ top: o - d.helperProportions.height,
+ left: 0
+ }).top - d.margins.top),
+ r && (c.position.left = d._convertPositionTo("relative", {
+ top: 0,
+ left: l
+ }).left - d.margins.left),
+ s && (c.position.left = d._convertPositionTo("relative", {
+ top: 0,
+ left: m - d.helperProportions.width
+ }).left - d.margins.left)
+ } ! d.snapElements[k].snapping && (p || q || r || s || t) && d.options.snap.snap && d.options.snap.snap.call(d.element, b, a.extend(d._uiHash(), {
+ snapItem: d.snapElements[k].item
+ })),
+ d.snapElements[k].snapping = p || q || r || s || t
+ }
+ }
+ }),
+ a.ui.plugin.add("draggable", "stack", {
+ start: function(b, c) {
+ var d = a(this).data("draggable").options,
+ e = a.makeArray(a(d.stack)).sort(function(b, c) {
+ return (parseInt(a(b).css("zIndex"), 10) || 0) - (parseInt(a(c).css("zIndex"), 10) || 0)
+ });
+ if ( !! e.length) {
+ var f = parseInt(e[0].style.zIndex) || 0;
+ a(e).each(function(a) {
+ this.style.zIndex = f + a
+ }),
+ this[0].style.zIndex = f + e.length
+ }
+ }
+ }),
+ a.ui.plugin.add("draggable", "zIndex", {
+ start: function(b, c) {
+ var d = a(c.helper),
+ e = a(this).data("draggable").options;
+ d.css("zIndex") && (e._zIndex = d.css("zIndex")),
+ d.css("zIndex", e.zIndex)
+ },
+ stop: function(b, c) {
+ var d = a(this).data("draggable").options;
+ d._zIndex && a(c.helper).css("zIndex", d._zIndex)
+ }
+ })
+})(jQuery);
+/*
+ * jQuery UI Droppable 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Droppables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ * jquery.ui.mouse.js
+ * jquery.ui.draggable.js
+ */
+(function(a, b) {
+ a.widget("ui.droppable", {
+ widgetEventPrefix: "drop",
+ options: {
+ accept: "*",
+ activeClass: !1,
+ addClasses: !0,
+ greedy: !1,
+ hoverClass: !1,
+ scope: "default",
+ tolerance: "intersect"
+ },
+ _create: function() {
+ var b = this.options,
+ c = b.accept;
+ this.isover = 0,
+ this.isout = 1,
+ this.accept = a.isFunction(c) ? c: function(a) {
+ return a.is(c)
+ },
+ this.proportions = {
+ width: this.element[0].offsetWidth,
+ height: this.element[0].offsetHeight
+ },
+ a.ui.ddmanager.droppables[b.scope] = a.ui.ddmanager.droppables[b.scope] || [],
+ a.ui.ddmanager.droppables[b.scope].push(this),
+ b.addClasses && this.element.addClass("ui-droppable")
+ },
+ destroy: function() {
+ var b = a.ui.ddmanager.droppables[this.options.scope];
+ for (var c = 0; c < b.length; c++) b[c] == this && b.splice(c, 1);
+ this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");
+ return this
+ },
+ _setOption: function(b, c) {
+ b == "accept" && (this.accept = a.isFunction(c) ? c: function(a) {
+ return a.is(c)
+ }),
+ a.Widget.prototype._setOption.apply(this, arguments)
+ },
+ _activate: function(b) {
+ var c = a.ui.ddmanager.current;
+ this.options.activeClass && this.element.addClass(this.options.activeClass),
+ c && this._trigger("activate", b, this.ui(c))
+ },
+ _deactivate: function(b) {
+ var c = a.ui.ddmanager.current;
+ this.options.activeClass && this.element.removeClass(this.options.activeClass),
+ c && this._trigger("deactivate", b, this.ui(c))
+ },
+ _over: function(b) {
+ var c = a.ui.ddmanager.current; !! c && (c.currentItem || c.element)[0] != this.element[0] && this.accept.call(this.element[0], c.currentItem || c.element) && (this.options.hoverClass && this.element.addClass(this.options.hoverClass), this._trigger("over", b, this.ui(c)))
+ },
+ _out: function(b) {
+ var c = a.ui.ddmanager.current; !! c && (c.currentItem || c.element)[0] != this.element[0] && this.accept.call(this.element[0], c.currentItem || c.element) && (this.options.hoverClass && this.element.removeClass(this.options.hoverClass), this._trigger("out", b, this.ui(c)))
+ },
+ _drop: function(b, c) {
+ var d = c || a.ui.ddmanager.current;
+ if (!d || (d.currentItem || d.element)[0] == this.element[0]) return ! 1;
+ var e = !1;
+ this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {
+ var b = a.data(this, "droppable");
+ if (b.options.greedy && !b.options.disabled && b.options.scope == d.options.scope && b.accept.call(b.element[0], d.currentItem || d.element) && a.ui.intersect(d, a.extend(b, {
+ offset: b.element.offset()
+ }), b.options.tolerance)) {
+ e = !0;
+ return ! 1
+ }
+ });
+ if (e) return ! 1;
+ if (this.accept.call(this.element[0], d.currentItem || d.element)) {
+ this.options.activeClass && this.element.removeClass(this.options.activeClass),
+ this.options.hoverClass && this.element.removeClass(this.options.hoverClass),
+ this._trigger("drop", b, this.ui(d));
+ return this.element
+ }
+ return ! 1
+ },
+ ui: function(a) {
+ return {
+ draggable: a.currentItem || a.element,
+ helper: a.helper,
+ position: a.position,
+ offset: a.positionAbs
+ }
+ }
+ }),
+ a.extend(a.ui.droppable, {
+ version: "1.8.18"
+ }),
+ a.ui.intersect = function(b, c, d) {
+ if (!c.offset) return ! 1;
+ var e = (b.positionAbs || b.position.absolute).left,
+ f = e + b.helperProportions.width,
+ g = (b.positionAbs || b.position.absolute).top,
+ h = g + b.helperProportions.height,
+ i = c.offset.left,
+ j = i + c.proportions.width,
+ k = c.offset.top,
+ l = k + c.proportions.height;
+ switch (d) {
+ case "fit":
+ return i <= e && f <= j && k <= g && h <= l;
+ case "intersect":
+ return i < e + b.helperProportions.width / 2 && f - b.helperProportions.width / 2 < j && k < g + b.helperProportions.height / 2 && h - b.helperProportions.height / 2 < l;
+ case "pointer":
+ var m = (b.positionAbs || b.position.absolute).left + (b.clickOffset || b.offset.click).left,
+ n = (b.positionAbs || b.position.absolute).top + (b.clickOffset || b.offset.click).top,
+ o = a.ui.isOver(n, m, k, i, c.proportions.height, c.proportions.width);
+ return o;
+ case "touch":
+ return (g >= k && g <= l || h >= k && h <= l || g < k && h > l) && (e >= i && e <= j || f >= i && f <= j || e < i && f > j);
+ default:
+ return ! 1
+ }
+ },
+ a.ui.ddmanager = {
+ current: null,
+ droppables: {
+ "default": []
+ },
+ prepareOffsets: function(b, c) {
+ var d = a.ui.ddmanager.droppables[b.options.scope] || [],
+ e = c ? c.type: null,
+ f = (b.currentItem || b.element).find(":data(droppable)").andSelf();
+ droppablesLoop: for (var g = 0; g < d.length; g++) {
+ if (d[g].options.disabled || b && !d[g].accept.call(d[g].element[0], b.currentItem || b.element)) continue;
+ for (var h = 0; h < f.length; h++) if (f[h] == d[g].element[0]) {
+ d[g].proportions.height = 0;
+ continue droppablesLoop
+ }
+ d[g].visible = d[g].element.css("display") != "none";
+ if (!d[g].visible) continue;
+ e == "mousedown" && d[g]._activate.call(d[g], c),
+ d[g].offset = d[g].element.offset(),
+ d[g].proportions = {
+ width: d[g].element[0].offsetWidth,
+ height: d[g].element[0].offsetHeight
+ }
+ }
+ },
+ drop: function(b, c) {
+ var d = !1;
+ a.each(a.ui.ddmanager.droppables[b.options.scope] || [],
+ function() { ! this.options || (!this.options.disabled && this.visible && a.ui.intersect(b, this, this.options.tolerance) && (d = this._drop.call(this, c) || d), !this.options.disabled && this.visible && this.accept.call(this.element[0], b.currentItem || b.element) && (this.isout = 1, this.isover = 0, this._deactivate.call(this, c)))
+ });
+ return d
+ },
+ dragStart: function(b, c) {
+ b.element.parents(":not(body,html)").bind("scroll.droppable",
+ function() {
+ b.options.refreshPositions || a.ui.ddmanager.prepareOffsets(b, c)
+ })
+ },
+ drag: function(b, c) {
+ b.options.refreshPositions && a.ui.ddmanager.prepareOffsets(b, c),
+ a.each(a.ui.ddmanager.droppables[b.options.scope] || [],
+ function() {
+ if (! (this.options.disabled || this.greedyChild || !this.visible)) {
+ var d = a.ui.intersect(b, this, this.options.tolerance),
+ e = !d && this.isover == 1 ? "isout": d && this.isover == 0 ? "isover": null;
+ if (!e) return;
+ var f;
+ if (this.options.greedy) {
+ var g = this.element.parents(":data(droppable):eq(0)");
+ g.length && (f = a.data(g[0], "droppable"), f.greedyChild = e == "isover" ? 1 : 0)
+ }
+ f && e == "isover" && (f.isover = 0, f.isout = 1, f._out.call(f, c)),
+ this[e] = 1,
+ this[e == "isout" ? "isover": "isout"] = 0,
+ this[e == "isover" ? "_over": "_out"].call(this, c),
+ f && e == "isout" && (f.isout = 0, f.isover = 1, f._over.call(f, c))
+ }
+ })
+ },
+ dragStop: function(b, c) {
+ b.element.parents(":not(body,html)").unbind("scroll.droppable"),
+ b.options.refreshPositions || a.ui.ddmanager.prepareOffsets(b, c)
+ }
+ }
+})(jQuery);
+/*
+ * jQuery UI Resizable 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function(a, b) {
+ a.widget("ui.resizable", a.ui.mouse, {
+ widgetEventPrefix: "resize",
+ options: {
+ alsoResize: !1,
+ animate: !1,
+ animateDuration: "slow",
+ animateEasing: "swing",
+ aspectRatio: !1,
+ autoHide: !1,
+ containment: !1,
+ ghost: !1,
+ grid: !1,
+ handles: "e,s,se",
+ helper: !1,
+ maxHeight: null,
+ maxWidth: null,
+ minHeight: 10,
+ minWidth: 10,
+ zIndex: 1e3
+ },
+ _create: function() {
+ var b = this,
+ c = this.options;
+ this.element.addClass("ui-resizable"),
+ a.extend(this, {
+ _aspectRatio: !!c.aspectRatio,
+ aspectRatio: c.aspectRatio,
+ originalElement: this.element,
+ _proportionallyResizeElements: [],
+ _helper: c.helper || c.ghost || c.animate ? c.helper || "ui-resizable-helper": null
+ }),
+ this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i) && (this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
+ position: this.element.css("position"),
+ width: this.element.outerWidth(),
+ height: this.element.outerHeight(),
+ top: this.element.css("top"),
+ left: this.element.css("left")
+ })), this.element = this.element.parent().data("resizable", this.element.data("resizable")), this.elementIsWrapper = !0, this.element.css({
+ marginLeft: this.originalElement.css("marginLeft"),
+ marginTop: this.originalElement.css("marginTop"),
+ marginRight: this.originalElement.css("marginRight"),
+ marginBottom: this.originalElement.css("marginBottom")
+ }), this.originalElement.css({
+ marginLeft: 0,
+ marginTop: 0,
+ marginRight: 0,
+ marginBottom: 0
+ }), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({
+ position: "static",
+ zoom: 1,
+ display: "block"
+ })), this.originalElement.css({
+ margin: this.originalElement.css("margin")
+ }), this._proportionallyResize()),
+ this.handles = c.handles || (a(".ui-resizable-handle", this.element).length ? {
+ n: ".ui-resizable-n",
+ e: ".ui-resizable-e",
+ s: ".ui-resizable-s",
+ w: ".ui-resizable-w",
+ se: ".ui-resizable-se",
+ sw: ".ui-resizable-sw",
+ ne: ".ui-resizable-ne",
+ nw: ".ui-resizable-nw"
+ }: "e,s,se");
+ if (this.handles.constructor == String) {
+ this.handles == "all" && (this.handles = "n,e,s,w,se,sw,ne,nw");
+ var d = this.handles.split(",");
+ this.handles = {};
+ for (var e = 0; e < d.length; e++) {
+ var f = a.trim(d[e]),
+ g = "ui-resizable-" + f,
+ h = a('<div class="ui-resizable-handle ' + g + '"></div>');
+ /sw|se|ne|nw/.test(f) && h.css({
+ zIndex: ++c.zIndex
+ }),
+ "se" == f && h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),
+ this.handles[f] = ".ui-resizable-" + f,
+ this.element.append(h)
+ }
+ }
+ this._renderAxis = function(b) {
+ b = b || this.element;
+ for (var c in this.handles) {
+ this.handles[c].constructor == String && (this.handles[c] = a(this.handles[c], this.element).show());
+ if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
+ var d = a(this.handles[c], this.element),
+ e = 0;
+ e = /sw|ne|nw|se|n|s/.test(c) ? d.outerHeight() : d.outerWidth();
+ var f = ["padding", /ne|nw|n/.test(c) ? "Top": /se|sw|s/.test(c) ? "Bottom": /^e$/.test(c) ? "Right": "Left"].join("");
+ b.css(f, e),
+ this._proportionallyResize()
+ }
+ if (!a(this.handles[c]).length) continue
+ }
+ },
+ this._renderAxis(this.element),
+ this._handles = a(".ui-resizable-handle", this.element).disableSelection(),
+ this._handles.mouseover(function() {
+ if (!b.resizing) {
+ if (this.className) var a = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
+ b.axis = a && a[1] ? a[1] : "se"
+ }
+ }),
+ c.autoHide && (this._handles.hide(), a(this.element).addClass("ui-resizable-autohide").hover(function() {
+ c.disabled || (a(this).removeClass("ui-resizable-autohide"), b._handles.show())
+ },
+ function() {
+ c.disabled || b.resizing || (a(this).addClass("ui-resizable-autohide"), b._handles.hide())
+ })),
+ this._mouseInit()
+ },
+ destroy: function() {
+ this._mouseDestroy();
+ var b = function(b) {
+ a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()
+ };
+ if (this.elementIsWrapper) {
+ b(this.element);
+ var c = this.element;
+ c.after(this.originalElement.css({
+ position: c.css("position"),
+ width: c.outerWidth(),
+ height: c.outerHeight(),
+ top: c.css("top"),
+ left: c.css("left")
+ })).remove()
+ }
+ this.originalElement.css("resize", this.originalResizeStyle),
+ b(this.originalElement);
+ return this
+ },
+ _mouseCapture: function(b) {
+ var c = !1;
+ for (var d in this.handles) a(this.handles[d])[0] == b.target && (c = !0);
+ return ! this.options.disabled && c
+ },
+ _mouseStart: function(b) {
+ var d = this.options,
+ e = this.element.position(),
+ f = this.element;
+ this.resizing = !0,
+ this.documentScroll = {
+ top: a(document).scrollTop(),
+ left: a(document).scrollLeft()
+ },
+ (f.is(".ui-draggable") || /absolute/.test(f.css("position"))) && f.css({
+ position: "absolute",
+ top: e.top,
+ left: e.left
+ }),
+ this._renderProxy();
+ var g = c(this.helper.css("left")),
+ h = c(this.helper.css("top"));
+ d.containment && (g += a(d.containment).scrollLeft() || 0, h += a(d.containment).scrollTop() || 0),
+ this.offset = this.helper.offset(),
+ this.position = {
+ left: g,
+ top: h
+ },
+ this.size = this._helper ? {
+ width: f.outerWidth(),
+ height: f.outerHeight()
+ }: {
+ width: f.width(),
+ height: f.height()
+ },
+ this.originalSize = this._helper ? {
+ width: f.outerWidth(),
+ height: f.outerHeight()
+ }: {
+ width: f.width(),
+ height: f.height()
+ },
+ this.originalPosition = {
+ left: g,
+ top: h
+ },
+ this.sizeDiff = {
+ width: f.outerWidth() - f.width(),
+ height: f.outerHeight() - f.height()
+ },
+ this.originalMousePosition = {
+ left: b.pageX,
+ top: b.pageY
+ },
+ this.aspectRatio = typeof d.aspectRatio == "number" ? d.aspectRatio: this.originalSize.width / this.originalSize.height || 1;
+ var i = a(".ui-resizable-" + this.axis).css("cursor");
+ a("body").css("cursor", i == "auto" ? this.axis + "-resize": i),
+ f.addClass("ui-resizable-resizing"),
+ this._propagate("start", b);
+ return ! 0
+ },
+ _mouseDrag: function(b) {
+ var c = this.helper,
+ d = this.options,
+ e = {},
+ f = this,
+ g = this.originalMousePosition,
+ h = this.axis,
+ i = b.pageX - g.left || 0,
+ j = b.pageY - g.top || 0,
+ k = this._change[h];
+ if (!k) return ! 1;
+ var l = k.apply(this, [b, i, j]),
+ m = a.browser.msie && a.browser.version < 7,
+ n = this.sizeDiff;
+ this._updateVirtualBoundaries(b.shiftKey);
+ if (this._aspectRatio || b.shiftKey) l = this._updateRatio(l, b);
+ l = this._respectSize(l, b),
+ this._propagate("resize", b),
+ c.css({
+ top: this.position.top + "px",
+ left: this.position.left + "px",
+ width: this.size.width + "px",
+ height: this.size.height + "px"
+ }),
+ !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(),
+ this._updateCache(l),
+ this._trigger("resize", b, this.ui());
+ return ! 1
+ },
+ _mouseStop: function(b) {
+ this.resizing = !1;
+ var c = this.options,
+ d = this;
+ if (this._helper) {
+ var e = this._proportionallyResizeElements,
+ f = e.length && /textarea/i.test(e[0].nodeName),
+ g = f && a.ui.hasScroll(e[0], "left") ? 0 : d.sizeDiff.height,
+ h = f ? 0 : d.sizeDiff.width,
+ i = {
+ width: d.helper.width() - h,
+ height: d.helper.height() - g
+ },
+ j = parseInt(d.element.css("left"), 10) + (d.position.left - d.originalPosition.left) || null,
+ k = parseInt(d.element.css("top"), 10) + (d.position.top - d.originalPosition.top) || null;
+ c.animate || this.element.css(a.extend(i, {
+ top: k,
+ left: j
+ })),
+ d.helper.height(d.size.height),
+ d.helper.width(d.size.width),
+ this._helper && !c.animate && this._proportionallyResize()
+ }
+ a("body").css("cursor", "auto"),
+ this.element.removeClass("ui-resizable-resizing"),
+ this._propagate("stop", b),
+ this._helper && this.helper.remove();
+ return ! 1
+ },
+ _updateVirtualBoundaries: function(a) {
+ var b = this.options,
+ c, e, f, g, h;
+ h = {
+ minWidth: d(b.minWidth) ? b.minWidth: 0,
+ maxWidth: d(b.maxWidth) ? b.maxWidth: Infinity,
+ minHeight: d(b.minHeight) ? b.minHeight: 0,
+ maxHeight: d(b.maxHeight) ? b.maxHeight: Infinity
+ };
+ if (this._aspectRatio || a) c = h.minHeight * this.aspectRatio,
+ f = h.minWidth / this.aspectRatio,
+ e = h.maxHeight * this.aspectRatio,
+ g = h.maxWidth / this.aspectRatio,
+ c > h.minWidth && (h.minWidth = c),
+ f > h.minHeight && (h.minHeight = f),
+ e < h.maxWidth && (h.maxWidth = e),
+ g < h.maxHeight && (h.maxHeight = g);
+ this._vBoundaries = h
+ },
+ _updateCache: function(a) {
+ var b = this.options;
+ this.offset = this.helper.offset(),
+ d(a.left) && (this.position.left = a.left),
+ d(a.top) && (this.position.top = a.top),
+ d(a.height) && (this.size.height = a.height),
+ d(a.width) && (this.size.width = a.width)
+ },
+ _updateRatio: function(a, b) {
+ var c = this.options,
+ e = this.position,
+ f = this.size,
+ g = this.axis;
+ d(a.height) ? a.width = a.height * this.aspectRatio: d(a.width) && (a.height = a.width / this.aspectRatio),
+ g == "sw" && (a.left = e.left + (f.width - a.width), a.top = null),
+ g == "nw" && (a.top = e.top + (f.height - a.height), a.left = e.left + (f.width - a.width));
+ return a
+ },
+ _respectSize: function(a, b) {
+ var c = this.helper,
+ e = this._vBoundaries,
+ f = this._aspectRatio || b.shiftKey,
+ g = this.axis,
+ h = d(a.width) && e.maxWidth && e.maxWidth < a.width,
+ i = d(a.height) && e.maxHeight && e.maxHeight < a.height,
+ j = d(a.width) && e.minWidth && e.minWidth > a.width,
+ k = d(a.height) && e.minHeight && e.minHeight > a.height;
+ j && (a.width = e.minWidth),
+ k && (a.height = e.minHeight),
+ h && (a.width = e.maxWidth),
+ i && (a.height = e.maxHeight);
+ var l = this.originalPosition.left + this.originalSize.width,
+ m = this.position.top + this.size.height,
+ n = /sw|nw|w/.test(g),
+ o = /nw|ne|n/.test(g);
+ j && n && (a.left = l - e.minWidth),
+ h && n && (a.left = l - e.maxWidth),
+ k && o && (a.top = m - e.minHeight),
+ i && o && (a.top = m - e.maxHeight);
+ var p = !a.width && !a.height;
+ p && !a.left && a.top ? a.top = null: p && !a.top && a.left && (a.left = null);
+ return a
+ },
+ _proportionallyResize: function() {
+ var b = this.options;
+ if ( !! this._proportionallyResizeElements.length) {
+ var c = this.helper || this.element;
+ for (var d = 0; d < this._proportionallyResizeElements.length; d++) {
+ var e = this._proportionallyResizeElements[d];
+ if (!this.borderDif) {
+ var f = [e.css("borderTopWidth"), e.css("borderRightWidth"), e.css("borderBottomWidth"), e.css("borderLeftWidth")],
+ g = [e.css("paddingTop"), e.css("paddingRight"), e.css("paddingBottom"), e.css("paddingLeft")];
+ this.borderDif = a.map(f,
+ function(a, b) {
+ var c = parseInt(a, 10) || 0,
+ d = parseInt(g[b], 10) || 0;
+ return c + d
+ })
+ }
+ if (a.browser.msie && ( !! a(c).is(":hidden") || !!a(c).parents(":hidden").length)) continue;
+ e.css({
+ height: c.height() - this.borderDif[0] - this.borderDif[2] || 0,
+ width: c.width() - this.borderDif[1] - this.borderDif[3] || 0
+ })
+ }
+ }
+ },
+ _renderProxy: function() {
+ var b = this.element,
+ c = this.options;
+ this.elementOffset = b.offset();
+ if (this._helper) {
+ this.helper = this.helper || a('<div style="overflow:hidden;"></div>');
+ var d = a.browser.msie && a.browser.version < 7,
+ e = d ? 1 : 0,
+ f = d ? 2 : -1;
+ this.helper.addClass(this._helper).css({
+ width: this.element.outerWidth() + f,
+ height: this.element.outerHeight() + f,
+ position: "absolute",
+ left: this.elementOffset.left - e + "px",
+ top: this.elementOffset.top - e + "px",
+ zIndex: ++c.zIndex
+ }),
+ this.helper.appendTo("body").disableSelection()
+ } else this.helper = this.element
+ },
+ _change: {
+ e: function(a, b, c) {
+ return {
+ width: this.originalSize.width + b
+ }
+ },
+ w: function(a, b, c) {
+ var d = this.options,
+ e = this.originalSize,
+ f = this.originalPosition;
+ return {
+ left: f.left + b,
+ width: e.width - b
+ }
+ },
+ n: function(a, b, c) {
+ var d = this.options,
+ e = this.originalSize,
+ f = this.originalPosition;
+ return {
+ top: f.top + c,
+ height: e.height - c
+ }
+ },
+ s: function(a, b, c) {
+ return {
+ height: this.originalSize.height + c
+ }
+ },
+ se: function(b, c, d) {
+ return a.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [b, c, d]))
+ },
+ sw: function(b, c, d) {
+ return a.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [b, c, d]))
+ },
+ ne: function(b, c, d) {
+ return a.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [b, c, d]))
+ },
+ nw: function(b, c, d) {
+ return a.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [b, c, d]))
+ }
+ },
+ _propagate: function(b, c) {
+ a.ui.plugin.call(this, b, [c, this.ui()]),
+ b != "resize" && this._trigger(b, c, this.ui())
+ },
+ plugins: {},
+ ui: function() {
+ return {
+ originalElement: this.originalElement,
+ element: this.element,
+ helper: this.helper,
+ position: this.position,
+ size: this.size,
+ originalSize: this.originalSize,
+ originalPosition: this.originalPosition
+ }
+ }
+ }),
+ a.extend(a.ui.resizable, {
+ version: "1.8.18"
+ }),
+ a.ui.plugin.add("resizable", "alsoResize", {
+ start: function(b, c) {
+ var d = a(this).data("resizable"),
+ e = d.options,
+ f = function(b) {
+ a(b).each(function() {
+ var b = a(this);
+ b.data("resizable-alsoresize", {
+ width: parseInt(b.width(), 10),
+ height: parseInt(b.height(), 10),
+ left: parseInt(b.css("left"), 10),
+ top: parseInt(b.css("top"), 10)
+ })
+ })
+ };
+ typeof e.alsoResize == "object" && !e.alsoResize.parentNode ? e.alsoResize.length ? (e.alsoResize = e.alsoResize[0], f(e.alsoResize)) : a.each(e.alsoResize,
+ function(a) {
+ f(a)
+ }) : f(e.alsoResize)
+ },
+ resize: function(b, c) {
+ var d = a(this).data("resizable"),
+ e = d.options,
+ f = d.originalSize,
+ g = d.originalPosition,
+ h = {
+ height: d.size.height - f.height || 0,
+ width: d.size.width - f.width || 0,
+ top: d.position.top - g.top || 0,
+ left: d.position.left - g.left || 0
+ },
+ i = function(b, d) {
+ a(b).each(function() {
+ var b = a(this),
+ e = a(this).data("resizable-alsoresize"),
+ f = {},
+ g = d && d.length ? d: b.parents(c.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
+ a.each(g,
+ function(a, b) {
+ var c = (e[b] || 0) + (h[b] || 0);
+ c && c >= 0 && (f[b] = c || null)
+ }),
+ b.css(f)
+ })
+ };
+ typeof e.alsoResize == "object" && !e.alsoResize.nodeType ? a.each(e.alsoResize,
+ function(a, b) {
+ i(a, b)
+ }) : i(e.alsoResize)
+ },
+ stop: function(b, c) {
+ a(this).removeData("resizable-alsoresize")
+ }
+ }),
+ a.ui.plugin.add("resizable", "animate", {
+ stop: function(b, c) {
+ var d = a(this).data("resizable"),
+ e = d.options,
+ f = d._proportionallyResizeElements,
+ g = f.length && /textarea/i.test(f[0].nodeName),
+ h = g && a.ui.hasScroll(f[0], "left") ? 0 : d.sizeDiff.height,
+ i = g ? 0 : d.sizeDiff.width,
+ j = {
+ width: d.size.width - i,
+ height: d.size.height - h
+ },
+ k = parseInt(d.element.css("left"), 10) + (d.position.left - d.originalPosition.left) || null,
+ l = parseInt(d.element.css("top"), 10) + (d.position.top - d.originalPosition.top) || null;
+ d.element.animate(a.extend(j, l && k ? {
+ top: l,
+ left: k
+ }: {}), {
+ duration: e.animateDuration,
+ easing: e.animateEasing,
+ step: function() {
+ var c = {
+ width: parseInt(d.element.css("width"), 10),
+ height: parseInt(d.element.css("height"), 10),
+ top: parseInt(d.element.css("top"), 10),
+ left: parseInt(d.element.css("left"), 10)
+ };
+ f && f.length && a(f[0]).css({
+ width: c.width,
+ height: c.height
+ }),
+ d._updateCache(c),
+ d._propagate("resize", b)
+ }
+ })
+ }
+ }),
+ a.ui.plugin.add("resizable", "containment", {
+ start: function(b, d) {
+ var e = a(this).data("resizable"),
+ f = e.options,
+ g = e.element,
+ h = f.containment,
+ i = h instanceof a ? h.get(0) : /parent/.test(h) ? g.parent().get(0) : h;
+ if ( !! i) {
+ e.containerElement = a(i);
+ if (/document/.test(h) || h == document) e.containerOffset = {
+ left: 0,
+ top: 0
+ },
+ e.containerPosition = {
+ left: 0,
+ top: 0
+ },
+ e.parentData = {
+ element: a(document),
+ left: 0,
+ top: 0,
+ width: a(document).width(),
+ height: a(document).height() || document.body.parentNode.scrollHeight
+ };
+ else {
+ var j = a(i),
+ k = [];
+ a(["Top", "Right", "Left", "Bottom"]).each(function(a, b) {
+ k[a] = c(j.css("padding" + b))
+ }),
+ e.containerOffset = j.offset(),
+ e.containerPosition = j.position(),
+ e.containerSize = {
+ height: j.innerHeight() - k[3],
+ width: j.innerWidth() - k[1]
+ };
+ var l = e.containerOffset,
+ m = e.containerSize.height,
+ n = e.containerSize.width,
+ o = a.ui.hasScroll(i, "left") ? i.scrollWidth: n,
+ p = a.ui.hasScroll(i) ? i.scrollHeight: m;
+ e.parentData = {
+ element: i,
+ left: l.left,
+ top: l.top,
+ width: o,
+ height: p
+ }
+ }
+ }
+ },
+ resize: function(b, c) {
+ var d = a(this).data("resizable"),
+ e = d.options,
+ f = d.containerSize,
+ g = d.containerOffset,
+ h = d.size,
+ i = d.position,
+ j = d._aspectRatio || b.shiftKey,
+ k = {
+ top: 0,
+ left: 0
+ },
+ l = d.containerElement;
+ l[0] != document && /static/.test(l.css("position")) && (k = g),
+ i.left < (d._helper ? g.left: 0) && (d.size.width = d.size.width + (d._helper ? d.position.left - g.left: d.position.left - k.left), j && (d.size.height = d.size.width / e.aspectRatio), d.position.left = e.helper ? g.left: 0),
+ i.top < (d._helper ? g.top: 0) && (d.size.height = d.size.height + (d._helper ? d.position.top - g.top: d.position.top), j && (d.size.width = d.size.height * e.aspectRatio), d.position.top = d._helper ? g.top: 0),
+ d.offset.left = d.parentData.left + d.position.left,
+ d.offset.top = d.parentData.top + d.position.top;
+ var m = Math.abs((d._helper ? d.offset.left - k.left: d.offset.left - k.left) + d.sizeDiff.width),
+ n = Math.abs((d._helper ? d.offset.top - k.top: d.offset.top - g.top) + d.sizeDiff.height),
+ o = d.containerElement.get(0) == d.element.parent().get(0),
+ p = /relative|absolute/.test(d.containerElement.css("position"));
+ o && p && (m -= d.parentData.left),
+ m + d.size.width >= d.parentData.width && (d.size.width = d.parentData.width - m, j && (d.size.height = d.size.width / d.aspectRatio)),
+ n + d.size.height >= d.parentData.height && (d.size.height = d.parentData.height - n, j && (d.size.width = d.size.height * d.aspectRatio))
+ },
+ stop: function(b, c) {
+ var d = a(this).data("resizable"),
+ e = d.options,
+ f = d.position,
+ g = d.containerOffset,
+ h = d.containerPosition,
+ i = d.containerElement,
+ j = a(d.helper),
+ k = j.offset(),
+ l = j.outerWidth() - d.sizeDiff.width,
+ m = j.outerHeight() - d.sizeDiff.height;
+ d._helper && !e.animate && /relative/.test(i.css("position")) && a(this).css({
+ left: k.left - h.left - g.left,
+ width: l,
+ height: m
+ }),
+ d._helper && !e.animate && /static/.test(i.css("position")) && a(this).css({
+ left: k.left - h.left - g.left,
+ width: l,
+ height: m
+ })
+ }
+ }),
+ a.ui.plugin.add("resizable", "ghost", {
+ start: function(b, c) {
+ var d = a(this).data("resizable"),
+ e = d.options,
+ f = d.size;
+ d.ghost = d.originalElement.clone(),
+ d.ghost.css({
+ opacity: .25,
+ display: "block",
+ position: "relative",
+ height: f.height,
+ width: f.width,
+ margin: 0,
+ left: 0,
+ top: 0
+ }).addClass("ui-resizable-ghost").addClass(typeof e.ghost == "string" ? e.ghost: ""),
+ d.ghost.appendTo(d.helper)
+ },
+ resize: function(b, c) {
+ var d = a(this).data("resizable"),
+ e = d.options;
+ d.ghost && d.ghost.css({
+ position: "relative",
+ height: d.size.height,
+ width: d.size.width
+ })
+ },
+ stop: function(b, c) {
+ var d = a(this).data("resizable"),
+ e = d.options;
+ d.ghost && d.helper && d.helper.get(0).removeChild(d.ghost.get(0))
+ }
+ }),
+ a.ui.plugin.add("resizable", "grid", {
+ resize: function(b, c) {
+ var d = a(this).data("resizable"),
+ e = d.options,
+ f = d.size,
+ g = d.originalSize,
+ h = d.originalPosition,
+ i = d.axis,
+ j = e._aspectRatio || b.shiftKey;
+ e.grid = typeof e.grid == "number" ? [e.grid, e.grid] : e.grid;
+ var k = Math.round((f.width - g.width) / (e.grid[0] || 1)) * (e.grid[0] || 1),
+ l = Math.round((f.height - g.height) / (e.grid[1] || 1)) * (e.grid[1] || 1);
+ /^(se|s|e)$/.test(i) ? (d.size.width = g.width + k, d.size.height = g.height + l) : /^(ne)$/.test(i) ? (d.size.width = g.width + k, d.size.height = g.height + l, d.position.top = h.top - l) : /^(sw)$/.test(i) ? (d.size.width = g.width + k, d.size.height = g.height + l, d.position.left = h.left - k) : (d.size.width = g.width + k, d.size.height = g.height + l, d.position.top = h.top - l, d.position.left = h.left - k)
+ }
+ });
+ var c = function(a) {
+ return parseInt(a, 10) || 0
+ },
+ d = function(a) {
+ return ! isNaN(parseInt(a, 10))
+ }
+})(jQuery);
+/*
+ * jQuery UI Selectable 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function(a, b) {
+ a.widget("ui.selectable", a.ui.mouse, {
+ options: {
+ appendTo: "body",
+ autoRefresh: !0,
+ distance: 0,
+ filter: "*",
+ tolerance: "touch"
+ },
+ _create: function() {
+ var b = this;
+ this.element.addClass("ui-selectable"),
+ this.dragged = !1;
+ var c;
+ this.refresh = function() {
+ c = a(b.options.filter, b.element[0]),
+ c.addClass("ui-selectee"),
+ c.each(function() {
+ var b = a(this),
+ c = b.offset();
+ a.data(this, "selectable-item", {
+ element: this,
+ $element: b,
+ left: c.left,
+ top: c.top,
+ right: c.left + b.outerWidth(),
+ bottom: c.top + b.outerHeight(),
+ startselected: !1,
+ selected: b.hasClass("ui-selected"),
+ selecting: b.hasClass("ui-selecting"),
+ unselecting: b.hasClass("ui-unselecting")
+ })
+ })
+ },
+ this.refresh(),
+ this.selectees = c.addClass("ui-selectee"),
+ this._mouseInit(),
+ this.helper = a("<div class='ui-selectable-helper'></div>")
+ },
+ destroy: function() {
+ this.selectees.removeClass("ui-selectee").removeData("selectable-item"),
+ this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),
+ this._mouseDestroy();
+ return this
+ },
+ _mouseStart: function(b) {
+ var c = this;
+ this.opos = [b.pageX, b.pageY];
+ if (!this.options.disabled) {
+ var d = this.options;
+ this.selectees = a(d.filter, this.element[0]),
+ this._trigger("start", b),
+ a(d.appendTo).append(this.helper),
+ this.helper.css({
+ left: b.clientX,
+ top: b.clientY,
+ width: 0,
+ height: 0
+ }),
+ d.autoRefresh && this.refresh(),
+ this.selectees.filter(".ui-selected").each(function() {
+ var d = a.data(this, "selectable-item");
+ d.startselected = !0,
+ !b.metaKey && !b.ctrlKey && (d.$element.removeClass("ui-selected"), d.selected = !1, d.$element.addClass("ui-unselecting"), d.unselecting = !0, c._trigger("unselecting", b, {
+ unselecting: d.element
+ }))
+ }),
+ a(b.target).parents().andSelf().each(function() {
+ var d = a.data(this, "selectable-item");
+ if (d) {
+ var e = !b.metaKey && !b.ctrlKey || !d.$element.hasClass("ui-selected");
+ d.$element.removeClass(e ? "ui-unselecting": "ui-selected").addClass(e ? "ui-selecting": "ui-unselecting"),
+ d.unselecting = !e,
+ d.selecting = e,
+ d.selected = e,
+ e ? c._trigger("selecting", b, {
+ selecting: d.element
+ }) : c._trigger("unselecting", b, {
+ unselecting: d.element
+ });
+ return ! 1
+ }
+ })
+ }
+ },
+ _mouseDrag: function(b) {
+ var c = this;
+ this.dragged = !0;
+ if (!this.options.disabled) {
+ var d = this.options,
+ e = this.opos[0],
+ f = this.opos[1],
+ g = b.pageX,
+ h = b.pageY;
+ if (e > g) {
+ var i = g;
+ g = e,
+ e = i
+ }
+ if (f > h) {
+ var i = h;
+ h = f,
+ f = i
+ }
+ this.helper.css({
+ left: e,
+ top: f,
+ width: g - e,
+ height: h - f
+ }),
+ this.selectees.each(function() {
+ var i = a.data(this, "selectable-item");
+ if ( !! i && i.element != c.element[0]) {
+ var j = !1;
+ d.tolerance == "touch" ? j = !(i.left > g || i.right < e || i.top > h || i.bottom < f) : d.tolerance == "fit" && (j = i.left > e && i.right < g && i.top > f && i.bottom < h),
+ j ? (i.selected && (i.$element.removeClass("ui-selected"), i.selected = !1), i.unselecting && (i.$element.removeClass("ui-unselecting"), i.unselecting = !1), i.selecting || (i.$element.addClass("ui-selecting"), i.selecting = !0, c._trigger("selecting", b, {
+ selecting: i.element
+ }))) : (i.selecting && ((b.metaKey || b.ctrlKey) && i.startselected ? (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.$element.addClass("ui-selected"), i.selected = !0) : (i.$element.removeClass("ui-selecting"), i.selecting = !1, i.startselected && (i.$element.addClass("ui-unselecting"), i.unselecting = !0), c._trigger("unselecting", b, {
+ unselecting: i.element
+ }))), i.selected && !b.metaKey && !b.ctrlKey && !i.startselected && (i.$element.removeClass("ui-selected"), i.selected = !1, i.$element.addClass("ui-unselecting"), i.unselecting = !0, c._trigger("unselecting", b, {
+ unselecting: i.element
+ })))
+ }
+ });
+ return ! 1
+ }
+ },
+ _mouseStop: function(b) {
+ var c = this;
+ this.dragged = !1;
+ var d = this.options;
+ a(".ui-unselecting", this.element[0]).each(function() {
+ var d = a.data(this, "selectable-item");
+ d.$element.removeClass("ui-unselecting"),
+ d.unselecting = !1,
+ d.startselected = !1,
+ c._trigger("unselected", b, {
+ unselected: d.element
+ })
+ }),
+ a(".ui-selecting", this.element[0]).each(function() {
+ var d = a.data(this, "selectable-item");
+ d.$element.removeClass("ui-selecting").addClass("ui-selected"),
+ d.selecting = !1,
+ d.selected = !0,
+ d.startselected = !0,
+ c._trigger("selected", b, {
+ selected: d.element
+ })
+ }),
+ this._trigger("stop", b),
+ this.helper.remove();
+ return ! 1
+ }
+ }),
+ a.extend(a.ui.selectable, {
+ version: "1.8.18"
+ })
+})(jQuery);
+/*
+ * jQuery UI Sortable 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Sortables
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.mouse.js
+ * jquery.ui.widget.js
+ */
+(function(a, b) {
+ a.widget("ui.sortable", a.ui.mouse, {
+ widgetEventPrefix: "sort",
+ ready: !1,
+ options: {
+ appendTo: "parent",
+ axis: !1,
+ connectWith: !1,
+ containment: !1,
+ cursor: "auto",
+ cursorAt: !1,
+ dropOnEmpty: !0,
+ forcePlaceholderSize: !1,
+ forceHelperSize: !1,
+ grid: !1,
+ handle: !1,
+ helper: "original",
+ items: "> *",
+ opacity: !1,
+ placeholder: !1,
+ revert: !1,
+ scroll: !0,
+ scrollSensitivity: 20,
+ scrollSpeed: 20,
+ scope: "default",
+ tolerance: "intersect",
+ zIndex: 1e3
+ },
+ _create: function() {
+ var a = this.options;
+ this.containerCache = {},
+ this.element.addClass("ui-sortable"),
+ this.refresh(),
+ this.floating = this.items.length ? a.axis === "x" || /left|right/.test(this.items[0].item.css("float")) || /inline|table-cell/.test(this.items[0].item.css("display")) : !1,
+ this.offset = this.element.offset(),
+ this._mouseInit(),
+ this.ready = !0
+ },
+ destroy: function() {
+ a.Widget.prototype.destroy.call(this),
+ this.element.removeClass("ui-sortable ui-sortable-disabled"),
+ this._mouseDestroy();
+ for (var b = this.items.length - 1; b >= 0; b--) this.items[b].item.removeData(this.widgetName + "-item");
+ return this
+ },
+ _setOption: function(b, c) {
+ b === "disabled" ? (this.options[b] = c, this.widget()[c ? "addClass": "removeClass"]("ui-sortable-disabled")) : a.Widget.prototype._setOption.apply(this, arguments)
+ },
+ _mouseCapture: function(b, c) {
+ var d = this;
+ if (this.reverting) return ! 1;
+ if (this.options.disabled || this.options.type == "static") return ! 1;
+ this._refreshItems(b);
+ var e = null,
+ f = this,
+ g = a(b.target).parents().each(function() {
+ if (a.data(this, d.widgetName + "-item") == f) {
+ e = a(this);
+ return ! 1
+ }
+ });
+ a.data(b.target, d.widgetName + "-item") == f && (e = a(b.target));
+ if (!e) return ! 1;
+ if (this.options.handle && !c) {
+ var h = !1;
+ a(this.options.handle, e).find("*").andSelf().each(function() {
+ this == b.target && (h = !0)
+ });
+ if (!h) return ! 1
+ }
+ this.currentItem = e,
+
+ this._removeCurrentsFromItems();
+ return ! 0
+ },
+ _mouseStart: function(b, c, d) {
+ var e = this.options,
+ f = this;
+ this.currentContainer = this,
+ this.refreshPositions(),
+ this.helper = this._createHelper(b),
+ this._cacheHelperProportions(),
+ this._cacheMargins(),
+ this.scrollParent = this.helper.scrollParent(),
+ this.offset = this.currentItem.offset(),
+ this.offset = {
+ top: this.offset.top - this.margins.top,
+ left: this.offset.left - this.margins.left
+ },
+ this.helper.css("position", "absolute"),
+ this.cssPosition = this.helper.css("position"),
+ a.extend(this.offset, {
+ click: {
+ left: b.pageX - this.offset.left,
+ top: b.pageY - this.offset.top
+ },
+ parent: this._getParentOffset(),
+ relative: this._getRelativeOffset()
+ }),
+ this.originalPosition = this._generatePosition(b),
+ this.originalPageX = b.pageX,
+ this.originalPageY = b.pageY,
+ e.cursorAt && this._adjustOffsetFromHelper(e.cursorAt),
+ this.domPosition = {
+ prev: this.currentItem.prev()[0],
+ parent: this.currentItem.parent()[0]
+ },
+ this.helper[0] != this.currentItem[0] && this.currentItem.hide(),
+ this._createPlaceholder(),
+ e.containment && this._setContainment(),
+ e.cursor && (a("body").css("cursor") && (this._storedCursor = a("body").css("cursor")), a("body").css("cursor", e.cursor)),
+ e.opacity && (this.helper.css("opacity") && (this._storedOpacity = this.helper.css("opacity")), this.helper.css("opacity", e.opacity)),
+ e.zIndex && (this.helper.css("zIndex") && (this._storedZIndex = this.helper.css("zIndex")), this.helper.css("zIndex", e.zIndex)),
+ this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML" && (this.overflowOffset = this.scrollParent.offset()),
+ this._trigger("start", b, this._uiHash()),
+ this._preserveHelperProportions || this._cacheHelperProportions();
+ if (!d) for (var g = this.containers.length - 1; g >= 0; g--) this.containers[g]._trigger("activate", b, f._uiHash(this));
+ a.ui.ddmanager && (a.ui.ddmanager.current = this),
+ a.ui.ddmanager && !e.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b),
+ this.dragging = !0,
+ this.helper.addClass("ui-sortable-helper"),
+ this._mouseDrag(b);
+ return ! 0
+ },
+ _mouseDrag: function(b) {
+ this.position = this._generatePosition(b),
+ this.positionAbs = this._convertPositionTo("absolute"),
+ this.lastPositionAbs || (this.lastPositionAbs = this.positionAbs);
+ if (this.options.scroll) {
+ var c = this.options,
+ d = !1;
+ this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML" ? (this.overflowOffset.top + this.scrollParent[0].offsetHeight - b.pageY < c.scrollSensitivity ? this.scrollParent[0].scrollTop = d = this.scrollParent[0].scrollTop + c.scrollSpeed: b.pageY - this.overflowOffset.top < c.scrollSensitivity && (this.scrollParent[0].scrollTop = d = this.scrollParent[0].scrollTop - c.scrollSpeed), this.overflowOffset.left + this.scrollParent[0].offsetWidth - b.pageX < c.scrollSensitivity ? this.scrollParent[0].scrollLeft = d = this.scrollParent[0].scrollLeft + c.scrollSpeed: b.pageX - this.overflowOffset.left < c.scrollSensitivity && (this.scrollParent[0].scrollLeft = d = this.scrollParent[0].scrollLeft - c.scrollSpeed)) : (b.pageY - a(document).scrollTop() < c.scrollSensitivity ? d = a(document).scrollTop(a(document).scrollTop() - c.scrollSpeed) : a(window).height() - (b.pageY - a(document).scrollTop()) < c.scrollSensitivity && (d = a(document).scrollTop(a(document).scrollTop() + c.scrollSpeed)), b.pageX - a(document).scrollLeft() < c.scrollSensitivity ? d = a(document).scrollLeft(a(document).scrollLeft() - c.scrollSpeed) : a(window).width() - (b.pageX - a(document).scrollLeft()) < c.scrollSensitivity && (d = a(document).scrollLeft(a(document).scrollLeft() + c.scrollSpeed))),
+ d !== !1 && a.ui.ddmanager && !c.dropBehaviour && a.ui.ddmanager.prepareOffsets(this, b)
+ }
+ this.positionAbs = this._convertPositionTo("absolute");
+ if (!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left + "px";
+ if (!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top + "px";
+ for (var e = this.items.length - 1; e >= 0; e--) {
+ var f = this.items[e],
+ g = f.item[0],
+ h = this._intersectsWithPointer(f);
+ if (!h) continue;
+ if (g != this.currentItem[0] && this.placeholder[h == 1 ? "next": "prev"]()[0] != g && !a.ui.contains(this.placeholder[0], g) && (this.options.type == "semi-dynamic" ? !a.ui.contains(this.element[0], g) : !0)) {
+ this.direction = h == 1 ? "down": "up";
+ if (this.options.tolerance == "pointer" || this._intersectsWithSides(f)) this._rearrange(b, f);
+ else break;
+ this._trigger("change", b, this._uiHash());
+ break
+ }
+ }
+ this._contactContainers(b),
+ a.ui.ddmanager && a.ui.ddmanager.drag(this, b),
+ this._trigger("sort", b, this._uiHash()),
+ this.lastPositionAbs = this.positionAbs;
+ return ! 1
+ },
+ _mouseStop: function(b, c) {
+ if ( !! b) {
+ a.ui.ddmanager && !this.options.dropBehaviour && a.ui.ddmanager.drop(this, b);
+ if (this.options.revert) {
+ var d = this,
+ e = d.placeholder.offset();
+ d.reverting = !0,
+ a(this.helper).animate({
+ left: e.left - this.offset.parent.left - d.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
+ top: e.top - this.offset.parent.top - d.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
+ },
+ parseInt(this.options.revert, 10) || 500,
+ function() {
+ d._clear(b)
+ })
+ } else this._clear(b, c);
+ return ! 1
+ }
+ },
+ cancel: function() {
+ var b = this;
+ if (this.dragging) {
+ this._mouseUp({
+ target: null
+ }),
+ this.options.helper == "original" ? this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") : this.currentItem.show();
+ for (var c = this.containers.length - 1; c >= 0; c--) this.containers[c]._trigger("deactivate", null, b._uiHash(this)),
+ this.containers[c].containerCache.over && (this.containers[c]._trigger("out", null, b._uiHash(this)), this.containers[c].containerCache.over = 0)
+ }
+ this.placeholder && (this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]), this.options.helper != "original" && this.helper && this.helper[0].parentNode && this.helper.remove(), a.extend(this, {
+ helper: null,
+ dragging: !1,
+ reverting: !1,
+ _noFinalSort: null
+ }), this.domPosition.prev ? a(this.domPosition.prev).after(this.currentItem) : a(this.domPosition.parent).prepend(this.currentItem));
+ return this
+ },
+ serialize: function(b) {
+ var c = this._getItemsAsjQuery(b && b.connected),
+ d = [];
+ b = b || {},
+ a(c).each(function() {
+ var c = (a(b.item || this).attr(b.attribute || "id") || "").match(b.expression || /(.+)[-=_](.+)/);
+ c && d.push((b.key || c[1] + "[]") + "=" + (b.key && b.expression ? c[1] : c[2]))
+ }),
+ !d.length && b.key && d.push(b.key + "=");
+ return d.join("&")
+ },
+ toArray: function(b) {
+ var c = this._getItemsAsjQuery(b && b.connected),
+ d = [];
+ b = b || {},
+ c.each(function() {
+ d.push(a(b.item || this).attr(b.attribute || "id") || "")
+ });
+ return d
+ },
+ _intersectsWith: function(a) {
+ var b = this.positionAbs.left,
+ c = b + this.helperProportions.width,
+ d = this.positionAbs.top,
+ e = d + this.helperProportions.height,
+ f = a.left,
+ g = f + a.width,
+ h = a.top,
+ i = h + a.height,
+ j = this.offset.click.top,
+ k = this.offset.click.left,
+ l = d + j > h && d + j < i && b + k > f && b + k < g;
+ return this.options.tolerance == "pointer" || this.options.forcePointerForContainers || this.options.tolerance != "pointer" && this.helperProportions[this.floating ? "width": "height"] > a[this.floating ? "width": "height"] ? l: f < b + this.helperProportions.width / 2 && c - this.helperProportions.width / 2 < g && h < d + this.helperProportions.height / 2 && e - this.helperProportions.height / 2 < i
+ },
+ _intersectsWithPointer: function(b) {
+ var c = a.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, b.top, b.height),
+ d = a.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, b.left, b.width),
+ e = c && d,
+ f = this._getDragVerticalDirection(),
+ g = this._getDragHorizontalDirection();
+ if (!e) return ! 1;
+ return this.floating ? g && g == "right" || f == "down" ? 2 : 1 : f && (f == "down" ? 2 : 1)
+ },
+ _intersectsWithSides: function(b) {
+ var c = a.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, b.top + b.height / 2, b.height),
+ d = a.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, b.left + b.width / 2, b.width),
+ e = this._getDragVerticalDirection(),
+ f = this._getDragHorizontalDirection();
+ return this.floating && f ? f == "right" && d || f == "left" && !d: e && (e == "down" && c || e == "up" && !c)
+ },
+ _getDragVerticalDirection: function() {
+ var a = this.positionAbs.top - this.lastPositionAbs.top;
+ return a != 0 && (a > 0 ? "down": "up")
+ },
+ _getDragHorizontalDirection: function() {
+ var a = this.positionAbs.left - this.lastPositionAbs.left;
+ return a != 0 && (a > 0 ? "right": "left")
+ },
+ refresh: function(a) {
+ this._refreshItems(a),
+ this.refreshPositions();
+ return this
+ },
+ _connectWith: function() {
+ var a = this.options;
+ return a.connectWith.constructor == String ? [a.connectWith] : a.connectWith
+ },
+ _getItemsAsjQuery: function(b) {
+ var c = this,
+ d = [],
+ e = [],
+ f = this._connectWith();
+ if (f && b) for (var g = f.length - 1; g >= 0; g--) {
+ var h = a(f[g]);
+ for (var i = h.length - 1; i >= 0; i--) {
+ var j = a.data(h[i], this.widgetName);
+ j && j != this && !j.options.disabled && e.push([a.isFunction(j.options.items) ? j.options.items.call(j.element) : a(j.options.items, j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), j])
+ }
+ }
+ e.push([a.isFunction(this.options.items) ? this.options.items.call(this.element, null, {
+ options: this.options,
+ item: this.currentItem
+ }) : a(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
+ for (var g = e.length - 1; g >= 0; g--) e[g][0].each(function() {
+ d.push(this)
+ });
+ return a(d)
+ },
+ _removeCurrentsFromItems: function() {
+ var a = this.currentItem.find(":data(" + this.widgetName + "-item)");
+ for (var b = 0; b < this.items.length; b++) for (var c = 0; c < a.length; c++) a[c] == this.items[b].item[0] && this.items.splice(b, 1)
+ },
+ _refreshItems: function(b) {
+ this.items = [],
+ this.containers = [this];
+ var c = this.items,
+ d = this,
+ e = [[a.isFunction(this.options.items) ? this.options.items.call(this.element[0], b, {
+ item: this.currentItem
+ }) : a(this.options.items, this.element), this]],
+ f = this._connectWith();
+ if (f && this.ready) for (var g = f.length - 1; g >= 0; g--) {
+ var h = a(f[g]);
+ for (var i = h.length - 1; i >= 0; i--) {
+ var j = a.data(h[i], this.widgetName);
+ j && j != this && !j.options.disabled && (e.push([a.isFunction(j.options.items) ? j.options.items.call(j.element[0], b, {
+ item: this.currentItem
+ }) : a(j.options.items, j.element), j]), this.containers.push(j))
+ }
+ }
+ for (var g = e.length - 1; g >= 0; g--) {
+ var k = e[g][1],
+ l = e[g][0];
+ for (var i = 0,
+ m = l.length; i < m; i++) {
+ var n = a(l[i]);
+ n.data(this.widgetName + "-item", k),
+ c.push({
+ item: n,
+ instance: k,
+ width: 0,
+ height: 0,
+ left: 0,
+ top: 0
+ })
+ }
+ }
+ },
+ refreshPositions: function(b) {
+ this.offsetParent && this.helper && (this.offset.parent = this._getParentOffset());
+ for (var c = this.items.length - 1; c >= 0; c--) {
+ var d = this.items[c];
+ if (d.instance != this.currentContainer && this.currentContainer && d.item[0] != this.currentItem[0]) continue;
+ var e = this.options.toleranceElement ? a(this.options.toleranceElement, d.item) : d.item;
+ b || (d.width = e.outerWidth(), d.height = e.outerHeight());
+ var f = e.offset();
+ d.left = f.left,
+ d.top = f.top
+ }
+ if (this.options.custom && this.options.custom.refreshContainers) this.options.custom.refreshContainers.call(this);
+ else for (var c = this.containers.length - 1; c >= 0; c--) {
+ var f = this.containers[c].element.offset();
+ this.containers[c].containerCache.left = f.left,
+ this.containers[c].containerCache.top = f.top,
+ this.containers[c].containerCache.width = this.containers[c].element.outerWidth(),
+ this.containers[c].containerCache.height = this.containers[c].element.outerHeight()
+ }
+ return this
+ },
+ _createPlaceholder: function(b) {
+ var c = b || this,
+ d = c.options;
+ if (!d.placeholder || d.placeholder.constructor == String) {
+ var e = d.placeholder;
+ d.placeholder = {
+ element: function() {
+ var b = a(document.createElement(c.currentItem[0].nodeName)).addClass(e || c.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];
+ e || (b.style.visibility = "hidden");
+ return b
+ },
+ update: function(a, b) {
+ if (!e || !!d.forcePlaceholderSize) b.height() || b.height(c.currentItem.innerHeight() - parseInt(c.currentItem.css("paddingTop") || 0, 10) - parseInt(c.currentItem.css("paddingBottom") || 0, 10)),
+ b.width() || b.width(c.currentItem.innerWidth() - parseInt(c.currentItem.css("paddingLeft") || 0, 10) - parseInt(c.currentItem.css("paddingRight") || 0, 10))
+ }
+ }
+ }
+ c.placeholder = a(d.placeholder.element.call(c.element, c.currentItem)),
+ c.currentItem.after(c.placeholder),
+ d.placeholder.update(c, c.placeholder)
+ },
+ _contactContainers: function(b) {
+ var c = null,
+ d = null;
+ for (var e = this.containers.length - 1; e >= 0; e--) {
+ if (a.ui.contains(this.currentItem[0], this.containers[e].element[0])) continue;
+ if (this._intersectsWith(this.containers[e].containerCache)) {
+ if (c && a.ui.contains(this.containers[e].element[0], c.element[0])) continue;
+ c = this.containers[e],
+ d = e
+ } else this.containers[e].containerCache.over && (this.containers[e]._trigger("out", b, this._uiHash(this)), this.containers[e].containerCache.over = 0)
+ }
+ if ( !! c) if (this.containers.length === 1) this.containers[d]._trigger("over", b, this._uiHash(this)),
+ this.containers[d].containerCache.over = 1;
+ else if (this.currentContainer != this.containers[d]) {
+ var f = 1e4,
+ g = null,
+ h = this.positionAbs[this.containers[d].floating ? "left": "top"];
+ for (var i = this.items.length - 1; i >= 0; i--) {
+ if (!a.ui.contains(this.containers[d].element[0], this.items[i].item[0])) continue;
+ var j = this.items[i][this.containers[d].floating ? "left": "top"];
+ Math.abs(j - h) < f && (f = Math.abs(j - h), g = this.items[i])
+ }
+ if (!g && !this.options.dropOnEmpty) return;
+ this.currentContainer = this.containers[d],
+ g ? this._rearrange(b, g, null, !0) : this._rearrange(b, null, this.containers[d].element, !0),
+ this._trigger("change", b, this._uiHash()),
+ this.containers[d]._trigger("change", b, this._uiHash(this)),
+ this.options.placeholder.update(this.currentContainer, this.placeholder),
+ this.containers[d]._trigger("over", b, this._uiHash(this)),
+ this.containers[d].containerCache.over = 1
+ }
+ },
+ _createHelper: function(b) {
+ var c = this.options,
+ d = a.isFunction(c.helper) ? a(c.helper.apply(this.element[0], [b, this.currentItem])) : c.helper == "clone" ? this.currentItem.clone() : this.currentItem;
+ d.parents("body").length || a(c.appendTo != "parent" ? c.appendTo: this.currentItem[0].parentNode)[0].appendChild(d[0]),
+ d[0] == this.currentItem[0] && (this._storedCSS = {
+ width: this.currentItem[0].style.width,
+ height: this.currentItem[0].style.height,
+ position: this.currentItem.css("position"),
+ top: this.currentItem.css("top"),
+ left: this.currentItem.css("left")
+ }),
+ (d[0].style.width == "" || c.forceHelperSize) && d.width(this.currentItem.width()),
+ (d[0].style.height == "" || c.forceHelperSize) && d.height(this.currentItem.height());
+ return d
+ },
+ _adjustOffsetFromHelper: function(b) {
+ typeof b == "string" && (b = b.split(" ")),
+ a.isArray(b) && (b = {
+ left: +b[0],
+ top: +b[1] || 0
+ }),
+ "left" in b && (this.offset.click.left = b.left + this.margins.left),
+ "right" in b && (this.offset.click.left = this.helperProportions.width - b.right + this.margins.left),
+ "top" in b && (this.offset.click.top = b.top + this.margins.top),
+ "bottom" in b && (this.offset.click.top = this.helperProportions.height - b.bottom + this.margins.top)
+ },
+ _getParentOffset: function() {
+ this.offsetParent = this.helper.offsetParent();
+ var b = this.offsetParent.offset();
+ this.cssPosition == "absolute" && this.scrollParent[0] != document && a.ui.contains(this.scrollParent[0], this.offsetParent[0]) && (b.left += this.scrollParent.scrollLeft(), b.top += this.scrollParent.scrollTop());
+ if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && a.browser.msie) b = {
+ top: 0,
+ left: 0
+ };
+ return {
+ top: b.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
+ left: b.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
+ }
+ },
+ _getRelativeOffset: function() {
+ if (this.cssPosition == "relative") {
+ var a = this.currentItem.position();
+ return {
+ top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
+ left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
+ }
+ }
+ return {
+ top: 0,
+ left: 0
+ }
+ },
+ _cacheMargins: function() {
+ this.margins = {
+ left: parseInt(this.currentItem.css("marginLeft"), 10) || 0,
+ top: parseInt(this.currentItem.css("marginTop"), 10) || 0
+ }
+ },
+ _cacheHelperProportions: function() {
+ this.helperProportions = {
+ width: this.helper.outerWidth(),
+ height: this.helper.outerHeight()
+ }
+ },
+ _setContainment: function() {
+ var b = this.options;
+ b.containment == "parent" && (b.containment = this.helper[0].parentNode);
+ if (b.containment == "document" || b.containment == "window") this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, a(b.containment == "document" ? document: window).width() - this.helperProportions.width - this.margins.left, (a(b.containment == "document" ? document: window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top];
+ if (!/^(document|window|parent)$/.test(b.containment)) {
+ var c = a(b.containment)[0],
+ d = a(b.containment).offset(),
+ e = a(c).css("overflow") != "hidden";
+ this.containment = [d.left + (parseInt(a(c).css("borderLeftWidth"), 10) || 0) + (parseInt(a(c).css("paddingLeft"), 10) || 0) - this.margins.left, d.top + (parseInt(a(c).css("borderTopWidth"), 10) || 0) + (parseInt(a(c).css("paddingTop"), 10) || 0) - this.margins.top, d.left + (e ? Math.max(c.scrollWidth, c.offsetWidth) : c.offsetWidth) - (parseInt(a(c).css("borderLeftWidth"), 10) || 0) - (parseInt(a(c).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, d.top + (e ? Math.max(c.scrollHeight, c.offsetHeight) : c.offsetHeight) - (parseInt(a(c).css("borderTopWidth"), 10) || 0) - (parseInt(a(c).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top]
+ }
+ },
+ _convertPositionTo: function(b, c) {
+ c || (c = this.position);
+ var d = b == "absolute" ? 1 : -1,
+ e = this.options,
+ f = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent: this.scrollParent,
+ g = /(html|body)/i.test(f[0].tagName);
+ return {
+ top: c.top + this.offset.relative.top * d + this.offset.parent.top * d - (a.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : g ? 0 : f.scrollTop()) * d),
+ left: c.left + this.offset.relative.left * d + this.offset.parent.left * d - (a.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : g ? 0 : f.scrollLeft()) * d)
+ }
+ },
+ _generatePosition: function(b) {
+ var c = this.options,
+ d = this.cssPosition == "absolute" && (this.scrollParent[0] == document || !a.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent: this.scrollParent,
+ e = /(html|body)/i.test(d[0].tagName);
+ this.cssPosition == "relative" && (this.scrollParent[0] == document || this.scrollParent[0] == this.offsetParent[0]) && (this.offset.relative = this._getRelativeOffset());
+ var f = b.pageX,
+ g = b.pageY;
+ if (this.originalPosition) {
+ this.containment && (b.pageX - this.offset.click.left < this.containment[0] && (f = this.containment[0] + this.offset.click.left), b.pageY - this.offset.click.top < this.containment[1] && (g = this.containment[1] + this.offset.click.top), b.pageX - this.offset.click.left > this.containment[2] && (f = this.containment[2] + this.offset.click.left), b.pageY - this.offset.click.top > this.containment[3] && (g = this.containment[3] + this.offset.click.top));
+ if (c.grid) {
+ var h = this.originalPageY + Math.round((g - this.originalPageY) / c.grid[1]) * c.grid[1];
+ g = this.containment ? h - this.offset.click.top < this.containment[1] || h - this.offset.click.top > this.containment[3] ? h - this.offset.click.top < this.containment[1] ? h + c.grid[1] : h - c.grid[1] : h: h;
+ var i = this.originalPageX + Math.round((f - this.originalPageX) / c.grid[0]) * c.grid[0];
+ f = this.containment ? i - this.offset.click.left < this.containment[0] || i - this.offset.click.left > this.containment[2] ? i - this.offset.click.left < this.containment[0] ? i + c.grid[0] : i - c.grid[0] : i: i
+ }
+ }
+ return {
+ top: g - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (a.browser.safari && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : d.scrollTop()),
+ left: f - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (a.browser.safari && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : d.scrollLeft())
+ }
+ },
+ _rearrange: function(a, b, c, d) {
+ c ? c[0].appendChild(this.placeholder[0]) : b.item[0].parentNode.insertBefore(this.placeholder[0], this.direction == "down" ? b.item[0] : b.item[0].nextSibling),
+ this.counter = this.counter ? ++this.counter: 1;
+ var e = this,
+ f = this.counter;
+ window.setTimeout(function() {
+ f == e.counter && e.refreshPositions(!d)
+ },
+ 0)
+ },
+ _clear: function(b, c) {
+ this.reverting = !1;
+ var d = [],
+ e = this; ! this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem),
+ this._noFinalSort = null;
+ if (this.helper[0] == this.currentItem[0]) {
+ for (var f in this._storedCSS) if (this._storedCSS[f] == "auto" || this._storedCSS[f] == "static") this._storedCSS[f] = "";
+ this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
+ } else this.currentItem.show();
+ this.fromOutside && !c && d.push(function(a) {
+ this._trigger("receive", a, this._uiHash(this.fromOutside))
+ }),
+ (this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !c && d.push(function(a) {
+ this._trigger("update", a, this._uiHash())
+ });
+ if (!a.ui.contains(this.element[0], this.currentItem[0])) {
+ c || d.push(function(a) {
+ this._trigger("remove", a, this._uiHash())
+ });
+ for (var f = this.containers.length - 1; f >= 0; f--) a.ui.contains(this.containers[f].element[0], this.currentItem[0]) && !c && (d.push(function(a) {
+ return function(b) {
+ a._trigger("receive", b, this._uiHash(this))
+ }
+ }.call(this, this.containers[f])), d.push(function(a) {
+ return function(b) {
+ a._trigger("update", b, this._uiHash(this))
+ }
+ }.call(this, this.containers[f])))
+ }
+ for (var f = this.containers.length - 1; f >= 0; f--) c || d.push(function(a) {
+ return function(b) {
+ a._trigger("deactivate", b, this._uiHash(this))
+ }
+ }.call(this, this.containers[f])),
+ this.containers[f].containerCache.over && (d.push(function(a) {
+ return function(b) {
+ a._trigger("out", b, this._uiHash(this))
+ }
+ }.call(this, this.containers[f])), this.containers[f].containerCache.over = 0);
+ this._storedCursor && a("body").css("cursor", this._storedCursor),
+ this._storedOpacity && this.helper.css("opacity", this._storedOpacity),
+ this._storedZIndex && this.helper.css("zIndex", this._storedZIndex == "auto" ? "": this._storedZIndex),
+ this.dragging = !1;
+ if (this.cancelHelperRemoval) {
+ if (!c) {
+ this._trigger("beforeStop", b, this._uiHash());
+ for (var f = 0; f < d.length; f++) d[f].call(this, b);
+ this._trigger("stop", b, this._uiHash())
+ }
+ return ! 1
+ }
+ c || this._trigger("beforeStop", b, this._uiHash()),
+ this.placeholder[0].parentNode.removeChild(this.placeholder[0]),
+ this.helper[0] != this.currentItem[0] && this.helper.remove(),
+ this.helper = null;
+ if (!c) {
+ for (var f = 0; f < d.length; f++) d[f].call(this, b);
+ this._trigger("stop", b, this._uiHash())
+ }
+ this.fromOutside = !1;
+ return ! 0
+ },
+ _trigger: function() {
+ a.Widget.prototype._trigger.apply(this, arguments) === !1 && this.cancel()
+ },
+ _uiHash: function(b) {
+ var c = b || this;
+ return {
+ helper: c.helper,
+ placeholder: c.placeholder || a([]),
+ position: c.position,
+ originalPosition: c.originalPosition,
+ offset: c.positionAbs,
+ item: c.currentItem,
+ sender: b ? b.element: null
+ }
+ }
+ }),
+ a.extend(a.ui.sortable, {
+ version: "1.8.18"
+ })
+})(jQuery);
+/*
+ * jQuery UI Datepicker 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker
+ *
+ * Depends:
+ * jquery.ui.core.js
+ */
+(function($, undefined) {
+ function isArray(a) {
+ return a && ($.browser.safari && typeof a == "object" && a.length || a.constructor && a.constructor.toString().match(/\Array\(\)/))
+ }
+ function extendRemove(a, b) {
+ $.extend(a, b);
+ for (var c in b) if (b[c] == null || b[c] == undefined) a[c] = b[c];
+ return a
+ }
+ function bindHover(a) {
+ var b = "button, .ui-datepicker-calendar td a";
+ return a.bind("mouseout",
+ function(a) {
+ var c = $(a.target).closest(b); ! c.length || c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")
+ }).bind("mouseover",
+ function(c) {
+ var d = $(c.target).closest(b); ! $.datepicker._isDisabledDatepicker(instActive.inline ? a.parent()[0] : instActive.input[0]) && !!d.length && (d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"), d.addClass("ui-state-hover"), d.hasClass("ui-datepicker-prev") && d.addClass("ui-datepicker-prev-hover"), d.hasClass("ui-datepicker-next") && d.addClass("ui-datepicker-next-hover"))
+ })
+ }
+ function Datepicker() {
+ this.debug = !1,
+ this._curInst = null,
+ this._keyEvent = !1,
+ this._disabledInputs = [],
+ this._datepickerShowing = !1,
+ this._inDialog = !1,
+ this._mainDivId = "ui-datepicker-div",
+ this._inlineClass = "ui-datepicker-inline",
+ this._appendClass = "ui-datepicker-append",
+ this._triggerClass = "ui-datepicker-trigger",
+ this._dialogClass = "ui-datepicker-dialog",
+ this._disableClass = "ui-datepicker-disabled",
+ this._unselectableClass = "ui-datepicker-unselectable",
+ this._currentClass = "ui-datepicker-current-day",
+ this._dayOverClass = "ui-datepicker-days-cell-over",
+ this.regional = [],
+ this.regional[""] = {
+ closeText: "Done",
+ prevText: "Prev",
+ nextText: "Next",
+ currentText: "Today",
+ monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
+ monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
+ dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
+ dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
+ dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
+ weekHeader: "Wk",
+ dateFormat: "mm/dd/yy",
+ firstDay: 0,
+ isRTL: !1,
+ showMonthAfterYear: !1,
+ yearSuffix: ""
+ },
+ this._defaults = {
+ showOn: "focus",
+ showAnim: "fadeIn",
+ showOptions: {},
+ defaultDate: null,
+ appendText: "",
+ buttonText: "...",
+ buttonImage: "",
+ buttonImageOnly: !1,
+ hideIfNoPrevNext: !1,
+ navigationAsDateFormat: !1,
+ gotoCurrent: !1,
+ changeMonth: !1,
+ changeYear: !1,
+ yearRange: "c-10:c+10",
+ showOtherMonths: !1,
+ selectOtherMonths: !1,
+ showWeek: !1,
+ calculateWeek: this.iso8601Week,
+ shortYearCutoff: "+10",
+ minDate: null,
+ maxDate: null,
+ duration: "fast",
+ beforeShowDay: null,
+ beforeShow: null,
+ onSelect: null,
+ onChangeMonthYear: null,
+ onClose: null,
+ numberOfMonths: 1,
+ showCurrentAtPos: 0,
+ stepMonths: 1,
+ stepBigMonths: 12,
+ altField: "",
+ altFormat: "",
+ constrainInput: !0,
+ showButtonPanel: !1,
+ autoSize: !1,
+ disabled: !1
+ },
+ $.extend(this._defaults, this.regional[""]),
+ this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))
+ }
+ $.extend($.ui, {
+ datepicker: {
+ version: "1.8.18"
+ }
+ });
+ var PROP_NAME = "datepicker",
+ dpuuid = (new Date).getTime(),
+ instActive;
+ $.extend(Datepicker.prototype, {
+ markerClassName: "hasDatepicker",
+ maxRows: 4,
+ log: function() {
+ this.debug && console.log.apply("", arguments)
+ },
+ _widgetDatepicker: function() {
+ return this.dpDiv
+ },
+ setDefaults: function(a) {
+ extendRemove(this._defaults, a || {});
+ return this
+ },
+ _attachDatepicker: function(target, settings) {
+ var inlineSettings = null;
+ for (var attrName in this._defaults) {
+ var attrValue = target.getAttribute("date:" + attrName);
+ if (attrValue) {
+ inlineSettings = inlineSettings || {};
+ try {
+ inlineSettings[attrName] = eval(attrValue)
+ } catch(err) {
+ inlineSettings[attrName] = attrValue
+ }
+ }
+ }
+ var nodeName = target.nodeName.toLowerCase(),
+ inline = nodeName == "div" || nodeName == "span";
+ target.id || (this.uuid += 1, target.id = "dp" + this.uuid);
+ var inst = this._newInst($(target), inline);
+ inst.settings = $.extend({},
+ settings || {},
+ inlineSettings || {}),
+ nodeName == "input" ? this._connectDatepicker(target, inst) : inline && this._inlineDatepicker(target, inst)
+ },
+ _newInst: function(a, b) {
+ var c = a[0].id.replace(/([^A-Za-z0-9_-])/g, "\\\\$1");
+ return {
+ id: c,
+ input: a,
+ selectedDay: 0,
+ selectedMonth: 0,
+ selectedYear: 0,
+ drawMonth: 0,
+ drawYear: 0,
+ inline: b,
+ dpDiv: b ? bindHover($('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')) : this.dpDiv
+ }
+ },
+ _connectDatepicker: function(a, b) {
+ var c = $(a);
+ b.append = $([]),
+ b.trigger = $([]);
+ c.hasClass(this.markerClassName) || (this._attachments(c, b), c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",
+ function(a, c, d) {
+ b.settings[c] = d
+ }).bind("getData.datepicker",
+ function(a, c) {
+ return this._get(b, c)
+ }), this._autoSize(b), $.data(a, PROP_NAME, b), b.settings.disabled && this._disableDatepicker(a))
+ },
+ _attachments: function(a, b) {
+ var c = this._get(b, "appendText"),
+ d = this._get(b, "isRTL");
+ b.append && b.append.remove(),
+ c && (b.append = $('<span class="' + this._appendClass + '">' + c + "</span>"), a[d ? "before": "after"](b.append)),
+ a.unbind("focus", this._showDatepicker),
+ b.trigger && b.trigger.remove();
+ var e = this._get(b, "showOn"); (e == "focus" || e == "both") && a.focus(this._showDatepicker);
+ if (e == "button" || e == "both") {
+ var f = this._get(b, "buttonText"),
+ g = this._get(b, "buttonImage");
+ b.trigger = $(this._get(b, "buttonImageOnly") ? $("<img/>").addClass(this._triggerClass).attr({
+ src: g,
+ alt: f,
+ title: f
+ }) : $('<button type="button"></button>').addClass(this._triggerClass).html(g == "" ? f: $("<img/>").attr({
+ src: g,
+ alt: f,
+ title: f
+ }))),
+ a[d ? "before": "after"](b.trigger),
+ b.trigger.click(function() {
+ $.datepicker._datepickerShowing && $.datepicker._lastInput == a[0] ? $.datepicker._hideDatepicker() : $.datepicker._datepickerShowing && $.datepicker._lastInput != a[0] ? ($.datepicker._hideDatepicker(), $.datepicker._showDatepicker(a[0])) : $.datepicker._showDatepicker(a[0]);
+ return ! 1
+ })
+ }
+ },
+ _autoSize: function(a) {
+ if (this._get(a, "autoSize") && !a.inline) {
+ var b = new Date(2009, 11, 20),
+ c = this._get(a, "dateFormat");
+ if (c.match(/[DM]/)) {
+ var d = function(a) {
+ var b = 0,
+ c = 0;
+ for (var d = 0; d < a.length; d++) a[d].length > b && (b = a[d].length, c = d);
+ return c
+ };
+ b.setMonth(d(this._get(a, c.match(/MM/) ? "monthNames": "monthNamesShort"))),
+ b.setDate(d(this._get(a, c.match(/DD/) ? "dayNames": "dayNamesShort")) + 20 - b.getDay())
+ }
+ a.input.attr("size", this._formatDate(a, b).length)
+ }
+ },
+ _inlineDatepicker: function(a, b) {
+ var c = $(a);
+ c.hasClass(this.markerClassName) || (c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",
+ function(a, c, d) {
+ b.settings[c] = d
+ }).bind("getData.datepicker",
+ function(a, c) {
+ return this._get(b, c)
+ }), $.data(a, PROP_NAME, b), this._setDate(b, this._getDefaultDate(b), !0), this._updateDatepicker(b), this._updateAlternate(b), b.settings.disabled && this._disableDatepicker(a), b.dpDiv.css("display", "block"))
+ },
+ _dialogDatepicker: function(a, b, c, d, e) {
+ var f = this._dialogInst;
+ if (!f) {
+ this.uuid += 1;
+ var g = "dp" + this.uuid;
+ this._dialogInput = $('<input type="text" id="' + g + '" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),
+ this._dialogInput.keydown(this._doKeyDown),
+ $("body").append(this._dialogInput),
+ f = this._dialogInst = this._newInst(this._dialogInput, !1),
+ f.settings = {},
+ $.data(this._dialogInput[0], PROP_NAME, f)
+ }
+ extendRemove(f.settings, d || {}),
+ b = b && b.constructor == Date ? this._formatDate(f, b) : b,
+ this._dialogInput.val(b),
+ this._pos = e ? e.length ? e: [e.pageX, e.pageY] : null;
+ if (!this._pos) {
+ var h = document.documentElement.clientWidth,
+ i = document.documentElement.clientHeight,
+ j = document.documentElement.scrollLeft || document.body.scrollLeft,
+ k = document.documentElement.scrollTop || document.body.scrollTop;
+ this._pos = [h / 2 - 100 + j, i / 2 - 150 + k]
+ }
+ this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px"),
+ f.settings.onSelect = c,
+ this._inDialog = !0,
+ this.dpDiv.addClass(this._dialogClass),
+ this._showDatepicker(this._dialogInput[0]),
+ $.blockUI && $.blockUI(this.dpDiv),
+ $.data(this._dialogInput[0], PROP_NAME, f);
+ return this
+ },
+ _destroyDatepicker: function(a) {
+ var b = $(a),
+ c = $.data(a, PROP_NAME);
+ if ( !! b.hasClass(this.markerClassName)) {
+ var d = a.nodeName.toLowerCase();
+ $.removeData(a, PROP_NAME),
+ d == "input" ? (c.append.remove(), c.trigger.remove(), b.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp)) : (d == "div" || d == "span") && b.removeClass(this.markerClassName).empty()
+ }
+ },
+ _enableDatepicker: function(a) {
+ var b = $(a),
+ c = $.data(a, PROP_NAME);
+ if ( !! b.hasClass(this.markerClassName)) {
+ var d = a.nodeName.toLowerCase();
+ if (d == "input") a.disabled = !1,
+ c.trigger.filter("button").each(function() {
+ this.disabled = !1
+ }).end().filter("img").css({
+ opacity: "1.0",
+ cursor: ""
+ });
+ else if (d == "div" || d == "span") {
+ var e = b.children("." + this._inlineClass);
+ e.children().removeClass("ui-state-disabled"),
+ e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(b) {
+ return b == a ? null: b
+ })
+ }
+ },
+ _disableDatepicker: function(a) {
+ var b = $(a),
+ c = $.data(a, PROP_NAME);
+ if ( !! b.hasClass(this.markerClassName)) {
+ var d = a.nodeName.toLowerCase();
+ if (d == "input") a.disabled = !0,
+ c.trigger.filter("button").each(function() {
+ this.disabled = !0
+ }).end().filter("img").css({
+ opacity: "0.5",
+ cursor: "default"
+ });
+ else if (d == "div" || d == "span") {
+ var e = b.children("." + this._inlineClass);
+ e.children().addClass("ui-state-disabled"),
+ e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled", "disabled")
+ }
+ this._disabledInputs = $.map(this._disabledInputs,
+ function(b) {
+ return b == a ? null: b
+ }),
+ this._disabledInputs[this._disabledInputs.length] = a
+ }
+ },
+ _isDisabledDatepicker: function(a) {
+ if (!a) return ! 1;
+ for (var b = 0; b < this._disabledInputs.length; b++) if (this._disabledInputs[b] == a) return ! 0;
+ return ! 1
+ },
+ _getInst: function(a) {
+ try {
+ return $.data(a, PROP_NAME)
+ } catch(b) {
+ throw "Missing instance data for this datepicker"
+ }
+ },
+ _optionDatepicker: function(a, b, c) {
+ var d = this._getInst(a);
+ if (arguments.length == 2 && typeof b == "string") return b == "defaults" ? $.extend({},
+ $.datepicker._defaults) : d ? b == "all" ? $.extend({},
+ d.settings) : this._get(d, b) : null;
+ var e = b || {};
+ typeof b == "string" && (e = {},
+ e[b] = c);
+ if (d) {
+ this._curInst == d && this._hideDatepicker();
+ var f = this._getDateDatepicker(a, !0),
+ g = this._getMinMaxDate(d, "min"),
+ h = this._getMinMaxDate(d, "max");
+ extendRemove(d.settings, e),
+ g !== null && e.dateFormat !== undefined && e.minDate === undefined && (d.settings.minDate = this._formatDate(d, g)),
+ h !== null && e.dateFormat !== undefined && e.maxDate === undefined && (d.settings.maxDate = this._formatDate(d, h)),
+ this._attachments($(a), d),
+ this._autoSize(d),
+ this._setDate(d, f),
+ this._updateAlternate(d),
+ this._updateDatepicker(d)
+ }
+ },
+ _changeDatepicker: function(a, b, c) {
+ this._optionDatepicker(a, b, c)
+ },
+ _refreshDatepicker: function(a) {
+ var b = this._getInst(a);
+ b && this._updateDatepicker(b)
+ },
+ _setDateDatepicker: function(a, b) {
+ var c = this._getInst(a);
+ c && (this._setDate(c, b), this._updateDatepicker(c), this._updateAlternate(c))
+ },
+ _getDateDatepicker: function(a, b) {
+ var c = this._getInst(a);
+ c && !c.inline && this._setDateFromField(c, b);
+ return c ? this._getDate(c) : null
+ },
+ _doKeyDown: function(a) {
+ var b = $.datepicker._getInst(a.target),
+ c = !0,
+ d = b.dpDiv.is(".ui-datepicker-rtl");
+ b._keyEvent = !0;
+ if ($.datepicker._datepickerShowing) switch (a.keyCode) {
+ case 9:
+ $.datepicker._hideDatepicker(),
+ c = !1;
+ break;
+ case 13:
+ var e = $("td." + $.datepicker._dayOverClass + ":not(." + $.datepicker._currentClass + ")", b.dpDiv);
+ e[0] && $.datepicker._selectDay(a.target, b.selectedMonth, b.selectedYear, e[0]);
+ var f = $.datepicker._get(b, "onSelect");
+ if (f) {
+ var g = $.datepicker._formatDate(b);
+ f.apply(b.input ? b.input[0] : null, [g, b])
+ } else $.datepicker._hideDatepicker();
+ return ! 1;
+ case 27:
+ $.datepicker._hideDatepicker();
+ break;
+ case 33:
+ $.datepicker._adjustDate(a.target, a.ctrlKey ? -$.datepicker._get(b, "stepBigMonths") : -$.datepicker._get(b, "stepMonths"), "M");
+ break;
+ case 34:
+ $.datepicker._adjustDate(a.target, a.ctrlKey ? +$.datepicker._get(b, "stepBigMonths") : +$.datepicker._get(b, "stepMonths"), "M");
+ break;
+ case 35:
+ (a.ctrlKey || a.metaKey) && $.datepicker._clearDate(a.target),
+ c = a.ctrlKey || a.metaKey;
+ break;
+ case 36:
+ (a.ctrlKey || a.metaKey) && $.datepicker._gotoToday(a.target),
+ c = a.ctrlKey || a.metaKey;
+ break;
+ case 37:
+ (a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, d ? 1 : -1, "D"),
+ c = a.ctrlKey || a.metaKey,
+ a.originalEvent.altKey && $.datepicker._adjustDate(a.target, a.ctrlKey ? -$.datepicker._get(b, "stepBigMonths") : -$.datepicker._get(b, "stepMonths"), "M");
+ break;
+ case 38:
+ (a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, -7, "D"),
+ c = a.ctrlKey || a.metaKey;
+ break;
+ case 39:
+ (a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, d ? -1 : 1, "D"),
+ c = a.ctrlKey || a.metaKey,
+ a.originalEvent.altKey && $.datepicker._adjustDate(a.target, a.ctrlKey ? +$.datepicker._get(b, "stepBigMonths") : +$.datepicker._get(b, "stepMonths"), "M");
+ break;
+ case 40:
+ (a.ctrlKey || a.metaKey) && $.datepicker._adjustDate(a.target, 7, "D"),
+ c = a.ctrlKey || a.metaKey;
+ break;
+ default:
+ c = !1
+ } else a.keyCode == 36 && a.ctrlKey ? $.datepicker._showDatepicker(this) : c = !1;
+ c && (a.preventDefault(), a.stopPropagation())
+ },
+ _doKeyPress: function(a) {
+ var b = $.datepicker._getInst(a.target);
+ if ($.datepicker._get(b, "constrainInput")) {
+ var c = $.datepicker._possibleChars($.datepicker._get(b, "dateFormat")),
+ d = String.fromCharCode(a.charCode == undefined ? a.keyCode: a.charCode);
+ return a.ctrlKey || a.metaKey || d < " " || !c || c.indexOf(d) > -1
+ }
+ },
+ _doKeyUp: function(a) {
+ var b = $.datepicker._getInst(a.target);
+ if (b.input.val() != b.lastVal) try {
+ var c = $.datepicker.parseDate($.datepicker._get(b, "dateFormat"), b.input ? b.input.val() : null, $.datepicker._getFormatConfig(b));
+ c && ($.datepicker._setDateFromField(b), $.datepicker._updateAlternate(b), $.datepicker._updateDatepicker(b))
+ } catch(a) {
+ $.datepicker.log(a)
+ }
+ return ! 0
+ },
+ _showDatepicker: function(a) {
+ a = a.target || a,
+ a.nodeName.toLowerCase() != "input" && (a = $("input", a.parentNode)[0]);
+ if (!$.datepicker._isDisabledDatepicker(a) && $.datepicker._lastInput != a) {
+ var b = $.datepicker._getInst(a);
+ $.datepicker._curInst && $.datepicker._curInst != b && ($.datepicker._curInst.dpDiv.stop(!0, !0), b && $.datepicker._datepickerShowing && $.datepicker._hideDatepicker($.datepicker._curInst.input[0]));
+ var c = $.datepicker._get(b, "beforeShow"),
+ d = c ? c.apply(a, [a, b]) : {};
+ if (d === !1) return;
+ extendRemove(b.settings, d),
+ b.lastVal = null,
+ $.datepicker._lastInput = a,
+ $.datepicker._setDateFromField(b),
+ $.datepicker._inDialog && (a.value = ""),
+ $.datepicker._pos || ($.datepicker._pos = $.datepicker._findPos(a), $.datepicker._pos[1] += a.offsetHeight);
+ var e = !1;
+ $(a).parents().each(function() {
+ e |= $(this).css("position") == "fixed";
+ return ! e
+ }),
+ e && $.browser.opera && ($.datepicker._pos[0] -= document.documentElement.scrollLeft, $.datepicker._pos[1] -= document.documentElement.scrollTop);
+ var f = {
+ left: $.datepicker._pos[0],
+ top: $.datepicker._pos[1]
+ };
+ $.datepicker._pos = null,
+ b.dpDiv.empty(),
+ b.dpDiv.css({
+ position: "absolute",
+ display: "block",
+ top: "-1000px"
+ }),
+ $.datepicker._updateDatepicker(b),
+ f = $.datepicker._checkOffset(b, f, e),
+ b.dpDiv.css({
+ position: $.datepicker._inDialog && $.blockUI ? "static": e ? "fixed": "absolute",
+ display: "none",
+ left: f.left + "px",
+ top: f.top + "px"
+ });
+ if (!b.inline) {
+ var g = $.datepicker._get(b, "showAnim"),
+ h = $.datepicker._get(b, "duration"),
+ i = function() {
+ var a = b.dpDiv.find("iframe.ui-datepicker-cover");
+ if ( !! a.length) {
+ var c = $.datepicker._getBorders(b.dpDiv);
+ a.css({
+ left: -c[0],
+ top: -c[1],
+ width: b.dpDiv.outerWidth(),
+ height: b.dpDiv.outerHeight()
+ })
+ }
+ };
+ b.dpDiv.zIndex($(a).zIndex() + 1),
+ $.datepicker._datepickerShowing = !0,
+ $.effects && $.effects[g] ? b.dpDiv.show(g, $.datepicker._get(b, "showOptions"), h, i) : b.dpDiv[g || "show"](g ? h: null, i),
+ (!g || !h) && i(),
+ b.input.is(":visible") && !b.input.is(":disabled") && b.input.focus(),
+ $.datepicker._curInst = b
+ }
+ }
+ },
+ _updateDatepicker: function(a) {
+ var b = this;
+ b.maxRows = 4;
+ var c = $.datepicker._getBorders(a.dpDiv);
+ instActive = a,
+ a.dpDiv.empty().append(this._generateHTML(a));
+ var d = a.dpDiv.find("iframe.ui-datepicker-cover"); ! d.length || d.css({
+ left: -c[0],
+ top: -c[1],
+ width: a.dpDiv.outerWidth(),
+ height: a.dpDiv.outerHeight()
+ }),
+ a.dpDiv.find("." + this._dayOverClass + " a").mouseover();
+ var e = this._getNumberOfMonths(a),
+ f = e[1],
+ g = 17;
+ a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),
+ f > 1 && a.dpDiv.addClass("ui-datepicker-multi-" + f).css("width", g * f + "em"),
+ a.dpDiv[(e[0] != 1 || e[1] != 1 ? "add": "remove") + "Class"]("ui-datepicker-multi"),
+ a.dpDiv[(this._get(a, "isRTL") ? "add": "remove") + "Class"]("ui-datepicker-rtl"),
+ a == $.datepicker._curInst && $.datepicker._datepickerShowing && a.input && a.input.is(":visible") && !a.input.is(":disabled") && a.input[0] != document.activeElement && a.input.focus();
+ if (a.yearshtml) {
+ var h = a.yearshtml;
+ setTimeout(function() {
+ h === a.yearshtml && a.yearshtml && a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml),
+ h = a.yearshtml = null
+ },
+ 0)
+ }
+ },
+ _getBorders: function(a) {
+ var b = function(a) {
+ return {
+ thin: 1,
+ medium: 2,
+ thick: 3
+ } [a] || a
+ };
+ return [parseFloat(b(a.css("border-left-width"))), parseFloat(b(a.css("border-top-width")))]
+ },
+ _checkOffset: function(a, b, c) {
+ var d = a.dpDiv.outerWidth(),
+ e = a.dpDiv.outerHeight(),
+ f = a.input ? a.input.outerWidth() : 0,
+ g = a.input ? a.input.outerHeight() : 0,
+ h = document.documentElement.clientWidth + $(document).scrollLeft(),
+ i = document.documentElement.clientHeight + $(document).scrollTop();
+ b.left -= this._get(a, "isRTL") ? d - f: 0,
+ b.left -= c && b.left == a.input.offset().left ? $(document).scrollLeft() : 0,
+ b.top -= c && b.top == a.input.offset().top + g ? $(document).scrollTop() : 0,
+ b.left -= Math.min(b.left, b.left + d > h && h > d ? Math.abs(b.left + d - h) : 0),
+ b.top -= Math.min(b.top, b.top + e > i && i > e ? Math.abs(e + g) : 0);
+ return b
+ },
+ _findPos: function(a) {
+ var b = this._getInst(a),
+ c = this._get(b, "isRTL");
+ while (a && (a.type == "hidden" || a.nodeType != 1 || $.expr.filters.hidden(a))) a = a[c ? "previousSibling": "nextSibling"];
+ var d = $(a).offset();
+ return [d.left, d.top]
+ },
+ _hideDatepicker: function(a) {
+ var b = this._curInst;
+ if (! (!b || a && b != $.data(a, PROP_NAME)) && this._datepickerShowing) {
+ var c = this._get(b, "showAnim"),
+ d = this._get(b, "duration"),
+ e = this,
+ f = function() {
+ $.datepicker._tidyDialog(b),
+ e._curInst = null
+ };
+ $.effects && $.effects[c] ? b.dpDiv.hide(c, $.datepicker._get(b, "showOptions"), d, f) : b.dpDiv[c == "slideDown" ? "slideUp": c == "fadeIn" ? "fadeOut": "hide"](c ? d: null, f),
+ c || f(),
+ this._datepickerShowing = !1;
+ var g = this._get(b, "onClose");
+ g && g.apply(b.input ? b.input[0] : null, [b.input ? b.input.val() : "", b]),
+ this._lastInput = null,
+ this._inDialog && (this._dialogInput.css({
+ position: "absolute",
+ left: "0",
+ top: "-100px"
+ }), $.blockUI && ($.unblockUI(), $("body").append(this.dpDiv))),
+ this._inDialog = !1
+ }
+ },
+ _tidyDialog: function(a) {
+ a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
+ },
+ _checkExternalClick: function(a) {
+ if ( !! $.datepicker._curInst) {
+ var b = $(a.target),
+ c = $.datepicker._getInst(b[0]); (b[0].id != $.datepicker._mainDivId && b.parents("#" + $.datepicker._mainDivId).length == 0 && !b.hasClass($.datepicker.markerClassName) && !b.closest("." + $.datepicker._triggerClass).length && $.datepicker._datepickerShowing && (!$.datepicker._inDialog || !$.blockUI) || b.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != c) && $.datepicker._hideDatepicker()
+ }
+ },
+ _adjustDate: function(a, b, c) {
+ var d = $(a),
+ e = this._getInst(d[0]);
+ this._isDisabledDatepicker(d[0]) || (this._adjustInstDate(e, b + (c == "M" ? this._get(e, "showCurrentAtPos") : 0), c), this._updateDatepicker(e))
+ },
+ _gotoToday: function(a) {
+ var b = $(a),
+ c = this._getInst(b[0]);
+ if (this._get(c, "gotoCurrent") && c.currentDay) c.selectedDay = c.currentDay,
+ c.drawMonth = c.selectedMonth = c.currentMonth,
+ c.drawYear = c.selectedYear = c.currentYear;
+ else {
+ var d = new Date;
+ c.selectedDay = d.getDate(),
+ c.drawMonth = c.selectedMonth = d.getMonth(),
+ c.drawYear = c.selectedYear = d.getFullYear()
+ }
+ this._notifyChange(c),
+ this._adjustDate(b)
+ },
+ _selectMonthYear: function(a, b, c) {
+ var d = $(a),
+ e = this._getInst(d[0]);
+ e["selected" + (c == "M" ? "Month": "Year")] = e["draw" + (c == "M" ? "Month": "Year")] = parseInt(b.options[b.selectedIndex].value, 10),
+ this._notifyChange(e),
+ this._adjustDate(d)
+ },
+ _selectDay: function(a, b, c, d) {
+ var e = $(a);
+ if (!$(d).hasClass(this._unselectableClass) && !this._isDisabledDatepicker(e[0])) {
+ var f = this._getInst(e[0]);
+ f.selectedDay = f.currentDay = $("a", d).html(),
+ f.selectedMonth = f.currentMonth = b,
+ f.selectedYear = f.currentYear = c,
+ this._selectDate(a, this._formatDate(f, f.currentDay, f.currentMonth, f.currentYear))
+ }
+ },
+ _clearDate: function(a) {
+ var b = $(a),
+ c = this._getInst(b[0]);
+ this._selectDate(b, "")
+ },
+ _selectDate: function(a, b) {
+ var c = $(a),
+ d = this._getInst(c[0]);
+ b = b != null ? b: this._formatDate(d),
+ d.input && d.input.val(b),
+ this._updateAlternate(d);
+ var e = this._get(d, "onSelect");
+ e ? e.apply(d.input ? d.input[0] : null, [b, d]) : d.input && d.input.trigger("change"),
+ d.inline ? this._updateDatepicker(d) : (this._hideDatepicker(), this._lastInput = d.input[0], typeof d.input[0] != "object" && d.input.focus(), this._lastInput = null)
+ },
+ _updateAlternate: function(a) {
+ var b = this._get(a, "altField");
+ if (b) {
+ var c = this._get(a, "altFormat") || this._get(a, "dateFormat"),
+ d = this._getDate(a),
+ e = this.formatDate(c, d, this._getFormatConfig(a));
+ $(b).each(function() {
+ $(this).val(e)
+ })
+ }
+ },
+ noWeekends: function(a) {
+ var b = a.getDay();
+ return [b > 0 && b < 6, ""]
+ },
+ iso8601Week: function(a) {
+ var b = new Date(a.getTime());
+ b.setDate(b.getDate() + 4 - (b.getDay() || 7));
+ var c = b.getTime();
+ b.setMonth(0),
+ b.setDate(1);
+ return Math.floor(Math.round((c - b) / 864e5) / 7) + 1
+ },
+ parseDate: function(a, b, c) {
+ if (a == null || b == null) throw "Invalid arguments";
+ b = typeof b == "object" ? b.toString() : b + "";
+ if (b == "") return null;
+ var d = (c ? c.shortYearCutoff: null) || this._defaults.shortYearCutoff;
+ d = typeof d != "string" ? d: (new Date).getFullYear() % 100 + parseInt(d, 10);
+ var e = (c ? c.dayNamesShort: null) || this._defaults.dayNamesShort,
+ f = (c ? c.dayNames: null) || this._defaults.dayNames,
+ g = (c ? c.monthNamesShort: null) || this._defaults.monthNamesShort,
+ h = (c ? c.monthNames: null) || this._defaults.monthNames,
+ i = -1,
+ j = -1,
+ k = -1,
+ l = -1,
+ m = !1,
+ n = function(b) {
+ var c = s + 1 < a.length && a.charAt(s + 1) == b;
+ c && s++;
+ return c
+ },
+ o = function(a) {
+ var c = n(a),
+ d = a == "@" ? 14 : a == "!" ? 20 : a == "y" && c ? 4 : a == "o" ? 3 : 2,
+ e = new RegExp("^\\d{1," + d + "}"),
+ f = b.substring(r).match(e);
+ if (!f) throw "Missing number at position " + r;
+ r += f[0].length;
+ return parseInt(f[0], 10)
+ },
+ p = function(a, c, d) {
+ var e = $.map(n(a) ? d: c,
+ function(a, b) {
+ return [[b, a]]
+ }).sort(function(a, b) {
+ return - (a[1].length - b[1].length)
+ }),
+ f = -1;
+ $.each(e,
+ function(a, c) {
+ var d = c[1];
+ if (b.substr(r, d.length).toLowerCase() == d.toLowerCase()) {
+ f = c[0],
+ r += d.length;
+ return ! 1
+ }
+ });
+ if (f != -1) return f + 1;
+ throw "Unknown name at position " + r
+ },
+ q = function() {
+ if (b.charAt(r) != a.charAt(s)) throw "Unexpected literal at position " + r;
+ r++
+ },
+ r = 0;
+ for (var s = 0; s < a.length; s++) if (m) a.charAt(s) == "'" && !n("'") ? m = !1 : q();
+ else switch (a.charAt(s)) {
+ case "d":
+ k = o("d");
+ break;
+ case "D":
+ p("D", e, f);
+ break;
+ case "o":
+ l = o("o");
+ break;
+ case "m":
+ j = o("m");
+ break;
+ case "M":
+ j = p("M", g, h);
+ break;
+ case "y":
+ i = o("y");
+ break;
+ case "@":
+ var t = new Date(o("@"));
+ i = t.getFullYear(),
+ j = t.getMonth() + 1,
+ k = t.getDate();
+ break;
+ case "!":
+ var t = new Date((o("!") - this._ticksTo1970) / 1e4);
+ i = t.getFullYear(),
+ j = t.getMonth() + 1,
+ k = t.getDate();
+ break;
+ case "'":
+ n("'") ? q() : m = !0;
+ break;
+ default:
+ q()
+ }
+ if (r < b.length) throw "Extra/unparsed characters found in date: " + b.substring(r);
+ i == -1 ? i = (new Date).getFullYear() : i < 100 && (i += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (i <= d ? 0 : -100));
+ if (l > -1) {
+ j = 1,
+ k = l;
+ for (;;) {
+ var u = this._getDaysInMonth(i, j - 1);
+ if (k <= u) break;
+ j++,
+ k -= u
+ }
+ }
+ var t = this._daylightSavingAdjust(new Date(i, j - 1, k));
+ if (t.getFullYear() != i || t.getMonth() + 1 != j || t.getDate() != k) throw "Invalid date";
+ return t
+ },
+ ATOM: "yy-mm-dd",
+ COOKIE: "D, dd M yy",
+ ISO_8601: "yy-mm-dd",
+ RFC_822: "D, d M y",
+ RFC_850: "DD, dd-M-y",
+ RFC_1036: "D, d M y",
+ RFC_1123: "D, d M yy",
+ RFC_2822: "D, d M yy",
+ RSS: "D, d M y",
+ TICKS: "!",
+ TIMESTAMP: "@",
+ W3C: "yy-mm-dd",
+ _ticksTo1970: (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) * 24 * 60 * 60 * 1e7,
+ formatDate: function(a, b, c) {
+ if (!b) return "";
+ var d = (c ? c.dayNamesShort: null) || this._defaults.dayNamesShort,
+ e = (c ? c.dayNames: null) || this._defaults.dayNames,
+ f = (c ? c.monthNamesShort: null) || this._defaults.monthNamesShort,
+ g = (c ? c.monthNames: null) || this._defaults.monthNames,
+ h = function(b) {
+ var c = m + 1 < a.length && a.charAt(m + 1) == b;
+ c && m++;
+ return c
+ },
+ i = function(a, b, c) {
+ var d = "" + b;
+ if (h(a)) while (d.length < c) d = "0" + d;
+ return d
+ },
+ j = function(a, b, c, d) {
+ return h(a) ? d[b] : c[b]
+ },
+ k = "",
+ l = !1;
+ if (b) for (var m = 0; m < a.length; m++) if (l) a.charAt(m) == "'" && !h("'") ? l = !1 : k += a.charAt(m);
+ else switch (a.charAt(m)) {
+ case "d":
+ k += i("d", b.getDate(), 2);
+ break;
+ case "D":
+ k += j("D", b.getDay(), d, e);
+ break;
+ case "o":
+ k += i("o", Math.round(((new Date(b.getFullYear(), b.getMonth(), b.getDate())).getTime() - (new Date(b.getFullYear(), 0, 0)).getTime()) / 864e5), 3);
+ break;
+ case "m":
+ k += i("m", b.getMonth() + 1, 2);
+ break;
+ case "M":
+ k += j("M", b.getMonth(), f, g);
+ break;
+ case "y":
+ k += h("y") ? b.getFullYear() : (b.getYear() % 100 < 10 ? "0": "") + b.getYear() % 100;
+ break;
+ case "@":
+ k += b.getTime();
+ break;
+ case "!":
+ k += b.getTime() * 1e4 + this._ticksTo1970;
+ break;
+ case "'":
+ h("'") ? k += "'": l = !0;
+ break;
+ default:
+ k += a.charAt(m)
+ }
+ return k
+ },
+ _possibleChars: function(a) {
+ var b = "",
+ c = !1,
+ d = function(b) {
+ var c = e + 1 < a.length && a.charAt(e + 1) == b;
+ c && e++;
+ return c
+ };
+ for (var e = 0; e < a.length; e++) if (c) a.charAt(e) == "'" && !d("'") ? c = !1 : b += a.charAt(e);
+ else switch (a.charAt(e)) {
+ case "d":
+ case "m":
+ case "y":
+ case "@":
+ b += "0123456789";
+ break;
+ case "D":
+ case "M":
+ return null;
+ case "'":
+ d("'") ? b += "'": c = !0;
+ break;
+ default:
+ b += a.charAt(e)
+ }
+ return b
+ },
+ _get: function(a, b) {
+ return a.settings[b] !== undefined ? a.settings[b] : this._defaults[b]
+ },
+ _setDateFromField: function(a, b) {
+ if (a.input.val() != a.lastVal) {
+ var c = this._get(a, "dateFormat"),
+ d = a.lastVal = a.input ? a.input.val() : null,
+ e,
+ f;
+ e = f = this._getDefaultDate(a);
+ var g = this._getFormatConfig(a);
+ try {
+ e = this.parseDate(c, d, g) || f
+ } catch(h) {
+ this.log(h),
+ d = b ? "": d
+ }
+ a.selectedDay = e.getDate(),
+ a.drawMonth = a.selectedMonth = e.getMonth(),
+ a.drawYear = a.selectedYear = e.getFullYear(),
+ a.currentDay = d ? e.getDate() : 0,
+ a.currentMonth = d ? e.getMonth() : 0,
+ a.currentYear = d ? e.getFullYear() : 0,
+ this._adjustInstDate(a)
+ }
+ },
+ _getDefaultDate: function(a) {
+ return this._restrictMinMax(a, this._determineDate(a, this._get(a, "defaultDate"), new Date))
+ },
+ _determineDate: function(a, b, c) {
+ var d = function(a) {
+ var b = new Date;
+ b.setDate(b.getDate() + a);
+ return b
+ },
+ e = function(b) {
+ try {
+ return $.datepicker.parseDate($.datepicker._get(a, "dateFormat"), b, $.datepicker._getFormatConfig(a))
+ } catch(c) {}
+ var d = (b.toLowerCase().match(/^c/) ? $.datepicker._getDate(a) : null) || new Date,
+ e = d.getFullYear(),
+ f = d.getMonth(),
+ g = d.getDate(),
+ h = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
+ i = h.exec(b);
+ while (i) {
+ switch (i[2] || "d") {
+ case "d":
+ case "D":
+ g += parseInt(i[1], 10);
+ break;
+ case "w":
+ case "W":
+ g += parseInt(i[1], 10) * 7;
+ break;
+ case "m":
+ case "M":
+ f += parseInt(i[1], 10),
+ g = Math.min(g, $.datepicker._getDaysInMonth(e, f));
+ break;
+ case "y":
+ case "Y":
+ e += parseInt(i[1], 10),
+ g = Math.min(g, $.datepicker._getDaysInMonth(e, f))
+ }
+ i = h.exec(b)
+ }
+ return new Date(e, f, g)
+ },
+ f = b == null || b === "" ? c: typeof b == "string" ? e(b) : typeof b == "number" ? isNaN(b) ? c: d(b) : new Date(b.getTime());
+ f = f && f.toString() == "Invalid Date" ? c: f,
+ f && (f.setHours(0), f.setMinutes(0), f.setSeconds(0), f.setMilliseconds(0));
+ return this._daylightSavingAdjust(f)
+ },
+ _daylightSavingAdjust: function(a) {
+ if (!a) return null;
+ a.setHours(a.getHours() > 12 ? a.getHours() + 2 : 0);
+ return a
+ },
+ _setDate: function(a, b, c) {
+ var d = !b,
+ e = a.selectedMonth,
+ f = a.selectedYear,
+ g = this._restrictMinMax(a, this._determineDate(a, b, new Date));
+ a.selectedDay = a.currentDay = g.getDate(),
+ a.drawMonth = a.selectedMonth = a.currentMonth = g.getMonth(),
+ a.drawYear = a.selectedYear = a.currentYear = g.getFullYear(),
+ (e != a.selectedMonth || f != a.selectedYear) && !c && this._notifyChange(a),
+ this._adjustInstDate(a),
+ a.input && a.input.val(d ? "": this._formatDate(a))
+ },
+ _getDate: function(a) {
+ var b = !a.currentYear || a.input && a.input.val() == "" ? null: this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay));
+ return b
+ },
+ _generateHTML: function(a) {
+ var b = new Date;
+ b = this._daylightSavingAdjust(new Date(b.getFullYear(), b.getMonth(), b.getDate()));
+ var c = this._get(a, "isRTL"),
+ d = this._get(a, "showButtonPanel"),
+ e = this._get(a, "hideIfNoPrevNext"),
+ f = this._get(a, "navigationAsDateFormat"),
+ g = this._getNumberOfMonths(a),
+ h = this._get(a, "showCurrentAtPos"),
+ i = this._get(a, "stepMonths"),
+ j = g[0] != 1 || g[1] != 1,
+ k = this._daylightSavingAdjust(a.currentDay ? new Date(a.currentYear, a.currentMonth, a.currentDay) : new Date(9999, 9, 9)),
+ l = this._getMinMaxDate(a, "min"),
+ m = this._getMinMaxDate(a, "max"),
+ n = a.drawMonth - h,
+ o = a.drawYear;
+ n < 0 && (n += 12, o--);
+ if (m) {
+ var p = this._daylightSavingAdjust(new Date(m.getFullYear(), m.getMonth() - g[0] * g[1] + 1, m.getDate()));
+ p = l && p < l ? l: p;
+ while (this._daylightSavingAdjust(new Date(o, n, 1)) > p) n--,
+ n < 0 && (n = 11, o--)
+ }
+ a.drawMonth = n,
+ a.drawYear = o;
+ var q = this._get(a, "prevText");
+ q = f ? this.formatDate(q, this._daylightSavingAdjust(new Date(o, n - i, 1)), this._getFormatConfig(a)) : q;
+ var r = this._canAdjustMonth(a, -1, o, n) ? '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_' + dpuuid + ".datepicker._adjustDate('#" + a.id + "', -" + i + ", 'M');\"" + ' title="' + q + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "e": "w") + '">' + q + "</span></a>": e ? "": '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + q + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "e": "w") + '">' + q + "</span></a>",
+ s = this._get(a, "nextText");
+ s = f ? this.formatDate(s, this._daylightSavingAdjust(new Date(o, n + i, 1)), this._getFormatConfig(a)) : s;
+ var t = this._canAdjustMonth(a, 1, o, n) ? '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_' + dpuuid + ".datepicker._adjustDate('#" + a.id + "', +" + i + ", 'M');\"" + ' title="' + s + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "w": "e") + '">' + s + "</span></a>": e ? "": '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + s + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "w": "e") + '">' + s + "</span></a>",
+ u = this._get(a, "currentText"),
+ v = this._get(a, "gotoCurrent") && a.currentDay ? k: b;
+ u = f ? this.formatDate(u, v, this._getFormatConfig(a)) : u;
+ var w = a.inline ? "": '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_' + dpuuid + '.datepicker._hideDatepicker();">' + this._get(a, "closeText") + "</button>",
+ x = d ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (c ? w: "") + (this._isInRange(a, v) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_' + dpuuid + ".datepicker._gotoToday('#" + a.id + "');\"" + ">" + u + "</button>": "") + (c ? "": w) + "</div>": "",
+ y = parseInt(this._get(a, "firstDay"), 10);
+ y = isNaN(y) ? 0 : y;
+ var z = this._get(a, "showWeek"),
+ A = this._get(a, "dayNames"),
+ B = this._get(a, "dayNamesShort"),
+ C = this._get(a, "dayNamesMin"),
+ D = this._get(a, "monthNames"),
+ E = this._get(a, "monthNamesShort"),
+ F = this._get(a, "beforeShowDay"),
+ G = this._get(a, "showOtherMonths"),
+ H = this._get(a, "selectOtherMonths"),
+ I = this._get(a, "calculateWeek") || this.iso8601Week,
+ J = this._getDefaultDate(a),
+ K = "";
+ for (var L = 0; L < g[0]; L++) {
+ var M = "";
+ this.maxRows = 4;
+ for (var N = 0; N < g[1]; N++) {
+ var O = this._daylightSavingAdjust(new Date(o, n, a.selectedDay)),
+ P = " ui-corner-all",
+ Q = "";
+ if (j) {
+ Q += '<div class="ui-datepicker-group';
+ if (g[1] > 1) switch (N) {
+ case 0:
+ Q += " ui-datepicker-group-first",
+ P = " ui-corner-" + (c ? "right": "left");
+ break;
+ case g[1] - 1 : Q += " ui-datepicker-group-last",
+ P = " ui-corner-" + (c ? "left": "right");
+ break;
+ default:
+ Q += " ui-datepicker-group-middle",
+ P = ""
+ }
+ Q += '">'
+ }
+ Q += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + P + '">' + (/all|left/.test(P) && L == 0 ? c ? t: r: "") + (/all|right/.test(P) && L == 0 ? c ? r: t: "") + this._generateMonthYearHeader(a, n, o, l, m, L > 0 || N > 0, D, E) + '</div><table class="ui-datepicker-calendar"><thead>' + "<tr>";
+ var R = z ? '<th class="ui-datepicker-week-col">' + this._get(a, "weekHeader") + "</th>": "";
+ for (var S = 0; S < 7; S++) {
+ var T = (S + y) % 7;
+ R += "<th" + ((S + y + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"': "") + ">" + '<span title="' + A[T] + '">' + C[T] + "</span></th>"
+ }
+ Q += R + "</tr></thead><tbody>";
+ var U = this._getDaysInMonth(o, n);
+ o == a.selectedYear && n == a.selectedMonth && (a.selectedDay = Math.min(a.selectedDay, U));
+ var V = (this._getFirstDayOfMonth(o, n) - y + 7) % 7,
+ W = Math.ceil((V + U) / 7),
+ X = j ? this.maxRows > W ? this.maxRows: W: W;
+ this.maxRows = X;
+ var Y = this._daylightSavingAdjust(new Date(o, n, 1 - V));
+ for (var Z = 0; Z < X; Z++) {
+ Q += "<tr>";
+ var _ = z ? '<td class="ui-datepicker-week-col">' + this._get(a, "calculateWeek")(Y) + "</td>": "";
+ for (var S = 0; S < 7; S++) {
+ var ba = F ? F.apply(a.input ? a.input[0] : null, [Y]) : [!0, ""],
+ bb = Y.getMonth() != n,
+ bc = bb && !H || !ba[0] || l && Y < l || m && Y > m;
+ _ += '<td class="' + ((S + y + 6) % 7 >= 5 ? " ui-datepicker-week-end": "") + (bb ? " ui-datepicker-other-month": "") + (Y.getTime() == O.getTime() && n == a.selectedMonth && a._keyEvent || J.getTime() == Y.getTime() && J.getTime() == O.getTime() ? " " + this._dayOverClass: "") + (bc ? " " + this._unselectableClass + " ui-state-disabled": "") + (bb && !G ? "": " " + ba[1] + (Y.getTime() == k.getTime() ? " " + this._currentClass: "") + (Y.getTime() == b.getTime() ? " ui-datepicker-today": "")) + '"' + ((!bb || G) && ba[2] ? ' title="' + ba[2] + '"': "") + (bc ? "": ' onclick="DP_jQuery_' + dpuuid + ".datepicker._selectDay('#" + a.id + "'," + Y.getMonth() + "," + Y.getFullYear() + ', this);return false;"') + ">" + (bb && !G ? " ": bc ? '<span class="ui-state-default">' + Y.getDate() + "</span>": '<a class="ui-state-default' + (Y.getTime() == b.getTime() ? " ui-state-highlight": "") + (Y.getTime() == k.getTime() ? " ui-state-active": "") + (bb ? " ui-priority-secondary": "") + '" href="#">' + Y.getDate() + "</a>") + "</td>",
+ Y.setDate(Y.getDate() + 1),
+ Y = this._daylightSavingAdjust(Y)
+ }
+ Q += _ + "</tr>"
+ }
+ n++,
+ n > 11 && (n = 0, o++),
+ Q += "</tbody></table>" + (j ? "</div>" + (g[0] > 0 && N == g[1] - 1 ? '<div class="ui-datepicker-row-break"></div>': "") : ""),
+ M += Q
+ }
+ K += M
+ }
+ K += x + ($.browser.msie && parseInt($.browser.version, 10) < 7 && !a.inline ? '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>': ""),
+ a._keyEvent = !1;
+ return K
+ },
+ _generateMonthYearHeader: function(a, b, c, d, e, f, g, h) {
+ var i = this._get(a, "changeMonth"),
+ j = this._get(a, "changeYear"),
+ k = this._get(a, "showMonthAfterYear"),
+ l = '<div class="ui-datepicker-title">',
+ m = "";
+ if (f || !i) m += '<span class="ui-datepicker-month">' + g[b] + "</span>";
+ else {
+ var n = d && d.getFullYear() == c,
+ o = e && e.getFullYear() == c;
+ m += '<select class="ui-datepicker-month" onchange="DP_jQuery_' + dpuuid + ".datepicker._selectMonthYear('#" + a.id + "', this, 'M');\" " + ">";
+ for (var p = 0; p < 12; p++)(!n || p >= d.getMonth()) && (!o || p <= e.getMonth()) && (m += '<option value="' + p + '"' + (p == b ? ' selected="selected"': "") + ">" + h[p] + "</option>");
+ m += "</select>"
+ }
+ k || (l += m + (f || !i || !j ? " ": ""));
+ if (!a.yearshtml) {
+ a.yearshtml = "";
+ if (f || !j) l += '<span class="ui-datepicker-year">' + c + "</span>";
+ else {
+ var q = this._get(a, "yearRange").split(":"),
+ r = (new Date).getFullYear(),
+ s = function(a) {
+ var b = a.match(/c[+-].*/) ? c + parseInt(a.substring(1), 10) : a.match(/[+-].*/) ? r + parseInt(a, 10) : parseInt(a, 10);
+ return isNaN(b) ? r: b
+ },
+ t = s(q[0]),
+ u = Math.max(t, s(q[1] || ""));
+ t = d ? Math.max(t, d.getFullYear()) : t,
+ u = e ? Math.min(u, e.getFullYear()) : u,
+ a.yearshtml += '<select class="ui-datepicker-year" onchange="DP_jQuery_' + dpuuid + ".datepicker._selectMonthYear('#" + a.id + "', this, 'Y');\" " + ">";
+ for (; t <= u; t++) a.yearshtml += '<option value="' + t + '"' + (t == c ? ' selected="selected"': "") + ">" + t + "</option>";
+ a.yearshtml += "</select>",
+ l += a.yearshtml,
+ a.yearshtml = null
+ }
+ }
+ l += this._get(a, "yearSuffix"),
+ k && (l += (f || !i || !j ? " ": "") + m),
+ l += "</div>";
+ return l
+ },
+ _adjustInstDate: function(a, b, c) {
+ var d = a.drawYear + (c == "Y" ? b: 0),
+ e = a.drawMonth + (c == "M" ? b: 0),
+ f = Math.min(a.selectedDay, this._getDaysInMonth(d, e)) + (c == "D" ? b: 0),
+ g = this._restrictMinMax(a, this._daylightSavingAdjust(new Date(d, e, f)));
+ a.selectedDay = g.getDate(),
+ a.drawMonth = a.selectedMonth = g.getMonth(),
+ a.drawYear = a.selectedYear = g.getFullYear(),
+ (c == "M" || c == "Y") && this._notifyChange(a)
+ },
+ _restrictMinMax: function(a, b) {
+ var c = this._getMinMaxDate(a, "min"),
+ d = this._getMinMaxDate(a, "max"),
+ e = c && b < c ? c: b;
+ e = d && e > d ? d: e;
+ return e
+ },
+ _notifyChange: function(a) {
+ var b = this._get(a, "onChangeMonthYear");
+ b && b.apply(a.input ? a.input[0] : null, [a.selectedYear, a.selectedMonth + 1, a])
+ },
+ _getNumberOfMonths: function(a) {
+ var b = this._get(a, "numberOfMonths");
+ return b == null ? [1, 1] : typeof b == "number" ? [1, b] : b
+ },
+ _getMinMaxDate: function(a, b) {
+ return this._determineDate(a, this._get(a, b + "Date"), null)
+ },
+ _getDaysInMonth: function(a, b) {
+ return 32 - this._daylightSavingAdjust(new Date(a, b, 32)).getDate()
+ },
+ _getFirstDayOfMonth: function(a, b) {
+ return (new Date(a, b, 1)).getDay()
+ },
+ _canAdjustMonth: function(a, b, c, d) {
+ var e = this._getNumberOfMonths(a),
+ f = this._daylightSavingAdjust(new Date(c, d + (b < 0 ? b: e[0] * e[1]), 1));
+ b < 0 && f.setDate(this._getDaysInMonth(f.getFullYear(), f.getMonth()));
+ return this._isInRange(a, f)
+ },
+ _isInRange: function(a, b) {
+ var c = this._getMinMaxDate(a, "min"),
+ d = this._getMinMaxDate(a, "max");
+ return (!c || b.getTime() >= c.getTime()) && (!d || b.getTime() <= d.getTime())
+ },
+ _getFormatConfig: function(a) {
+ var b = this._get(a, "shortYearCutoff");
+ b = typeof b != "string" ? b: (new Date).getFullYear() % 100 + parseInt(b, 10);
+ return {
+ shortYearCutoff: b,
+ dayNamesShort: this._get(a, "dayNamesShort"),
+ dayNames: this._get(a, "dayNames"),
+ monthNamesShort: this._get(a, "monthNamesShort"),
+ monthNames: this._get(a, "monthNames")
+ }
+ },
+ _formatDate: function(a, b, c, d) {
+ b || (a.currentDay = a.selectedDay, a.currentMonth = a.selectedMonth, a.currentYear = a.selectedYear);
+ var e = b ? typeof b == "object" ? b: this._daylightSavingAdjust(new Date(d, c, b)) : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay));
+ return this.formatDate(this._get(a, "dateFormat"), e, this._getFormatConfig(a))
+ }
+ }),
+ $.fn.datepicker = function(a) {
+ if (!this.length) return this;
+ $.datepicker.initialized || ($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv), $.datepicker.initialized = !0);
+ var b = Array.prototype.slice.call(arguments, 1);
+ if (typeof a == "string" && (a == "isDisabled" || a == "getDate" || a == "widget")) return $.datepicker["_" + a + "Datepicker"].apply($.datepicker, [this[0]].concat(b));
+ if (a == "option" && arguments.length == 2 && typeof arguments[1] == "string") return $.datepicker["_" + a + "Datepicker"].apply($.datepicker, [this[0]].concat(b));
+ return this.each(function() {
+ typeof a == "string" ? $.datepicker["_" + a + "Datepicker"].apply($.datepicker, [this].concat(b)) : $.datepicker._attachDatepicker(this, a)
+ })
+ },
+ $.datepicker = new Datepicker,
+ $.datepicker.initialized = !1,
+ $.datepicker.uuid = (new Date).getTime(),
+ $.datepicker.version = "1.8.18",
+ window["DP_jQuery_" + dpuuid] = $
+})(jQuery);
+/*
+ * jQuery UI Effects 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/
+ */
+jQuery.effects ||
+function(a, b) {
+ function l(b) {
+ if (!b || typeof b == "number" || a.fx.speeds[b]) return ! 0;
+ if (typeof b == "string" && !a.effects[b]) return ! 0;
+ return ! 1
+ }
+ function k(b, c, d, e) {
+ typeof b == "object" && (e = c, d = null, c = b, b = c.effect),
+ a.isFunction(c) && (e = c, d = null, c = {});
+ if (typeof c == "number" || a.fx.speeds[c]) e = d,
+ d = c,
+ c = {};
+ a.isFunction(d) && (e = d, d = null),
+ c = c || {},
+ d = d || c.duration,
+ d = a.fx.off ? 0 : typeof d == "number" ? d: d in a.fx.speeds ? a.fx.speeds[d] : a.fx.speeds._default,
+ e = e || c.complete;
+ return [b, c, d, e]
+ }
+ function j(a, b) {
+ var c = {
+ _: 0
+ },
+ d;
+ for (d in b) a[d] != b[d] && (c[d] = b[d]);
+ return c
+ }
+ function i(b) {
+ var c, d;
+ for (c in b) d = b[c],
+ (d == null || a.isFunction(d) || c in g || /scrollbar/.test(c) || !/color/i.test(c) && isNaN(parseFloat(d))) && delete b[c];
+ return b
+ }
+ function h() {
+ var a = document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle,
+ b = {},
+ c,
+ d;
+ if (a && a.length && a[0] && a[a[0]]) {
+ var e = a.length;
+ while (e--) c = a[e],
+ typeof a[c] == "string" && (d = c.replace(/\-(\w)/g,
+ function(a, b) {
+ return b.toUpperCase()
+ }), b[d] = a[c])
+ } else for (c in a) typeof a[c] == "string" && (b[c] = a[c]);
+ return b
+ }
+ function d(b, d) {
+ var e;
+ do {
+ e = a.curCSS(b, d);
+ if (e != "" && e != "transparent" || a.nodeName(b, "body")) break;
+ d = "backgroundColor"
+ } while ( b = b . parentNode );
+ return c(e)
+ }
+ function c(b) {
+ var c;
+ if (b && b.constructor == Array && b.length == 3) return b;
+ if (c = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b)) return [parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10)];
+ if (c = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b)) return [parseFloat(c[1]) * 2.55, parseFloat(c[2]) * 2.55, parseFloat(c[3]) * 2.55];
+ if (c = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b)) return [parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16)];
+ if (c = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b)) return [parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16)];
+ if (c = /rgba\(0, 0, 0, 0\)/.exec(b)) return e.transparent;
+ return e[a.trim(b).toLowerCase()]
+ }
+ a.effects = {},
+ a.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderColor", "color", "outlineColor"],
+ function(b, e) {
+ a.fx.step[e] = function(a) {
+ a.colorInit || (a.start = d(a.elem, e), a.end = c(a.end), a.colorInit = !0),
+ a.elem.style[e] = "rgb(" + Math.max(Math.min(parseInt(a.pos * (a.end[0] - a.start[0]) + a.start[0], 10), 255), 0) + "," + Math.max(Math.min(parseInt(a.pos * (a.end[1] - a.start[1]) + a.start[1], 10), 255), 0) + "," + Math.max(Math.min(parseInt(a.pos * (a.end[2] - a.start[2]) + a.start[2], 10), 255), 0) + ")"
+ }
+ });
+ var e = {
+ aqua: [0, 255, 255],
+ azure: [240, 255, 255],
+ beige: [245, 245, 220],
+ black: [0, 0, 0],
+ blue: [0, 0, 255],
+ brown: [165, 42, 42],
+ cyan: [0, 255, 255],
+ darkblue: [0, 0, 139],
+ darkcyan: [0, 139, 139],
+ darkgrey: [169, 169, 169],
+ darkgreen: [0, 100, 0],
+ darkkhaki: [189, 183, 107],
+ darkmagenta: [139, 0, 139],
+ darkolivegreen: [85, 107, 47],
+ darkorange: [255, 140, 0],
+ darkorchid: [153, 50, 204],
+ darkred: [139, 0, 0],
+ darksalmon: [233, 150, 122],
+ darkviolet: [148, 0, 211],
+ fuchsia: [255, 0, 255],
+ gold: [255, 215, 0],
+ green: [0, 128, 0],
+ indigo: [75, 0, 130],
+ khaki: [240, 230, 140],
+ lightblue: [173, 216, 230],
+ lightcyan: [224, 255, 255],
+ lightgreen: [144, 238, 144],
+ lightgrey: [211, 211, 211],
+ lightpink: [255, 182, 193],
+ lightyellow: [255, 255, 224],
+ lime: [0, 255, 0],
+ magenta: [255, 0, 255],
+ maroon: [128, 0, 0],
+ navy: [0, 0, 128],
+ olive: [128, 128, 0],
+ orange: [255, 165, 0],
+ pink: [255, 192, 203],
+ purple: [128, 0, 128],
+ violet: [128, 0, 128],
+ red: [255, 0, 0],
+ silver: [192, 192, 192],
+ white: [255, 255, 255],
+ yellow: [255, 255, 0],
+ transparent: [255, 255, 255]
+ },
+ f = ["add", "remove", "toggle"],
+ g = {
+ border: 1,
+ borderBottom: 1,
+ borderColor: 1,
+ borderLeft: 1,
+ borderRight: 1,
+ borderTop: 1,
+ borderWidth: 1,
+ margin: 1,
+ padding: 1
+ };
+ a.effects.animateClass = function(b, c, d, e) {
+ a.isFunction(d) && (e = d, d = null);
+ return this.queue(function() {
+ var g = a(this),
+ k = g.attr("style") || " ",
+ l = i(h.call(this)),
+ m,
+ n = g.attr("class");
+ a.each(f,
+ function(a, c) {
+ b[c] && g[c + "Class"](b[c])
+ }),
+ m = i(h.call(this)),
+ g.attr("class", n),
+ g.animate(j(l, m), {
+ queue: !1,
+ duration: c,
+ easing: d,
+ complete: function() {
+ a.each(f,
+ function(a, c) {
+ b[c] && g[c + "Class"](b[c])
+ }),
+ typeof g.attr("style") == "object" ? (g.attr("style").cssText = "", g.attr("style").cssText = k) : g.attr("style", k),
+ e && e.apply(this, arguments),
+ a.dequeue(this)
+ }
+ })
+ })
+ },
+ a.fn.extend({
+ _addClass: a.fn.addClass,
+ addClass: function(b, c, d, e) {
+ return c ? a.effects.animateClass.apply(this, [{
+ add: b
+ },
+ c, d, e]) : this._addClass(b)
+ },
+ _removeClass: a.fn.removeClass,
+ removeClass: function(b, c, d, e) {
+ return c ? a.effects.animateClass.apply(this, [{
+ remove: b
+ },
+ c, d, e]) : this._removeClass(b)
+ },
+ _toggleClass: a.fn.toggleClass,
+ toggleClass: function(c, d, e, f, g) {
+ return typeof d == "boolean" || d === b ? e ? a.effects.animateClass.apply(this, [d ? {
+ add: c
+ }: {
+ remove: c
+ },
+ e, f, g]) : this._toggleClass(c, d) : a.effects.animateClass.apply(this, [{
+ toggle: c
+ },
+ d, e, f])
+ },
+ switchClass: function(b, c, d, e, f) {
+ return a.effects.animateClass.apply(this, [{
+ add: c,
+ remove: b
+ },
+ d, e, f])
+ }
+ }),
+ a.extend(a.effects, {
+ version: "1.8.18",
+ save: function(a, b) {
+ for (var c = 0; c < b.length; c++) b[c] !== null && a.data("ec.storage." + b[c], a[0].style[b[c]])
+ },
+ restore: function(a, b) {
+ for (var c = 0; c < b.length; c++) b[c] !== null && a.css(b[c], a.data("ec.storage." + b[c]))
+ },
+ setMode: function(a, b) {
+ b == "toggle" && (b = a.is(":hidden") ? "show": "hide");
+ return b
+ },
+ getBaseline: function(a, b) {
+ var c, d;
+ switch (a[0]) {
+ case "top":
+ c = 0;
+ break;
+ case "middle":
+ c = .5;
+ break;
+ case "bottom":
+ c = 1;
+ break;
+ default:
+ c = a[0] / b.height
+ }
+ switch (a[1]) {
+ case "left":
+ d = 0;
+ break;
+ case "center":
+ d = .5;
+ break;
+ case "right":
+ d = 1;
+ break;
+ default:
+ d = a[1] / b.width
+ }
+ return {
+ x: d,
+ y: c
+ }
+ },
+ createWrapper: function(b) {
+ if (b.parent().is(".ui-effects-wrapper")) return b.parent();
+ var c = {
+ width: b.outerWidth(!0),
+ height: b.outerHeight(!0),
+ "float": b.css("float")
+ },
+ d = a("<div></div>").addClass("ui-effects-wrapper").css({
+ fontSize: "100%",
+ background: "transparent",
+ border: "none",
+ margin: 0,
+ padding: 0
+ }),
+ e = document.activeElement;
+ b.wrap(d),
+ (b[0] === e || a.contains(b[0], e)) && a(e).focus(),
+ d = b.parent(),
+ b.css("position") == "static" ? (d.css({
+ position: "relative"
+ }), b.css({
+ position: "relative"
+ })) : (a.extend(c, {
+ position: b.css("position"),
+ zIndex: b.css("z-index")
+ }), a.each(["top", "left", "bottom", "right"],
+ function(a, d) {
+ c[d] = b.css(d),
+ isNaN(parseInt(c[d], 10)) && (c[d] = "auto")
+ }), b.css({
+ position: "relative",
+ top: 0,
+ left: 0,
+ right: "auto",
+ bottom: "auto"
+ }));
+ return d.css(c).show()
+ },
+ removeWrapper: function(b) {
+ var c, d = document.activeElement;
+ if (b.parent().is(".ui-effects-wrapper")) {
+ c = b.parent().replaceWith(b),
+ (b[0] === d || a.contains(b[0], d)) && a(d).focus();
+ return c
+ }
+ return b
+ },
+ setTransition: function(b, c, d, e) {
+ e = e || {},
+ a.each(c,
+ function(a, c) {
+ unit = b.cssUnit(c),
+ unit[0] > 0 && (e[c] = unit[0] * d + unit[1])
+ });
+ return e
+ }
+ }),
+ a.fn.extend({
+ effect: function(b, c, d, e) {
+ var f = k.apply(this, arguments),
+ g = {
+ options: f[1],
+ duration: f[2],
+ callback: f[3]
+ },
+ h = g.options.mode,
+ i = a.effects[b];
+ if (a.fx.off || !i) return h ? this[h](g.duration, g.callback) : this.each(function() {
+ g.callback && g.callback.call(this)
+ });
+ return i.call(this, g)
+ },
+ _show: a.fn.show,
+ show: function(a) {
+ if (l(a)) return this._show.apply(this, arguments);
+ var b = k.apply(this, arguments);
+ b[1].mode = "show";
+ return this.effect.apply(this, b)
+ },
+ _hide: a.fn.hide,
+ hide: function(a) {
+ if (l(a)) return this._hide.apply(this, arguments);
+ var b = k.apply(this, arguments);
+ b[1].mode = "hide";
+ return this.effect.apply(this, b)
+ },
+ __toggle: a.fn.toggle,
+ toggle: function(b) {
+ if (l(b) || typeof b == "boolean" || a.isFunction(b)) return this.__toggle.apply(this, arguments);
+ var c = k.apply(this, arguments);
+ c[1].mode = "toggle";
+ return this.effect.apply(this, c)
+ },
+ cssUnit: function(b) {
+ var c = this.css(b),
+ d = [];
+ a.each(["em", "px", "%", "pt"],
+ function(a, b) {
+ c.indexOf(b) > 0 && (d = [parseFloat(c), b])
+ });
+ return d
+ }
+ }),
+ a.easing.jswing = a.easing.swing,
+ a.extend(a.easing, {
+ def: "easeOutQuad",
+ swing: function(b, c, d, e, f) {
+ return a.easing[a.easing.def](b, c, d, e, f)
+ },
+ easeInQuad: function(a, b, c, d, e) {
+ return d * (b /= e) * b + c
+ },
+ easeOutQuad: function(a, b, c, d, e) {
+ return - d * (b /= e) * (b - 2) + c
+ },
+ easeInOutQuad: function(a, b, c, d, e) {
+ if ((b /= e / 2) < 1) return d / 2 * b * b + c;
+ return - d / 2 * (--b * (b - 2) - 1) + c
+ },
+ easeInCubic: function(a, b, c, d, e) {
+ return d * (b /= e) * b * b + c
+ },
+ easeOutCubic: function(a, b, c, d, e) {
+ return d * ((b = b / e - 1) * b * b + 1) + c
+ },
+ easeInOutCubic: function(a, b, c, d, e) {
+ if ((b /= e / 2) < 1) return d / 2 * b * b * b + c;
+ return d / 2 * ((b -= 2) * b * b + 2) + c
+ },
+ easeInQuart: function(a, b, c, d, e) {
+ return d * (b /= e) * b * b * b + c
+ },
+ easeOutQuart: function(a, b, c, d, e) {
+ return - d * ((b = b / e - 1) * b * b * b - 1) + c
+ },
+ easeInOutQuart: function(a, b, c, d, e) {
+ if ((b /= e / 2) < 1) return d / 2 * b * b * b * b + c;
+ return - d / 2 * ((b -= 2) * b * b * b - 2) + c
+ },
+ easeInQuint: function(a, b, c, d, e) {
+ return d * (b /= e) * b * b * b * b + c
+ },
+ easeOutQuint: function(a, b, c, d, e) {
+ return d * ((b = b / e - 1) * b * b * b * b + 1) + c
+ },
+ easeInOutQuint: function(a, b, c, d, e) {
+ if ((b /= e / 2) < 1) return d / 2 * b * b * b * b * b + c;
+ return d / 2 * ((b -= 2) * b * b * b * b + 2) + c
+ },
+ easeInSine: function(a, b, c, d, e) {
+ return - d * Math.cos(b / e * (Math.PI / 2)) + d + c
+ },
+ easeOutSine: function(a, b, c, d, e) {
+ return d * Math.sin(b / e * (Math.PI / 2)) + c
+ },
+ easeInOutSine: function(a, b, c, d, e) {
+ return - d / 2 * (Math.cos(Math.PI * b / e) - 1) + c
+ },
+ easeInExpo: function(a, b, c, d, e) {
+ return b == 0 ? c: d * Math.pow(2, 10 * (b / e - 1)) + c
+ },
+ easeOutExpo: function(a, b, c, d, e) {
+ return b == e ? c + d: d * ( - Math.pow(2, -10 * b / e) + 1) + c
+ },
+ easeInOutExpo: function(a, b, c, d, e) {
+ if (b == 0) return c;
+ if (b == e) return c + d;
+ if ((b /= e / 2) < 1) return d / 2 * Math.pow(2, 10 * (b - 1)) + c;
+ return d / 2 * ( - Math.pow(2, -10 * --b) + 2) + c
+ },
+ easeInCirc: function(a, b, c, d, e) {
+ return - d * (Math.sqrt(1 - (b /= e) * b) - 1) + c
+ },
+ easeOutCirc: function(a, b, c, d, e) {
+ return d * Math.sqrt(1 - (b = b / e - 1) * b) + c
+ },
+ easeInOutCirc: function(a, b, c, d, e) {
+ if ((b /= e / 2) < 1) return - d / 2 * (Math.sqrt(1 - b * b) - 1) + c;
+ return d / 2 * (Math.sqrt(1 - (b -= 2) * b) + 1) + c
+ },
+ easeInElastic: function(a, b, c, d, e) {
+ var f = 1.70158,
+ g = 0,
+ h = d;
+ if (b == 0) return c;
+ if ((b /= e) == 1) return c + d;
+ g || (g = e * .3);
+ if (h < Math.abs(d)) {
+ h = d;
+ var f = g / 4
+ } else var f = g / (2 * Math.PI) * Math.asin(d / h);
+ return - (h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g)) + c
+ },
+ easeOutElastic: function(a, b, c, d, e) {
+ var f = 1.70158,
+ g = 0,
+ h = d;
+ if (b == 0) return c;
+ if ((b /= e) == 1) return c + d;
+ g || (g = e * .3);
+ if (h < Math.abs(d)) {
+ h = d;
+ var f = g / 4
+ } else var f = g / (2 * Math.PI) * Math.asin(d / h);
+ return h * Math.pow(2, -10 * b) * Math.sin((b * e - f) * 2 * Math.PI / g) + d + c
+ },
+ easeInOutElastic: function(a, b, c, d, e) {
+ var f = 1.70158,
+ g = 0,
+ h = d;
+ if (b == 0) return c;
+ if ((b /= e / 2) == 2) return c + d;
+ g || (g = e * .3 * 1.5);
+ if (h < Math.abs(d)) {
+ h = d;
+ var f = g / 4
+ } else var f = g / (2 * Math.PI) * Math.asin(d / h);
+ if (b < 1) return - 0.5 * h * Math.pow(2, 10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) + c;
+ return h * Math.pow(2, -10 * (b -= 1)) * Math.sin((b * e - f) * 2 * Math.PI / g) * .5 + d + c
+ },
+ easeInBack: function(a, c, d, e, f, g) {
+ g == b && (g = 1.70158);
+ return e * (c /= f) * c * ((g + 1) * c - g) + d
+ },
+ easeOutBack: function(a, c, d, e, f, g) {
+ g == b && (g = 1.70158);
+ return e * ((c = c / f - 1) * c * ((g + 1) * c + g) + 1) + d
+ },
+ easeInOutBack: function(a, c, d, e, f, g) {
+ g == b && (g = 1.70158);
+ if ((c /= f / 2) < 1) return e / 2 * c * c * (((g *= 1.525) + 1) * c - g) + d;
+ return e / 2 * ((c -= 2) * c * (((g *= 1.525) + 1) * c + g) + 2) + d
+ },
+ easeInBounce: function(b, c, d, e, f) {
+ return e - a.easing.easeOutBounce(b, f - c, 0, e, f) + d
+ },
+ easeOutBounce: function(a, b, c, d, e) {
+ return (b /= e) < 1 / 2.75 ? d * 7.5625 * b * b + c: b < 2 / 2.75 ? d * (7.5625 * (b -= 1.5 / 2.75) * b + .75) + c: b < 2.5 / 2.75 ? d * (7.5625 * (b -= 2.25 / 2.75) * b + .9375) + c: d * (7.5625 * (b -= 2.625 / 2.75) * b + .984375) + c
+ },
+ easeInOutBounce: function(b, c, d, e, f) {
+ if (c < f / 2) return a.easing.easeInBounce(b, c * 2, 0, e, f) * .5 + d;
+ return a.easing.easeOutBounce(b, c * 2 - f, 0, e, f) * .5 + e * .5 + d
+ }
+ })
+} (jQuery);
+/*
+ * jQuery UI Effects Blind 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Blind
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(a, b) {
+ a.effects.blind = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = ["position", "top", "bottom", "left", "right"],
+ e = a.effects.setMode(c, b.options.mode || "hide"),
+ f = b.options.direction || "vertical";
+ a.effects.save(c, d),
+ c.show();
+ var g = a.effects.createWrapper(c).css({
+ overflow: "hidden"
+ }),
+ h = f == "vertical" ? "height": "width",
+ i = f == "vertical" ? g.height() : g.width();
+ e == "show" && g.css(h, 0);
+ var j = {};
+ j[h] = e == "show" ? i: 0,
+ g.animate(j, b.duration, b.options.easing,
+ function() {
+ e == "hide" && c.hide(),
+ a.effects.restore(c, d),
+ a.effects.removeWrapper(c),
+ b.callback && b.callback.apply(c[0], arguments),
+ c.dequeue()
+ })
+ })
+ }
+})(jQuery);
+/*
+ * jQuery UI Effects Bounce 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Bounce
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(a, b) {
+ a.effects.bounce = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = ["position", "top", "bottom", "left", "right"],
+ e = a.effects.setMode(c, b.options.mode || "effect"),
+ f = b.options.direction || "up",
+ g = b.options.distance || 20,
+ h = b.options.times || 5,
+ i = b.duration || 250;
+ /show|hide/.test(e) && d.push("opacity"),
+ a.effects.save(c, d),
+ c.show(),
+ a.effects.createWrapper(c);
+ var j = f == "up" || f == "down" ? "top": "left",
+ k = f == "up" || f == "left" ? "pos": "neg",
+ g = b.options.distance || (j == "top" ? c.outerHeight({
+ margin: !0
+ }) / 3 : c.outerWidth({
+ margin: !0
+ }) / 3);
+ e == "show" && c.css("opacity", 0).css(j, k == "pos" ? -g: g),
+ e == "hide" && (g = g / (h * 2)),
+ e != "hide" && h--;
+ if (e == "show") {
+ var l = {
+ opacity: 1
+ };
+ l[j] = (k == "pos" ? "+=": "-=") + g,
+ c.animate(l, i / 2, b.options.easing),
+ g = g / 2,
+ h--
+ }
+ for (var m = 0; m < h; m++) {
+ var n = {},
+ p = {};
+ n[j] = (k == "pos" ? "-=": "+=") + g,
+ p[j] = (k == "pos" ? "+=": "-=") + g,
+ c.animate(n, i / 2, b.options.easing).animate(p, i / 2, b.options.easing),
+ g = e == "hide" ? g * 2 : g / 2
+ }
+ if (e == "hide") {
+ var l = {
+ opacity: 0
+ };
+ l[j] = (k == "pos" ? "-=": "+=") + g,
+ c.animate(l, i / 2, b.options.easing,
+ function() {
+ c.hide(),
+ a.effects.restore(c, d),
+ a.effects.removeWrapper(c),
+ b.callback && b.callback.apply(this, arguments)
+ })
+ } else {
+ var n = {},
+ p = {};
+ n[j] = (k == "pos" ? "-=": "+=") + g,
+ p[j] = (k == "pos" ? "+=": "-=") + g,
+ c.animate(n, i / 2, b.options.easing).animate(p, i / 2, b.options.easing,
+ function() {
+ a.effects.restore(c, d),
+ a.effects.removeWrapper(c),
+ b.callback && b.callback.apply(this, arguments)
+ })
+ }
+ c.queue("fx",
+ function() {
+ c.dequeue()
+ }),
+ c.dequeue()
+ })
+ }
+})(jQuery);
+/*
+ * jQuery UI Effects Clip 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Clip
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(a, b) {
+ a.effects.clip = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = ["position", "top", "bottom", "left", "right", "height", "width"],
+ e = a.effects.setMode(c, b.options.mode || "hide"),
+ f = b.options.direction || "vertical";
+ a.effects.save(c, d),
+ c.show();
+ var g = a.effects.createWrapper(c).css({
+ overflow: "hidden"
+ }),
+ h = c[0].tagName == "IMG" ? g: c,
+ i = {
+ size: f == "vertical" ? "height": "width",
+ position: f == "vertical" ? "top": "left"
+ },
+ j = f == "vertical" ? h.height() : h.width();
+ e == "show" && (h.css(i.size, 0), h.css(i.position, j / 2));
+ var k = {};
+ k[i.size] = e == "show" ? j: 0,
+ k[i.position] = e == "show" ? 0 : j / 2,
+ h.animate(k, {
+ queue: !1,
+ duration: b.duration,
+ easing: b.options.easing,
+ complete: function() {
+ e == "hide" && c.hide(),
+ a.effects.restore(c, d),
+ a.effects.removeWrapper(c),
+ b.callback && b.callback.apply(c[0], arguments),
+ c.dequeue()
+ }
+ })
+ })
+ }
+})(jQuery);
+/*
+ * jQuery UI Effects Drop 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Drop
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(a, b) {
+ a.effects.drop = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = ["position", "top", "bottom", "left", "right", "opacity"],
+ e = a.effects.setMode(c, b.options.mode || "hide"),
+ f = b.options.direction || "left";
+ a.effects.save(c, d),
+ c.show(),
+ a.effects.createWrapper(c);
+ var g = f == "up" || f == "down" ? "top": "left",
+ h = f == "up" || f == "left" ? "pos": "neg",
+ i = b.options.distance || (g == "top" ? c.outerHeight({
+ margin: !0
+ }) / 2 : c.outerWidth({
+ margin: !0
+ }) / 2);
+ e == "show" && c.css("opacity", 0).css(g, h == "pos" ? -i: i);
+ var j = {
+ opacity: e == "show" ? 1 : 0
+ };
+ j[g] = (e == "show" ? h == "pos" ? "+=": "-=": h == "pos" ? "-=": "+=") + i,
+ c.animate(j, {
+ queue: !1,
+ duration: b.duration,
+ easing: b.options.easing,
+ complete: function() {
+ e == "hide" && c.hide(),
+ a.effects.restore(c, d),
+ a.effects.removeWrapper(c),
+ b.callback && b.callback.apply(this, arguments),
+ c.dequeue()
+ }
+ })
+ })
+ }
+})(jQuery);
+/*
+ * jQuery UI Effects Explode 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Explode
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(a, b) {
+ a.effects.explode = function(b) {
+ return this.queue(function() {
+ var c = b.options.pieces ? Math.round(Math.sqrt(b.options.pieces)) : 3,
+ d = b.options.pieces ? Math.round(Math.sqrt(b.options.pieces)) : 3;
+ b.options.mode = b.options.mode == "toggle" ? a(this).is(":visible") ? "hide": "show": b.options.mode;
+ var e = a(this).show().css("visibility", "hidden"),
+ f = e.offset();
+ f.top -= parseInt(e.css("marginTop"), 10) || 0,
+ f.left -= parseInt(e.css("marginLeft"), 10) || 0;
+ var g = e.outerWidth(!0),
+ h = e.outerHeight(!0);
+ for (var i = 0; i < c; i++) for (var j = 0; j < d; j++) e.clone().appendTo("body").wrap("<div></div>").css({
+ position: "absolute",
+ visibility: "visible",
+ left: -j * (g / d),
+ top: -i * (h / c)
+ }).parent().addClass("ui-effects-explode").css({
+ position: "absolute",
+ overflow: "hidden",
+ width: g / d,
+ height: h / c,
+ left: f.left + j * (g / d) + (b.options.mode == "show" ? (j - Math.floor(d / 2)) * (g / d) : 0),
+ top: f.top + i * (h / c) + (b.options.mode == "show" ? (i - Math.floor(c / 2)) * (h / c) : 0),
+ opacity: b.options.mode == "show" ? 0 : 1
+ }).animate({
+ left: f.left + j * (g / d) + (b.options.mode == "show" ? 0 : (j - Math.floor(d / 2)) * (g / d)),
+ top: f.top + i * (h / c) + (b.options.mode == "show" ? 0 : (i - Math.floor(c / 2)) * (h / c)),
+ opacity: b.options.mode == "show" ? 1 : 0
+ },
+ b.duration || 500);
+ setTimeout(function() {
+ b.options.mode == "show" ? e.css({
+ visibility: "visible"
+ }) : e.css({
+ visibility: "visible"
+ }).hide(),
+ b.callback && b.callback.apply(e[0]),
+ e.dequeue(),
+ a("div.ui-effects-explode").remove()
+ },
+ b.duration || 500)
+ })
+ }
+})(jQuery);
+/*
+ * jQuery UI Effects Fade 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Fade
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(a, b) {
+ a.effects.fade = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = a.effects.setMode(c, b.options.mode || "hide");
+ c.animate({
+ opacity: d
+ },
+ {
+ queue: !1,
+ duration: b.duration,
+ easing: b.options.easing,
+ complete: function() {
+ b.callback && b.callback.apply(this, arguments),
+ c.dequeue()
+ }
+ })
+ })
+ }
+})(jQuery);
+/*
+ * jQuery UI Effects Fold 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Fold
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(a, b) {
+ a.effects.fold = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = ["position", "top", "bottom", "left", "right"],
+ e = a.effects.setMode(c, b.options.mode || "hide"),
+ f = b.options.size || 15,
+ g = !!b.options.horizFirst,
+ h = b.duration ? b.duration / 2 : a.fx.speeds._default / 2;
+ a.effects.save(c, d),
+ c.show();
+ var i = a.effects.createWrapper(c).css({
+ overflow: "hidden"
+ }),
+ j = e == "show" != g,
+ k = j ? ["width", "height"] : ["height", "width"],
+ l = j ? [i.width(), i.height()] : [i.height(), i.width()],
+ m = /([0-9]+)%/.exec(f);
+ m && (f = parseInt(m[1], 10) / 100 * l[e == "hide" ? 0 : 1]),
+ e == "show" && i.css(g ? {
+ height: 0,
+ width: f
+ }: {
+ height: f,
+ width: 0
+ });
+ var n = {},
+ p = {};
+ n[k[0]] = e == "show" ? l[0] : f,
+ p[k[1]] = e == "show" ? l[1] : 0,
+ i.animate(n, h, b.options.easing).animate(p, h, b.options.easing,
+ function() {
+ e == "hide" && c.hide(),
+ a.effects.restore(c, d),
+ a.effects.removeWrapper(c),
+ b.callback && b.callback.apply(c[0], arguments),
+ c.dequeue()
+ })
+ })
+ }
+})(jQuery);
+/*
+ * jQuery UI Effects Highlight 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Highlight
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(a, b) {
+ a.effects.highlight = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = ["backgroundImage", "backgroundColor", "opacity"],
+ e = a.effects.setMode(c, b.options.mode || "show"),
+ f = {
+ backgroundColor: c.css("backgroundColor")
+ };
+ e == "hide" && (f.opacity = 0),
+ a.effects.save(c, d),
+ c.show().css({
+ backgroundImage: "none",
+ backgroundColor: b.options.color || "#ffff99"
+ }).animate(f, {
+ queue: !1,
+ duration: b.duration,
+ easing: b.options.easing,
+ complete: function() {
+ e == "hide" && c.hide(),
+ a.effects.restore(c, d),
+ e == "show" && !a.support.opacity && this.style.removeAttribute("filter"),
+ b.callback && b.callback.apply(this, arguments),
+ c.dequeue()
+ }
+ })
+ })
+ }
+})(jQuery);
+/*
+ * jQuery UI Effects Pulsate 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Pulsate
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(a, b) {
+ a.effects.pulsate = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = a.effects.setMode(c, b.options.mode || "show");
+ times = (b.options.times || 5) * 2 - 1,
+ duration = b.duration ? b.duration / 2 : a.fx.speeds._default / 2,
+ isVisible = c.is(":visible"),
+ animateTo = 0,
+ isVisible || (c.css("opacity", 0).show(), animateTo = 1),
+ (d == "hide" && isVisible || d == "show" && !isVisible) && times--;
+ for (var e = 0; e < times; e++) c.animate({
+ opacity: animateTo
+ },
+ duration, b.options.easing),
+ animateTo = (animateTo + 1) % 2;
+ c.animate({
+ opacity: animateTo
+ },
+ duration, b.options.easing,
+ function() {
+ animateTo == 0 && c.hide(),
+ b.callback && b.callback.apply(this, arguments)
+ }),
+ c.queue("fx",
+ function() {
+ c.dequeue()
+ }).dequeue()
+ })
+ }
+})(jQuery);
+/*
+ * jQuery UI Effects Scale 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Scale
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(a, b) {
+ a.effects.puff = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = a.effects.setMode(c, b.options.mode || "hide"),
+ e = parseInt(b.options.percent, 10) || 150,
+ f = e / 100,
+ g = {
+ height: c.height(),
+ width: c.width()
+ };
+ a.extend(b.options, {
+ fade: !0,
+ mode: d,
+ percent: d == "hide" ? e: 100,
+ from: d == "hide" ? g: {
+ height: g.height * f,
+ width: g.width * f
+ }
+ }),
+ c.effect("scale", b.options, b.duration, b.callback),
+ c.dequeue()
+ })
+ },
+ a.effects.scale = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = a.extend(!0, {},
+ b.options),
+ e = a.effects.setMode(c, b.options.mode || "effect"),
+ f = parseInt(b.options.percent, 10) || (parseInt(b.options.percent, 10) == 0 ? 0 : e == "hide" ? 0 : 100),
+ g = b.options.direction || "both",
+ h = b.options.origin;
+ e != "effect" && (d.origin = h || ["middle", "center"], d.restore = !0);
+ var i = {
+ height: c.height(),
+ width: c.width()
+ };
+ c.from = b.options.from || (e == "show" ? {
+ height: 0,
+ width: 0
+ }: i);
+ var j = {
+ y: g != "horizontal" ? f / 100 : 1,
+ x: g != "vertical" ? f / 100 : 1
+ };
+ c.to = {
+ height: i.height * j.y,
+ width: i.width * j.x
+ },
+ b.options.fade && (e == "show" && (c.from.opacity = 0, c.to.opacity = 1), e == "hide" && (c.from.opacity = 1, c.to.opacity = 0)),
+ d.from = c.from,
+ d.to = c.to,
+ d.mode = e,
+ c.effect("size", d, b.duration, b.callback),
+ c.dequeue()
+ })
+ },
+ a.effects.size = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"],
+ e = ["position", "top", "bottom", "left", "right", "overflow", "opacity"],
+ f = ["width", "height", "overflow"],
+ g = ["fontSize"],
+ h = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"],
+ i = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"],
+ j = a.effects.setMode(c, b.options.mode || "effect"),
+ k = b.options.restore || !1,
+ l = b.options.scale || "both",
+ m = b.options.origin,
+ n = {
+ height: c.height(),
+ width: c.width()
+ };
+ c.from = b.options.from || n,
+ c.to = b.options.to || n;
+ if (m) {
+ var p = a.effects.getBaseline(m, n);
+ c.from.top = (n.height - c.from.height) * p.y,
+ c.from.left = (n.width - c.from.width) * p.x,
+ c.to.top = (n.height - c.to.height) * p.y,
+ c.to.left = (n.width - c.to.width) * p.x
+ }
+ var q = {
+ from: {
+ y: c.from.height / n.height,
+ x: c.from.width / n.width
+ },
+ to: {
+ y: c.to.height / n.height,
+ x: c.to.width / n.width
+ }
+ };
+ if (l == "box" || l == "both") q.from.y != q.to.y && (d = d.concat(h), c.from = a.effects.setTransition(c, h, q.from.y, c.from), c.to = a.effects.setTransition(c, h, q.to.y, c.to)),
+ q.from.x != q.to.x && (d = d.concat(i), c.from = a.effects.setTransition(c, i, q.from.x, c.from), c.to = a.effects.setTransition(c, i, q.to.x, c.to)); (l == "content" || l == "both") && q.from.y != q.to.y && (d = d.concat(g), c.from = a.effects.setTransition(c, g, q.from.y, c.from), c.to = a.effects.setTransition(c, g, q.to.y, c.to)),
+ a.effects.save(c, k ? d: e),
+ c.show(),
+ a.effects.createWrapper(c),
+ c.css("overflow", "hidden").css(c.from);
+ if (l == "content" || l == "both") h = h.concat(["marginTop", "marginBottom"]).concat(g),
+ i = i.concat(["marginLeft", "marginRight"]),
+ f = d.concat(h).concat(i),
+ c.find("*[width]").each(function() {
+ child = a(this),
+ k && a.effects.save(child, f);
+ var c = {
+ height: child.height(),
+ width: child.width()
+ };
+ child.from = {
+ height: c.height * q.from.y,
+ width: c.width * q.from.x
+ },
+ child.to = {
+ height: c.height * q.to.y,
+ width: c.width * q.to.x
+ },
+ q.from.y != q.to.y && (child.from = a.effects.setTransition(child, h, q.from.y, child.from), child.to = a.effects.setTransition(child, h, q.to.y, child.to)),
+ q.from.x != q.to.x && (child.from = a.effects.setTransition(child, i, q.from.x, child.from), child.to = a.effects.setTransition(child, i, q.to.x, child.to)),
+ child.css(child.from),
+ child.animate(child.to, b.duration, b.options.easing,
+ function() {
+ k && a.effects.restore(child, f)
+ })
+ });
+ c.animate(c.to, {
+ queue: !1,
+ duration: b.duration,
+ easing: b.options.easing,
+ complete: function() {
+ c.to.opacity === 0 && c.css("opacity", c.from.opacity),
+ j == "hide" && c.hide(),
+ a.effects.restore(c, k ? d: e),
+ a.effects.removeWrapper(c),
+ b.callback && b.callback.apply(this, arguments),
+ c.dequeue()
+ }
+ })
+ })
+ }
+})(jQuery);
+/*
+ * jQuery UI Effects Shake 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Shake
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(a, b) {
+ a.effects.shake = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = ["position", "top", "bottom", "left", "right"],
+ e = a.effects.setMode(c, b.options.mode || "effect"),
+ f = b.options.direction || "left",
+ g = b.options.distance || 20,
+ h = b.options.times || 3,
+ i = b.duration || b.options.duration || 140;
+ a.effects.save(c, d),
+ c.show(),
+ a.effects.createWrapper(c);
+ var j = f == "up" || f == "down" ? "top": "left",
+ k = f == "up" || f == "left" ? "pos": "neg",
+ l = {},
+ m = {},
+ n = {};
+ l[j] = (k == "pos" ? "-=": "+=") + g,
+ m[j] = (k == "pos" ? "+=": "-=") + g * 2,
+ n[j] = (k == "pos" ? "-=": "+=") + g * 2,
+ c.animate(l, i, b.options.easing);
+ for (var p = 1; p < h; p++) c.animate(m, i, b.options.easing).animate(n, i, b.options.easing);
+ c.animate(m, i, b.options.easing).animate(l, i / 2, b.options.easing,
+ function() {
+ a.effects.restore(c, d),
+ a.effects.removeWrapper(c),
+ b.callback && b.callback.apply(this, arguments)
+ }),
+ c.queue("fx",
+ function() {
+ c.dequeue()
+ }),
+ c.dequeue()
+ })
+ }
+})(jQuery);
+/*
+ * jQuery UI Effects Slide 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Slide
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(a, b) {
+ a.effects.slide = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = ["position", "top", "bottom", "left", "right"],
+ e = a.effects.setMode(c, b.options.mode || "show"),
+ f = b.options.direction || "left";
+ a.effects.save(c, d),
+ c.show(),
+ a.effects.createWrapper(c).css({
+ overflow: "hidden"
+ });
+ var g = f == "up" || f == "down" ? "top": "left",
+ h = f == "up" || f == "left" ? "pos": "neg",
+ i = b.options.distance || (g == "top" ? c.outerHeight({
+ margin: !0
+ }) : c.outerWidth({
+ margin: !0
+ }));
+ e == "show" && c.css(g, h == "pos" ? isNaN(i) ? "-" + i: -i: i);
+ var j = {};
+ j[g] = (e == "show" ? h == "pos" ? "+=": "-=": h == "pos" ? "-=": "+=") + i,
+ c.animate(j, {
+ queue: !1,
+ duration: b.duration,
+ easing: b.options.easing,
+ complete: function() {
+ e == "hide" && c.hide(),
+ a.effects.restore(c, d),
+ a.effects.removeWrapper(c),
+ b.callback && b.callback.apply(this, arguments),
+ c.dequeue()
+ }
+ })
+ })
+ }
+})(jQuery);
+/*
+ * jQuery UI Effects Transfer 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Effects/Transfer
+ *
+ * Depends:
+ * jquery.effects.core.js
+ */
+(function(a, b) {
+ a.effects.transfer = function(b) {
+ return this.queue(function() {
+ var c = a(this),
+ d = a(b.options.to),
+ e = d.offset(),
+ f = {
+ top: e.top,
+ left: e.left,
+ height: d.innerHeight(),
+ width: d.innerWidth()
+ },
+ g = c.offset(),
+ h = a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({
+ top: g.top,
+ left: g.left,
+ height: c.innerHeight(),
+ width: c.innerWidth(),
+ position: "absolute"
+ }).animate(f, b.duration, b.options.easing,
+ function() {
+ h.remove(),
+ b.callback && b.callback.apply(c[0], arguments),
+ c.dequeue()
+ })
+ })
+ }
+})(jQuery);
\ No newline at end of file diff --git a/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/calendar.gif b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/calendar.gif Binary files differnew file mode 100644 index 0000000..d0abaa7 --- /dev/null +++ b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/calendar.gif diff --git a/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/calendar.png b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/calendar.png Binary files differnew file mode 100644 index 0000000..0245536 --- /dev/null +++ b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/calendar.png diff --git a/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_glass_100_f6f6f6_1x400.png b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_glass_100_f6f6f6_1x400.png Binary files differnew file mode 100644 index 0000000..9b383f4 --- /dev/null +++ b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_glass_100_f6f6f6_1x400.png diff --git a/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_glass_100_fdf5ce_1x400.png b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_glass_100_fdf5ce_1x400.png Binary files differnew file mode 100644 index 0000000..a23baad --- /dev/null +++ b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_glass_100_fdf5ce_1x400.png diff --git a/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_glass_65_ffffff_1x400.png b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_glass_65_ffffff_1x400.png Binary files differnew file mode 100644 index 0000000..42ccba2 --- /dev/null +++ b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_glass_65_ffffff_1x400.png diff --git a/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_gloss-wave_35_f6a828_500x100.png Binary files differnew file mode 100644 index 0000000..39d5824 --- /dev/null +++ b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_gloss-wave_35_f6a828_500x100.png diff --git a/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_highlight-soft_100_eeeeee_1x100.png Binary files differnew file mode 100644 index 0000000..f127367 --- /dev/null +++ b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_highlight-soft_100_eeeeee_1x100.png diff --git a/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_highlight-soft_75_ffe45c_1x100.png Binary files differnew file mode 100644 index 0000000..359397a --- /dev/null +++ b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-bg_highlight-soft_75_ffe45c_1x100.png diff --git a/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-icons_ef8c08_256x240.png b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-icons_ef8c08_256x240.png Binary files differnew file mode 100644 index 0000000..85e63e9 --- /dev/null +++ b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-icons_ef8c08_256x240.png diff --git a/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-icons_ffffff_256x240.png b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-icons_ffffff_256x240.png Binary files differnew file mode 100644 index 0000000..42f8f99 --- /dev/null +++ b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/images/ui-icons_ffffff_256x240.png diff --git a/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/jquery-ui.css b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/jquery-ui.css new file mode 100644 index 0000000..45b7bfc --- /dev/null +++ b/97suifangqa/apps/indicator/static/plugins/jquery-ui/themes/97suifang/jquery-ui.css @@ -0,0 +1,383 @@ +/* + * jQuery UI CSS Framework 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } +.ui-helper-clearfix:after { clear: both; } +.ui-helper-clearfix { zoom: 1; } +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } +.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } +.ui-widget-content a { color: #333333; } +.ui-widget-header { border: 1px solid #b8db71; background: #99CC33; color: #ffffff; font-weight: bold; } +.ui-widget-header a { color: #ffffff; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #4c4948; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #006699; background: #cce0eb; font-weight: bold; color: #006699; } +.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } + +/* Overlays */ +.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } +.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* + * jQuery UI Resizable 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; } +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* + * jQuery UI Selectable 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } +/* + * jQuery UI Datepicker 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; cursor: pointer;} +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +}
\ No newline at end of file diff --git a/97suifangqa/apps/indicator/static/plugins/qtip2/qtip.97suifang.css b/97suifangqa/apps/indicator/static/plugins/qtip2/qtip.97suifang.css new file mode 100644 index 0000000..91f6e27 --- /dev/null +++ b/97suifangqa/apps/indicator/static/plugins/qtip2/qtip.97suifang.css @@ -0,0 +1,12 @@ +/* + * 97suifang style customizations + * for qtip2 plugin + */ + +.qtip-sf .qtip-close { + border-radius: 0; + border-width: 0; + border-style: none; + border-color: transparent; +} + diff --git a/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html b/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html index 515adcc..24d8078 100644 --- a/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html +++ b/97suifangqa/apps/indicator/templates/indicator/NewDeleteIndex.html @@ -13,6 +13,8 @@ {% endblock %} {% block scripts %} + <script type="text/javascript" src="{% static "plugins/moment/moment.min.js" %}"></script> + <script type="text/javascript" src="{% static "plugins/moment/lang/zh-cn.js" %}"></script> <script type="text/javascript" src="{% static "javascripts/new_delete_index.js" %}"></script> <script type="text/javascript" src="{% static "plugins/thickbox/thickbox.js" %}"></script> @@ -23,14 +25,36 @@ <script> var static_url = "{{ STATIC_URL }}"; var indicator_url = "/indicator/"; + + // default the language to English + moment.lang('en'); + // default date format + var mm_date_fmt = "YYYY-MM-DD"; </script> {% endblock %} {% block page %} - <!-- - <iframe align="left" width="420" height="720" src="SideBar.html" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> - --> - <iframe align="left" width="420" height="720" src="{% url indicator_sidebar %}" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> + <iframe align="left" width="420" height="1020" style="position:fixed;left:0;top:0;z-index:99;" src="{% url indicator_sidebar %}" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> + + <!-- TODO --> + <div id="login_container"> + <div class="logged-in" id="login"> + <img class="user-photo" alt="" src="{% static "images/userPhoto.jpg" %}"> + <span class="number-block green-block user-level">6</span> + <span class="drop-down-area"> + <span class="user-name">username</span> + <img class="drop-down-menu-button" alt="" src="{% static "images/icon_down.png" %}"> + </span> + <div class="drop-down-menu" tabindex="0" onblur="javascript:alert('blur');" onfocus="javascript:alert('focus')"> + <div class="text-pointer"></div> + <ul class="links"> + <li><a href="javascript:void(0)">修改密码</a></li> + <li><a href="javascript:void(0)">完善信息</a></li> + <li class="last"><a href="javascript:void(0)">退出</a></li> + </ul> + </div> + </div> + </div> {% comment %} Description: @@ -42,7 +66,7 @@ <div class="new_delete_title"> <div class="content">添加或删除关注指标</div> <div class="search"> - <input type="text" value="" placeholder="直接搜索指标" id="search_kw" autocomplete="off" /> + <input type="text" value="" placeholder="直接搜索指标" id="search_kw" /> <img id="search_btn" src="{% static "images/search.png" %}"> </div> <div style="clear: both;"></div> @@ -50,7 +74,7 @@ <div class="index_navigation"> <!-- 所有指标 --> - <div class="index_type {% if page_condition == "all" %}selected{% endif %}"> + <div id="index_all" class="index_type {% if page_condition == "all" %}selected{% endif %}"> <a href="?tab=all">所有指标</a> </div> <!-- 指标类别,页面只能容纳 7 个 --> @@ -105,7 +129,7 @@ {% for l in letters %} {% with l_inds=indicators|dict_get:l %} {% if l_inds|length >= 1 %} - <div class="index_lines {{ l|upper }}"> + <div class="index_lines {{ l|upper }} to_add"> <div class="letter_title">{{ l|upper }}</div> {% for ind in l_inds %} <div class="index_line" index_id="{{ ind|dict_get:"id" }}"> @@ -129,12 +153,14 @@ <div class="category_condition" style="display: {% if page_condition == "category" %}block{% else %}none{% endif %};"> <div class="index_title_container"> <div class="index_title">{{ selected_category.name }}</div> - <div class="example_sheet">仿真化验单</div> + <div class="example_sheet"> + <a href="javascript:void(0)">仿真化验单</a> + </div> <div style="clear:both;"></div> </div> <!-- list of indicators of the category --> {% if page_condition == "category" %} - <div class="index_lines left"> + <div class="index_lines left to_add"> {% for ind in indicators %} <div class="index_line" index_id="{{ ind.id }}"> <div class="index_name">{{ ind.name }}</div> @@ -158,7 +184,7 @@ </div> <!-- list of indicators returned by search --> {% if page_condition == "search" %} - <div class="index_lines left"> + <div class="index_lines left to_add"> {# 'indicators': list made up by the dumps of indicator #} {# check if search keyword empty & if search result empty #} {% if search_kw_empty %} @@ -188,7 +214,7 @@ {% endfor %} {% endif %} </div> <!-- end: index_lines left --> - {% endif %} {# end: page_condition == "search" #} + {% endif %} {# end: page_condition #} </div> <!-- end: search_condition --> </div> <!-- end: index_container --> @@ -196,6 +222,7 @@ <div class="index_container"> <div class="index_title_container"> <div class="index_title">已关注指标</div> + {% comment %} <div class="index_btn"> <form id="index_form" method="post" action=""> {% csrf_token %} @@ -203,9 +230,10 @@ <input type="hidden" id="commit_index" name="commit_index" value="" /> </form> </div> + {% endcomment %} <div style="clear:both;"></div> </div> - <div class="index_lines right"> + <div class="index_lines right to_minus"> <!-- followed indicators for logged in user --> {% for fi in followed_indicators %} <div class="index_line" index_id="{{ fi|dict_get:"id" }}"> @@ -218,13 +246,12 @@ </div> <!-- end: index_container --> <div style="clear:both;"></div> </div> <!-- end: show_indexes --> + </div> <!-- end: new_delete_container --> - <div class="link_container"> - <div class="status_link"> - <a href="{% url indicator_status %}">查看指标状态</a> - </div> + <div class="link_container"> + <div class="status_link"> + <a href="{% url indicator_status %}">查看指标状态</a> </div> - </div> {% endblock page %} diff --git a/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html b/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html index 97f2d62..653fde3 100644 --- a/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html +++ b/97suifangqa/apps/indicator/templates/indicator/SheetDefault.html @@ -8,17 +8,19 @@ {% endblock %} {% block css %} - <link rel="stylesheet" type="text/css" href="{% static "css/normalize.css" %}"/> + <link rel="stylesheet" type="text/css" href="{% static "css/normalize.css" %}" /> <!-- - <link rel="stylesheet" type="text/css" href="{% static "plugins/datepicker/datepicker.css" %}"/> + <link rel="stylesheet" type="text/css" href="{% static "plugins/datepicker/datepicker.css" %}" /> --> <!-- - <link rel="stylesheet" type="text/css" href="{% static "plugins/jquery-ui/themes/base/minified/jquery.ui.core.min.css" %}"/> - <link rel="stylesheet" type="text/css" href="{% static "plugins/jquery-ui/themes/base/minified/jquery.ui.datepicker.min.css" %}"/> + <link rel="stylesheet" type="text/css" href="{% static "plugins/jquery-ui/themes/base/minified/jquery.ui.core.min.css" %}" /> + <link rel="stylesheet" type="text/css" href="{% static "plugins/jquery-ui/themes/base/minified/jquery.ui.datepicker.min.css" %}" /> --> - <link rel="stylesheet" type="text/css" href="{% static "plugins/jquery-ui/themes/smoothness/jquery-ui.min.css" %}"/> - <link rel="stylesheet" type="text/css" href="{% static "plugins/thickbox/thickbox.css" %}"/> - <link rel="stylesheet" type="text/css" href="{% static "css/sheet_default.css" %}"/> + <link rel="stylesheet" type="text/css" href="{% static "plugins/jquery-ui/themes/97suifang/jquery-ui.css" %}" /> + <link rel="stylesheet" type="text/css" href="{% static "plugins/thickbox/thickbox.css" %}" /> + <link rel="stylesheet" type="text/css" href="{% static "plugins/qtip2/jquery.qtip.min.css" %}" /> + <link rel="stylesheet" type="text/css" href="{% static "plugins/qtip2/qtip.97suifang.css" %}" /> + <link rel="stylesheet" type="text/css" href="{% static "css/sheet_default.css" %}" /> {% endblock %} {% block scripts %} @@ -35,7 +37,8 @@ <!-- library for parsing, validating, manipulating, and formatting dates --> <script type="text/javascript" src="{% static "plugins/moment/moment.min.js" %}"></script> <script type="text/javascript" src="{% static "plugins/moment/lang/zh-cn.js" %}"></script> - <script type="text/javascript" src="{% static "javascripts/sheetdefault.js" %}"></script> + <script type="text/javascript" src="{% static "plugins/qtip2/jquery.qtip.min.js" %}"></script> + <script type="text/javascript" src="{% static "javascripts/sheet_default.js" %}"></script> <script type="text/javascript" src="{% static "javascripts/card_chart.js" %}"></script> <!-- global variables @@ -79,6 +82,17 @@ var card_2_delete_id = "-1"; // track the id of card to be deleted (string) // regex to match float number in expoential notation var exp_regex = /^([+-]?)(\d\.\d+)[eE]\+?(-?)0*([1-9]+)$/; + // range symbol: <low_num> <symbol> <high_num> + var range_symbol = '~'; + + // indicator DATA_TYPES + var DATA_TYPES_JS = $.parseJSON('{{ DATA_TYPES_json|safe }}'); + // dataTypes of indicators + var datatypes = $.parseJSON('{{ datatypes_json|safe }}'); + // recordempty of indicators + var recordempty = $.parseJSON('{{ recordempty_json|safe }}'); + // confines of indicators + var confines = $.parseJSON('{{ confines_json|safe }}'); // get indicator records data and // draw the chart {{{ @@ -259,12 +273,35 @@ {% endblock %} {% block page %} - <iframe align="left" width="420" height="720" src="{% url indicator_sidebar %}" style="position:fixed;left:0;top:0" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> + {% csrf_token %} + + <iframe align="left" width="420" height="1020" src="{% url indicator_sidebar %}" style="position:fixed;left:0;top:0;z-index:99;" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> + + <!-- TODO --> + <div id="login_container"> + <div class="logged-in" id="login"> + <img class="user-photo" alt="" src="{% static "images/userPhoto.jpg" %}" /> + <span class="number-block green-block user-level">6</span> + <span class="drop-down-area"> + <span class="user-name">username</span> + <img class="drop-down-menu-button" alt="" src="{% static "images/icon_down.png" %}" /> + </span> + <div class="drop-down-menu" tabindex="0" onblur="javascript:alert('blur');" onfocus="javascript:alert('focus')"> + <div class="text-pointer"></div> + <ul class="links"> + <li><a href="javascript:void(0)">修改密码</a></li> + <li><a href="javascript:void(0)">完善信息</a></li> + <li class="last"><a href="javascript:void(0)">退出</a></li> + </ul> + </div> + </div> + </div> <div id="right_container"> <div id="index_status_container"> <div class="index_title">指标状态</div> + {% comment %} <!-- 这里需要后端读取cookie,来判断用户是否已经点击大叉。 若否,则显示;若是,则隐藏 --> @@ -272,93 +309,120 @@ <div class="content">以下可能是您感兴趣的指标,您可以点击卡片右上角“X”,取消关注。</div> <div class="close_icon" id="index_title_closed_icon"></div> </div> + {% endcomment %} <!-- 左边的卡片加一个class "index_card_fir", 右边的卡片加一个class "index_card_sec" --> <!-- 卡片div的id为 "index_card_卡片id",方便后续操作 --> {% for ind in indicators %} - <div class="index_card {% cycle 'index_card_fir' 'index_card_sec' %}" id="index_card_{{ ind|dict_get:"id" }}"> + <div class="index_card {% cycle 'index_card_fir' 'index_card_sec' %} {% if ind|dict_get:"recommended" %}recommended{% endif %} {% if ind|dict_get:"record_empty" %}record_empty{% endif %}" id="index_card_{{ ind|dict_get:"id" }}"> <div class="card_title">{{ ind|dict_get:"name" }}</div> <div class="refer_range"> <span class="refer_text">{{ ind|dict_get:"ref_text" }}</span> <span class="refer_value">{{ ind|dict_get:"ref_value"|safe }}</span> <span class="data_unit">{% if ind|dict_get:"std_unit_symbol" %}({{ ind|dict_get:"std_unit_symbol" }}){% endif %}</span> </div> - {% if ind|dict_get:"record_empty" %} {# vim: {{{ #} - {# if no record, then hide 'last_edit_data' #} - <!-- "record_empty": True --> - <div class="edit_data"> - <div class="last_edit_data" style="display: none;"> - <span class="last_data">Null</span> - <span class="data_unit">{% if ind|dict_get:"std_unit_symbol" %}({{ ind|dict_get:"std_unit_symbol" }}){% endif %}</span> - </div> - <img class="small_edit_icon" src="{% static "images/pen.png" %}" /> - <img class="explain_icon" src="{% static "images/nodata.png" %}" /> - </div> <!-- end: edit_data --> - <div class="editing_data"> - <div class="input_container"> - <input class="edit_input_main" type="text" value="0" /> - x 10^ - <input class="edit_input_sub" type="text" value="0" /> - </div> - <div class="add_minus_icon"> - <div class="add_icon"></div> - <div class="minus_icon"></div> - </div> - <div class="data_unit">{% if ind|dict_get:"std_unit_symbol" %}({{ ind|dict_get:"std_unit_symbol" }}){% endif %}</div> - <div class="confirm_edit_icon"></div> - <div class="cancel_edit_icon"></div> - </div> <!-- end: editing_data --> - <!-- hints to get started, display when has no record --> - <div class="edit_icon_container"> - <div class="edit_icon"></div> - <div class="curve_icon"></div> - <div style="clear:both;"></div> - </div> - <div class="edit_text">点击右上角的按钮开始添加数据</div> - {# vim: }}} #} - {% else %} {# record_empty == False; vim: {{{ #} + + <div class="edit_data"> + {% if ind|dict_get:"record_empty" %} + {# record_empty==True, hide 'last_edit_data' #} + <div class="last_edit_data" style="display: none;"> + {% else %} {# indicator has records #} - <!-- "record_empty": False --> - <div class="edit_data"> - <div class="last_edit_data" style="display: block;"> - <span class="last_data">{{ ind|dict_get:"last_record"|dict_get:"value_str"|safe }}</span> - <span class="data_unit">{% if ind|dict_get:"std_unit_symbol" %}({{ ind|dict_get:"std_unit_symbol" }}){% endif %}</span> - </div> - <img class="small_edit_icon" src="{% static "images/pen.png" %}" /> - <img class="explain_icon" src="{% static "images/last_edit_data.png" %}" /> - </div> <!-- end: edit_data --> - <div class="editing_data"> - <div class="input_container"> - <input class="edit_input_main" type="text" value="" autocomplete="off" /> - x 10^ - <input class="edit_input_sub" type="text" value="" autocomplete="off" /> - </div> - <div class="add_minus_icon"> - <div class="add_icon"></div> - <div class="minus_icon"></div> - </div> - <div class="data_unit">{% if ind|dict_get:"std_unit_symbol" %}({{ ind|dict_get:"std_unit_symbol" }}){% endif %}</div> - <div class="confirm_edit_icon"></div> - <div class="cancel_edit_icon"></div> - </div> <!-- end: editing_data --> - <div class="refresh_data"> - <div class="refresh_text"> - 记录日期: {{ ind|dict_get:"last_record"|dict_get:"date" }} + <div class="last_edit_data" style="display: block;"> + {% endif %} + <span class="data_value">{{ ind|dict_get:"last_record"|dict_get:"value_html"|safe }}</span> + <span class="data_unit">{% if ind|dict_get:"std_unit_symbol" %}({{ ind|dict_get:"std_unit_symbol" }}){% endif %}</span> + </div> + <img class="small_edit_icon" src="{% static "images/pen.png" %}" /> + <!-- explain_icon --> + {% if ind|dict_get:"record_empty" %} + <img class="explain_icon nodata_icon" src="{% static "images/nodata.png" %}" style="display: block;" /> + <img class="explain_icon lastdata_icon" src="{% static "images/last_edit_data.png" %}" style="display: none;" /> + {% else %} + <img class="explain_icon nodata_icon" src="{% static "images/nodata.png" %}" style="display: none;" /> + <img class="explain_icon lastdata_icon" src="{% static "images/last_edit_data.png" %}" style="display: block;" /> + {% endif %} + <div style="clear:both;"></div> + <!-- last edit date --> + {% if ind|dict_get:"record_empty" %} + <div class="last_edit_date" style="display: none;"> + {% else %} + <div class="last_edit_date" style="display: block;"> + {% endif %} + <span class="date_prompt">记录日期</span> + <span class="date_value">{{ ind|dict_get:"last_record"|dict_get:"date" }}</span> + </div> + <!-- refresh icon --> + {% if ind|dict_get:"record_empty" %} + <div class="refresh_icon" style="display: none;"></div> + {% else %} + <div class="refresh_icon" style="display: block;"></div> + {% endif %} + <div style="clear:both;"></div> + </div> <!-- end: edit_data --> + + <div class="editing_data"> + <div class="data data_type_{{ ind|dict_get:"dataType" }}"> + <!-- <div class="prompt">记录</div> --> + {% if ind|dict_get:"dataType" == DATA_TYPES|dict_get:"INTEGER_TYPE" %} + {# INTEGER_TYPE #} + TODO + {% elif ind|dict_get:"dataType" == DATA_TYPES|dict_get:"FLOAT_TYPE" %} + {# FLOAT_TYPE #} + <input class="data_input to_validate" type="text" value="" autocomplete="off" /> + {% elif ind|dict_get:"dataType" == DATA_TYPES|dict_get:"RANGE_TYPE" %} + {# RANGE_TYPE #} + <input class="data_input to_validate" type="text" value="" autocomplete="off" /> + {% elif ind|dict_get:"dataType" == DATA_TYPES|dict_get:"FLOAT_RANGE_TYPE" %} + {# FLOAT_RANGE_TYPE #} + <input class="data_input to_validate" type="text" value="" autocomplete="off" /> + {% elif ind|dict_get:"dataType" == DATA_TYPES|dict_get:"PM_TYPE" %} + {# PM_TYPE #} + <div class="radio_input to_validate"> + <input type="radio" id="minus_r" name="pm_data" value="-" /> + <label for="minus_r">阴性(-)</label> + <input type="radio" id="plus_r" name="pm_data" value="+" /> + <label for="plus_r">阳性(+)</label> </div> - <div class="refresh_icon"></div> - <div style="clear:both;"></div> + {% else %} + {# UNKNOWN TYPE #} + ERROR: unknown data type + {% endif %} </div> - <div class="select_date"> - <input class="datepicker" type="text" autocomplete="off" /> + <div class="data_unit">{% if ind|dict_get:"std_unit_symbol" %}({{ ind|dict_get:"std_unit_symbol" }}){% endif %}</div> + <div class="confirm_edit_icon"></div> + <div class="cancel_edit_icon"></div> + <div style="clear:both;"></div> + <div class="date"> + <div class="datepicker_container"> + <input class="datepicker date_input to_validate" type="text" autocomplete="off" /> + </div> </div> - <!-- chart rendered by Highcharts --> - <div class="chart" id="chart_{{ ind|dict_get:"id" }}"></div> - {% endif %} {# end: record_empty; vim: }}} #} + </div> <!-- end: editing_data --> + + <!-- edit_hint --> + {% if ind|dict_get:"record_empty" %} + <div class="edit_icon_container" style="display: block;"> + {% else %} + <div class="edit_icon_container" style="display: none;"> + {% endif %} + <div class="edit_icon"></div> + <div class="curve_icon"></div> + <div style="clear:both;"></div> + <div class="edit_text">点击右上角的按钮开始添加数据</div> + <div style="clear:both;"></div> + </div> + <!-- chart rendered by Highcharts --> + {% if ind|dict_get:"record_empty" %} + <div class="chart" id="chart_{{ ind|dict_get:"id" }}" style="display: none;"></div> + {% else %} + <div class="chart" id="chart_{{ ind|dict_get:"id" }}" style="display: block;"></div> + {% endif %} <div class="card_bottom"> - <div class="understand_index"><a class="thickbox" href="{% url indicator_indexdesc %}?card_id={{ ind|dict_get:"id" }}&url_type=html&no_title=true&TB_iframe=true&height=351&width=630">了解该指标</a></div> + <div class="understand_index"><a class="thickbox" href="{% url indicator_indexdesc %}?card_id={{ ind|dict_get:"id" }}&url_type=html&no_title=true&TB_iframe=true&height=367&width=630">了解该指标</a></div> <!-- TODO --> <div class="simulation_sheet"><a href="{% static "images/demo_sheet.png" %}" class="thickbox">仿真化验单</a></div> <div class="detail_history"> diff --git a/97suifangqa/apps/indicator/templates/indicator/SideBar.html b/97suifangqa/apps/indicator/templates/indicator/SideBar.html index b1e3b34..95ad4e9 100644 --- a/97suifangqa/apps/indicator/templates/indicator/SideBar.html +++ b/97suifangqa/apps/indicator/templates/indicator/SideBar.html @@ -44,28 +44,15 @@ </form> </div> <div class="similar_container"> - <div class="vertical_bar_component"> - <div class="v_b_c_top"></div> - <div class="v_b_c_middle"> - <div class="v_b_c_middle_top"></div> - <div class="v_b_c_middle_middle"></div> - <div class="v_b_c_middle_bottom"></div> - </div> - <div class="v_b_c_bottom"></div> - <div class="cycle1"> - <div class="cycle1_out"></div> - <div class="cycle1_in"></div> - </div> - <div class="cycle2"></div> - <div class="cycle3"></div> - <div class="cycle4"></div> - </div> + <div class="vertical_bar_component"> + <img src="{% static "images/gradient_bar.png" %}" /> + </div> <div class="similar_content"> <div class="similar_title">经比对,下文中的被研究患者与您很像:</div> - <div class="specifix_content"><div class="specifix_text">有 80% 的患者有感到头疼</div></div> - <div class="specifix_content"><div class="specifix_text">有 10% 的患者有感到头疼并且也感觉到肌疼</div></div> - <div class="specifix_content"><div class="specifix_text">有 20% 的患者ALT到达过正常值</div></div> - <div class="specifix_content"><div class="specifix_text">有 3% 的患者有感到肌疼</div></div> + <div class="specifix_content" id="specifix_content1"><div class="specifix_text">有 80% 的患者有感到头疼</div></div> + <div class="specifix_content" id="specifix_content2"><div class="specifix_text">有 10% 的患者有感到头疼并且也感觉到肌疼</div></div> + <div class="specifix_content" id="specifix_content3"><div class="specifix_text">有 20% 的患者ALT到达过正常值</div></div> + <div class="specifix_content" id="specifix_content4"><div class="specifix_text">有 3% 的患者有感到肌疼</div></div> </div> </div> <div class="clear"></div> diff --git a/97suifangqa/apps/indicator/templates/indicator/popup/EditHistoryData.html b/97suifangqa/apps/indicator/templates/indicator/popup/EditHistoryData.html index 340057b..7c530ea 100644 --- a/97suifangqa/apps/indicator/templates/indicator/popup/EditHistoryData.html +++ b/97suifangqa/apps/indicator/templates/indicator/popup/EditHistoryData.html @@ -8,7 +8,7 @@ {% block css %} <link rel="stylesheet" type="text/css" href="{% static "css/normalize.css" %}" /> - <link rel="stylesheet" type="text/css" href="{% static "plugins/jquery-ui/themes/smoothness/jquery-ui.min.css" %}" /> + <link rel="stylesheet" type="text/css" href="{% static "plugins/jquery-ui/themes/97suifang/jquery-ui.css" %}" /> <link rel="stylesheet" type="text/css" href="{% static "plugins/qtip2/jquery.qtip.min.css" %}" /> <link rel="stylesheet" type="text/css" href="{% static "css/edit_history_data.css" %}" /> {% endblock %} @@ -36,7 +36,7 @@ // record id var record_id = {{ record_obj.id }}; // indicator DATA_TYPES - var DATA_TYPES = { + var DATA_TYPES_JS = { 'INTEGER_TYPE': '{{ indicator_obj.INTEGER_TYPE }}', 'FLOAT_TYPE': '{{ indicator_obj.FLOAT_TYPE }}', 'RANGE_TYPE': '{{ indicator_obj.RANGE_TYPE }}', @@ -100,18 +100,6 @@ <input class="datepicker date_input to_validate" id="editing_date_picker" type="text" value="{{ record_dict|dict_get:"date" }}" /> </div> </div> - <!-- - <div class="input_container"> - <div class="prompt">修改记录</div> - <input class="edit_input_main" type="text" value="" autocomplete="off" /> - x10^ - <input class="edit_input_sub" type="text" value="" autocomplete="off" /> - </div> - <div class="add_minus_icon"> - <div class="add_icon"></div> - <div class="minus_icon"></div> - </div> - --> <div class="data data_type_{{ indicator_obj.dataType }}"> <div class="prompt">修改记录</div> {% if indicator_obj.dataType == indicator_obj.INTEGER_TYPE %} @@ -134,16 +122,6 @@ <input type="radio" id="plus_r" name="pm_data" value="+" /> <label for="plus_r">阳性(+)</label> </div> - <!-- - <div class="radio_input"> - <span class="radio_s"><input class="to_validate" type="radio" name="pm_data" value="minus" /></span> - <span class="radio_text">阴性(-)</span> - </div> - <div class="radio_input"> - <span class="radio_s"><input class="to_validate" type="radio" name="pm_data" value="plus" /></span> - <span class="radio_text">阳性(+)</span> - </div> - --> {% else %} {# UNKNOWN TYPE #} ERROR: unknown data type diff --git a/97suifangqa/apps/indicator/templates/indicator/popup/IndexDesc.html b/97suifangqa/apps/indicator/templates/indicator/popup/IndexDesc.html index 181c678..0d3f62c 100644 --- a/97suifangqa/apps/indicator/templates/indicator/popup/IndexDesc.html +++ b/97suifangqa/apps/indicator/templates/indicator/popup/IndexDesc.html @@ -23,6 +23,9 @@ {% if annotation_not_found %} {# change cursor style #} $("#collection_btn").css('cursor', 'auto'); + $("#collection_btn").html(''); + $("#collection_btn").removeClass('collection'); + $("#collection_btn").addClass('collection_no_annotation'); {% else %} {# annotation found #} $("#collection_btn").bind("update", function(e) { diff --git a/97suifangqa/apps/indicator/tools.py b/97suifangqa/apps/indicator/tools.py index 883c2f2..1a9e6ab 100644 --- a/97suifangqa/apps/indicator/tools.py +++ b/97suifangqa/apps/indicator/tools.py @@ -28,6 +28,7 @@ def follow_indicator(user_id, indicator_id): # to remove the indicator from 'followedHistories' if exists if indicator in ui.followedHistories.all(): ui.followedHistories.remove(indicator) + ui.save() return True except: return False @@ -46,6 +47,7 @@ def unfollow_indicator(user_id, indicator_id): ui.followedIndicators.remove(indicator) # add indicator to 'followedHistories' ui.followedHistories.add(indicator) + ui.save() return True except: return False @@ -106,6 +108,7 @@ def get_followed_indicator(user_id, category_id="all", startswith="all"): u = User.objects.get(id=user_id) ui, created = im.UserIndicator.objects.get_or_create(user=u) + ui.save() _idict = {} iqueryset = ui.followedIndicators.all() if not category_id == 'all': @@ -141,6 +144,7 @@ def get_unfollowed_indicator(user_id, category_id="all", startswith="all"): u = User.objects.get(id=user_id) ui, created = im.UserIndicator.objects.get_or_create(user=u) + ui.save() _idict = {} # XXX: if 'exclude(followed_indicators=ui)' OK?? iqueryset = im.Indicator.objects.exclude(followed_indicators=ui) @@ -443,6 +447,7 @@ def add_recordhistory(user_id, record_id, reason, created_at=None): return True # }}} + # types of recommended indicators, and weights {{{ RI_TYPES = { 'ANNOTATION_COLLECTED': u'ANN_CL', @@ -515,11 +520,14 @@ def calc_indicator_weight(user_id, indicator_id): # recommend_indicator {{{ -def recommend_indicator(user_id, number): +def recommend_indicator(user_id, number=1, auto_follow=False): """ recommend unfollowed indicator for user, based on his/her readings and collections. + if auto_follow=True, then the recommended indicators are + followed automatically. + return a list of recommended indicators in format: [ {'id': id, 'weight': w, 'type': t}, ... ] """ @@ -528,7 +536,7 @@ def recommend_indicator(user_id, number): # get unfollowed indicators u = User.objects.get(id=user_id) ui, created = im.UserIndicator.objects.get_or_create(user=u) - # XXX: if 'exclude(followed_indicators=ui)' OK?? + # XXX: is 'exclude(followed_indicators=ui)' OK?? uf_ind_qs = im.Indicator.objects.exclude(followed_indicators=ui) # calc weight for each unfollowed indicator weights = [] @@ -542,8 +550,19 @@ def recommend_indicator(user_id, number): # sort 'weights' dict list by key 'weight' weights_sorted = sorted(weights, key=lambda item: item['weight']) weights_sorted.reverse() - # return results with largest weights - return weights_sorted[:number] + # results with largest weights + results = weights_sorted[:number] + # update 'lastRecommendTime' of 'UserIndicator' + now_utc = datetime.datetime.utcnow().replace(tzinfo=utc) + ui.lastRecommendTime = now_utc + # updated followedIndicators of 'auto_follow=True' + if auto_follow: + for wi in results: + follow_indicator(user_id, wi['id']) + # save 'UserIndicator' + ui.save() + # + return results # }}} @@ -676,3 +695,4 @@ def format_data(indicator_obj, value=None, val_max=None, val_min=None, type="htm return value_str # }}} + diff --git a/97suifangqa/apps/indicator/urls.py b/97suifangqa/apps/indicator/urls.py index 5c4f5af..cd53b39 100644 --- a/97suifangqa/apps/indicator/urls.py +++ b/97suifangqa/apps/indicator/urls.py @@ -77,6 +77,10 @@ urlpatterns += patterns('indicator.views', url(r'^ajax/act_index/$', 'ajax_act_index', name='indicator_ajax_actindex'), + # add_record + url(r'^ajax/add_record/$', + 'ajax_add_record', + name='indicator_ajax_addrecord'), # close_sub_title # close the small prompt banner above the indicator cards url(r'^ajax/close_sub_title/$', @@ -94,6 +98,10 @@ urlpatterns += patterns('indicator.views', url(r'^ajax/modify_record/$', 'ajax_modify_record', name='indicator_ajax_modifyrecord'), + # search_indicators + url(r'^ajax/search_indicators/$', + 'ajax_search_indicators', + name='indicator_ajax_searchindicators'), # unfollow_indicator url(r'^ajax/unfollow_indicator/$', 'ajax_unfollow_indicator', diff --git a/97suifangqa/apps/indicator/views.py b/97suifangqa/apps/indicator/views.py index aa51663..8d46537 100644 --- a/97suifangqa/apps/indicator/views.py +++ b/97suifangqa/apps/indicator/views.py @@ -422,9 +422,11 @@ def indicator_status(request): add/edit/view indicator data TODO: - * when to recommend indicators * how to deal with non-standard units """ + # period between two recommendation of indicators (default 40 days) + recommend_period = 40 + # template = 'indicator/SheetDefault.html' letters = map(chr, range(ord('a'), ord('z')+1)) # indicators @@ -437,19 +439,83 @@ def indicator_status(request): # convert to list for l in letters: followed_indicators += followed_indicators_pdict[l] - - ## TODO: when to recommend indicators for user ?? + # add key 'recommended', False + for ind in followed_indicators: + ind['recommended'] = False + + ## XXX: recommend indicators for user {{{ + now_utc = datetime.datetime.utcnow().replace(tzinfo=utc) + ui, created = im.UserIndicator.objects.get_or_create( + user=request.user) + ui.save() + # lastRecommendTime + if ui.lastRecommendTime: + td_lastrecommend = now_utc - ui.lastRecommendTime + else: + td_lastrecommend = None + # sciblog.models.UserCollection + uc, created = sm.UserCollection.objects.get_or_create( + user=request.user) + uc.save() + # lastCollectAnnotationTime + if uc.lastCollectAnnotationTime: + td_lastcollectannotation = (uc.lastCollectAnnotationTime + - ui.lastRecommendTime) + else: + td_lastcollectannotation = None + # lastCatchBlogTime + if uc.lastCatchBlogTime: + td_lastcatchblog = uc.lastCatchBlogTime - ui.lastRecommendTime + else: + td_lastcatchblog = None + # lastCollectBlogTime + if uc.lastCollectBlogTime: + td_lastcollectblog = uc.lastCollectBlogTime - ui.lastRecommendTime + else: + td_lastcollectblog = None + ## if not followed_indicators: # if no followed indicators yet, then recommend 2 indicators r_indicators_unsort = [ im.Indicator.objects.get(id=ri['id']).dump() - for ri in recommend_indicator(request.user.id, 2) + for ri in recommend_indicator(request.user.id, + number=2, auto_follow=True) + ] + elif (td_lastrecommend is not None and \ + td_lastrecommend.days > recommend_period): + # excess the 'recommend_period' + r_indicators_unsort = [ + im.Indicator.objects.get(id=ri['id']).dump() + for ri in recommend_indicator(request.user.id, + number=1, auto_follow=True) + ] + elif ( (td_lastcollectannotation is not None and \ + td_lastcollectannotation.total_seconds() > 0) \ + or (td_lastcatchblog is not None and \ + td_lastcatchblog.total_seconds() > 0) \ + or (td_lastcollectblog is not None and \ + td_lastcollectblog.total_seconds() > 0) ): + # user has new collections + # TODO: to improve the relations between recommended indicators + # with the user's new collections + r_indicators_unsort = [ + im.Indicator.objects.get(id=ri['id']).dump() + for ri in recommend_indicator(request.user.id, + number=1, auto_follow=True) ] - r_indicators= sorted(r_indicators_unsort, - key = lambda item: item['pinyin']) + else: + # no recommendation + r_indicators_unsort = [] + # sort (empty list OK) + r_indicators= sorted(r_indicators_unsort, + key = lambda item: item['pinyin']) + # add key 'recommended', True + for ind in r_indicators: + ind['recommended'] = True + # }}} - # recommended indicators behind followed ones - indicators = followed_indicators + r_indicators + # recommended indicators come first + indicators = r_indicators + followed_indicators # process 'indicators' list, to add following keys: # {{{ # ref_text: @@ -472,8 +538,12 @@ def indicator_status(request): # ref_value human_max = confine.get('human_max') human_min = confine.get('human_min') + math_max = confine.get('math_max') + math_min = confine.get('math_min') ind['ref_value'] = format_data(ind_obj, val_max=human_max, val_min=human_min, type="html") + ind['math_range_html'] = format_data(ind_obj, + val_max=math_max, val_min=math_min, type="html") # set 'std_unit_*' ind['std_unit_name'] = confine.get('unit').get('name') ind['std_unit_symbol'] = confine.get('unit').get('symbol') @@ -483,12 +553,14 @@ def indicator_status(request): val_norm = confine.get('val_norm') ind['ref_value'] = format_data(ind_obj, value=val_norm, type="html") + ind['math_range_html'] = None # std_unit ind['std_unit_name'] = u"" ind['std_unit_symbol'] = u"" else: ind['ref_text'] = u"参考" ind['ref_value'] = None + ind['math_range_html'] = None ind['std_unit_name'] = None ind['std_unit_symbol'] = None ## check record of indicator @@ -500,10 +572,10 @@ def indicator_status(request): last_record = records[0] if dataType in [ind_obj.INTEGER_TYPE, ind_obj.PM_TYPE, ind_obj.FLOAT_TYPE]: - value_str = format_data(ind_obj, + value_html = format_data(ind_obj, value=last_record.value, type="html") elif dataType == ind_obj.RANGE_TYPE: - value_str = format_data(ind_obj, + value_html = format_data(ind_obj, val_max=last_record.val_max, val_min=last_record.val_min, type="html") @@ -512,21 +584,21 @@ def indicator_status(request): val_max = last_record.val_max val_min = last_record.val_min if value is not None: - value_str = format_data(ind_obj, value=value, + value_html = format_data(ind_obj, value=value, type="html") elif (val_max is not None) and (val_min is not None): - value_str = format_data(ind_obj, + value_html = format_data(ind_obj, val_max=val_max, val_min=val_min, type="html") else: - value_str = u'' + value_html = None else: # unknow - value_str = u'' + value_html = None # save to dict ind['last_record'] = { 'date': last_record.date.isoformat(), - 'value_str': value_str, + 'value_html': value_html, } else: ind['record_empty'] = True @@ -541,10 +613,37 @@ def indicator_status(request): 'FLOAT_RANGE_TYPE': im.Indicator.FLOAT_RANGE_TYPE, 'PM_TYPE': im.Indicator.PM_TYPE, } - + # datatypes of indicators (for js) + datatypes = {} + # recordempty for indicators (for js) + recordempty = {} + # records of indicators (for js) + confines = {} + for ind in indicators: + id = ind['id'] + ind_obj = get_object_or_404(im.Indicator, id=ind['id']) + datatypes['id%d'%id] = ind_obj.dataType + # recordempty + recordempty['id%d'%id] = ind['record_empty'] + # confines + confine = ind_obj.get_confine() + confines['id%d'%id] = { + 'human_min': confine.get('human_min'), + 'human_max': confine.get('human_max'), + 'math_min': confine.get('math_min'), + 'math_max': confine.get('math_max'), + 'val_norm': confine.get('val_norm'), + 'math_range_html': ind['math_range_html'], + } + + #print "indicators: ", indicators data = { 'indicators': indicators, 'DATA_TYPES': DATA_TYPES, + 'DATA_TYPES_json': json.dumps(DATA_TYPES), + 'datatypes_json': json.dumps(datatypes), + 'recordempty_json': json.dumps(recordempty), + 'confines_json': json.dumps(confines), } # render template return render(request, template, data) @@ -750,7 +849,6 @@ def indicator_edithistorydata(request): type="html") record_value_text = format_data(ind_obj, value=record_value, type="text") - pass elif dataType == im.Indicator.FLOAT_TYPE: ref_text = u"参考范围" ref_value = format_data(ind_obj, val_max=confine_human_max, @@ -785,7 +883,6 @@ def indicator_edithistorydata(request): # TODO record_value_html = u"TODO" record_value_text = u"TODO" - pass elif dataType == im.Indicator.PM_TYPE: ref_text = u"参考值" ref_value = format_data(ind_obj, value=confine_val_norm, @@ -940,6 +1037,127 @@ def ajax_act_index(request): # }}} +# ajax_add_record {{{ +@login_required +def ajax_add_record(request): + """ + add new record for given indicator using the POSTed data + if the given date already has record, then return False + + error_code & error_string: + 1: unknown + 10: indicator_id + 20: record_exist + 30: record_invalid + """ + data = {'failed': True, 'error_code': 1, 'error_string': 'unknown'} + if request.is_ajax() and request.method == 'POST': + #print request.POST.dict() + indicator_id = request.POST.get('indicator_id') + date_str = request.POST.get('date') + value = request.POST.get('value') + val_min_str = request.POST.get('val_min') + val_max_str = request.POST.get('val_max') + # get indicator object + try: + indicator_id = int(indicator_id) + indicator_obj = get_object_or_404(im.Indicator, + id=indicator_id) + except ValueError: + data = { + 'failed': True, + 'error_code': 10, + 'error_string': 'indicator_id' + } + return HttpResponse(json.dumps(data), + mimetype='application/json') + # check if exist record + record_dt = datetime.datetime.strptime(date_str, '%Y-%m-%d') + record_d = record_dt.date() + exist_record = indicator_obj.indicator_records.filter( + date=record_d, user=request.user) + if exist_record: + data = {'failed': True, 'error_code': 20, + 'error_string': 'record_exist'} + return HttpResponse(json.dumps(data), + mimetype='application/json') + # val_min + if val_min_str: + val_min = float(val_min_str) + else: + val_min = None + # val_max + if val_max_str: + val_max = float(val_max_str) + else: + val_max = None + # create record (NOTE: use "standard" unit) + new_record = im.IndicatorRecord( + indicator=indicator_obj, + user=request.user, + date=record_d, + unit=indicator_obj.get_unit(type="standard")[0], + value=value, + val_min=val_min, + val_max=val_max, + notes=u"" + ) + if new_record.is_valid(): + # True -> Valid; save + new_record.save() + # generate result {{{ + dataType = indicator_obj.dataType + if dataType == im.Indicator.INTEGER_TYPE: + # TODO + record_value_html = format_data(indicator_obj, + value=new_record.value, type="html") + record_value_text = format_data(indicator_obj, + value=new_record.value, type="text") + elif dataType == im.Indicator.FLOAT_TYPE: + record_value_html = format_data(indicator_obj, + value=new_record.value, type="html") + record_value_text = format_data(indicator_obj, + value=new_record.value, type="text") + elif dataType == im.Indicator.RANGE_TYPE: + record_value_html = format_data(indicator_obj, + val_min=new_record.val_min, + val_max=new_record.val_max, type="html") + record_value_text = format_data(indicator_obj, + val_min=new_record.val_min, + val_max=new_record.val_max, type="text") + elif dataType == im.Indicator.FLOAT_RANGE_TYPE: + # TODO + record_value_html = u"TODO" + record_value_text = u"TODO" + elif dataType == im.Indicator.PM_TYPE: + record_value_html = format_data(indicator_obj, + value=new_record.value, type="html") + record_value_text = format_data(indicator_obj, + value=new_record.value, type="text") + else: + record_value_html = None + record_value_text = None + data = { + 'failed': False, + 'record_id': new_record.id, + 'date': new_record.date.isoformat(), + 'value': new_record.value, + 'val_min': new_record.val_min, + 'val_max': new_record.val_max, + 'value_html': record_value_html, + 'value_text': record_value_text + } + # }}} + else: + # invalid + data = {'failed': True, 'error_code': 30, + 'error_string': 'record_invalid' } + + print "data: ", data + return HttpResponse(json.dumps(data), mimetype='application/json') +# }}} + + # ajax_close_sub_title {{{ def ajax_close_sub_title(request): """ @@ -1282,6 +1500,44 @@ def ajax_get_card_data_table(request): # }}} +# ajax_search_indicators {{{ +@login_required +def ajax_search_indicators(request): + """ + search indicators + search keyword passed by 'GET' parameters + """ + data = {'failed': True, 'error_code': 1, 'error_string': 'unknow'} + if True: + #if request.is_ajax(): + if 'kw' in request.GET: + # kw: search keyword to find indicator + search_kw = request.GET.get('kw') + # check search keyword + if not search_kw.strip(): + data = {'failed': True, 'error_code': 10, + 'error_string': 'blank_keyword'} + else: + # TODO: howto order_by() by 'pinyin' + sqs = SearchQuerySet().models(im.Indicator).\ + filter(content=search_kw) + if sqs: + # search result not empty + inds_unsort = [ind.dump() + for ind in objects_of_sqs(sqs)] + indicators = sorted(inds_unsort, + key = lambda item: item['pinyin']) + # process results + data = {'failed': False, 'indicators': indicators} + else: + # search result empty + data = {'failed': True, 'error_code': 20, + 'error_string': 'result_empty', + 'empty': True} + + return HttpResponse(json.dumps(data), mimetype='application/json') +# }}} + # ajax_unfollow_indicator {{{ @login_required def ajax_unfollow_indicator(request): @@ -1313,11 +1569,17 @@ def ajax_modify_record(request): """ modify the existing record using the POSTed data and add a 'RecordHistory' for the record + + error_code & error_string: + 1: unknown + 10: record_id + 20: recordhistory + 30: record_invalid """ data = {'failed': True, 'error_code': 1, 'error_string': 'unknown'} #if request.method == 'POST': if request.is_ajax() and request.method == 'POST': - print request.POST.dict() + #print request.POST.dict() record_id = request.POST.get('record_id') date_str = request.POST.get('date') value = request.POST.get('value') @@ -1374,11 +1636,12 @@ def ajax_modify_record(request): record_obj.val_max = val_max r_flag = record_obj.is_valid() if r_flag: + # save record_obj.save() data = { 'failed': False } else: data = { 'failed': True, 'error_code': 30, - 'error_string': 'record_valid' } + 'error_string': 'record_invalid' } return HttpResponse(json.dumps(data), mimetype='application/json') # }}} @@ -1386,7 +1649,7 @@ def ajax_modify_record(request): ########################################################### -### test_view ### +### test_view ### {{{ def test_view(request, **kwargs): """ test view @@ -1413,4 +1676,5 @@ def test_view(request, **kwargs): 'boolvar': boolvar, } return render(request, template, data) +# test }}} diff --git a/97suifangqa/apps/sciblog/fixtures/initial_data.json b/97suifangqa/apps/sciblog/fixtures/initial_data.json index dc7daec..6038ffe 100644 --- a/97suifangqa/apps/sciblog/fixtures/initial_data.json +++ b/97suifangqa/apps/sciblog/fixtures/initial_data.json @@ -248,8 +248,8 @@ "sample": [], "indicators": [ 3, - 1, - 2 + 2, + 1 ], "type": 1 } diff --git a/97suifangqa/apps/sciblog/models.py b/97suifangqa/apps/sciblog/models.py index d6a63d4..8c8d0cf 100644 --- a/97suifangqa/apps/sciblog/models.py +++ b/97suifangqa/apps/sciblog/models.py @@ -330,6 +330,43 @@ class BaseLine(models.Model): # }}} +# UserCollection {{{ +class UserCollection(models.Model): + """ + record the collections/catches for user + 记录用户收藏的"注释"/"文章",以及标注看懂了的文章 + """ + user = models.OneToOneField(User, verbose_name=u"用户", + related_name="user_collection") + # collect annotation + # -> BlogAnnotation.collected_by + #collectedAnnotation = models.ManyToManyField("BlogAnnotation", + # verbose_name=u"收藏的注释", + # related_name="collected_annotations",) + lastCollectAnnotationTime = models.DateTimeField(u"上次收藏注释时间", + null=True, blank=True) + # catch blog + # -> SciBlog.catched_by + #catchedBlog = models.ManyToManyField("SciBlog", + # verbose_name=u"收藏的文章", + # related_name="catched_blogs",) + lastCatchBlogTime = models.DateTimeField(u"上次读懂文章时间", + null=True, blank=True) + # collect blog + # -> SciBlog.collected_by + #collectedBlog = models.ManyToManyField("SciBlog", + # verbose_name=u"收藏的文章", + # related_name="collected_blogs",) + lastCollectBlogTime = models.DateTimeField(u"上次收藏文章时间", + null=True, blank=True) + + class Meta: + verbose_name_plural = u"用户收藏信息" + + def __unicode__(self): + return "< UserCollection: for %s >" % self.user.username +# UserCollection }}} + admin.site.register([ Source, @@ -340,4 +377,5 @@ admin.site.register([ BaseLine, ResultContent, BlogAnnotation, + UserCollection, ]) diff --git a/97suifangqa/apps/sciblog/urls.py b/97suifangqa/apps/sciblog/urls.py index 722984b..47559d4 100644 --- a/97suifangqa/apps/sciblog/urls.py +++ b/97suifangqa/apps/sciblog/urls.py @@ -1,7 +1,10 @@ +# -*- coding: utf-8 -*- + from django.conf.urls import patterns, url -from .models import SciBlog, BlogAnnotation -from .views import * +from sciblog.models import SciBlog, BlogAnnotation +from sciblog.views import * + blog_blocks = '|'.join(['source','abstract', 'knowledge','follow', 'results', 'comment','refrences', 'test','results-detail']) urlpatterns = patterns('', @@ -11,7 +14,17 @@ urlpatterns = patterns('', url(r'^query/?$', query, name='query_blogs'), url(r'^collection/?$', blog_collection, name='blog_collection'), url(r'^(\d+)/(%s)?/?$' % blog_blocks, blog_detail, name='blog_detail'), - url(r'^(\d+)/collect/?$', add_user_to_m2m, name='blog_collect', kwargs={'m2m':'collected_by'}), - url(r'^(\d+)/understand/?$', add_user_to_m2m, name='blog_understood', kwargs={'m2m':'catched_by'}), - url(r'^annotation/(\d+)/collect/?$', add_user_to_m2m, name='annotation_collect', kwargs={'m2m':'collected_by', 'model': BlogAnnotation}), - ) + url(r'^(?P<objid>\d+)/collect/?$', + add_user_to_m2m, + name='blog_collect', + kwargs={'m2m':'collected_by', 'model': SciBlog}), + url(r'^(?P<objid>\d+)/understand/?$', + add_user_to_m2m, + name='blog_understood', + kwargs={'m2m':'catched_by', 'model': SciBlog}), + url(r'^annotation/(?P<objid>\d+)/collect/?$', + add_user_to_m2m, + name='annotation_collect', + kwargs={'m2m':'collected_by', 'model': BlogAnnotation}), +) + diff --git a/97suifangqa/apps/sciblog/views.py b/97suifangqa/apps/sciblog/views.py index 7c6a4e7..1bd7cf8 100644 --- a/97suifangqa/apps/sciblog/views.py +++ b/97suifangqa/apps/sciblog/views.py @@ -1,15 +1,19 @@ # -*- coding: utf-8 -*- -import json from django.http import HttpResponse, HttpResponseNotFound from django.views.generic.list_detail import object_detail from django.shortcuts import render, get_object_or_404 from django.contrib.auth.decorators import login_required +from django.utils.timezone import utc -from .models import SciBlog, ResultContent -from .forms import SciBlogSearchForm, ProperNounSearchForm +from sciblog import models as sm +from sciblog.forms import SciBlogSearchForm, ProperNounSearchForm from info.forms import QuerySearchForm + +import datetime import itertools +import json + def blog_detail(request, blogid, block): u''' @@ -18,10 +22,10 @@ def blog_detail(request, blogid, block): ''' block = block or "source" template = 'sciblog/blog_detail_%s.html' % block - blog = get_object_or_404(SciBlog, id=blogid) + blog = get_object_or_404(sm.SciBlog, id=blogid) blockid = block - + # 用户已经收藏? collected = request.user.is_authenticated() and blog.collected_by.filter(id=request.user.id) @@ -94,7 +98,7 @@ def query(request): (hasppnouns, ppnouns) = generator_has_content(limit(objects_of_sqs(ppnounsqs),10)) return render(request, 'sciblog/blog_list.html', locals()) else: - (has_blogs, blogs) = generator_has_content(limit(SciBlog.objects.all(),10)) + (has_blogs, blogs) = generator_has_content(limit(sm.SciBlog.objects.all(),10)) return render(request, 'sciblog/blog_list.html', locals()) @@ -109,34 +113,50 @@ def blog_collection(request): @login_required -def add_user_to_m2m(request, objid, m2m ='collected_by', model = SciBlog): +def add_user_to_m2m(request, objid, m2m='collected_by', model=sm.SciBlog): u''' 响应收藏按钮和'懂了'按钮的点击 ''' - + result = {"error":False, 'added':True} result['id'] = objid result['model'] = model._meta.verbose_name_plural + model_name = model.__name__ user = request.user try: - obj = model.objects.get(id=objid) - m2m = getattr(obj, m2m) - if not m2m.filter(id = user.id): + obj = model.objects.get(id=objid) + model_m2m = getattr(obj, m2m) + if not model_m2m.filter(id=user.id): # 还没有收藏或点击懂了 - m2m.add(user) + model_m2m.add(user) + result['added'] = True + # utc time + now_utc = datetime.datetime.utcnow().replace(tzinfo=utc) + # UserCollection + uc, created = sm.UserCollection.objects.get_or_create(user=user) + if model_name == 'SciBlog': + if m2m == 'collected_by': + uc.lastCollectBlogTime = now_utc + elif m2m == 'catched_by': + uc.lastCatchBlogTime = now_utc + elif model_name == 'BlogAnnotation': + if m2m == 'collected_by': + uc.lastCollectAnnotationTime = now_utc + # save + uc.save() else: # 已经收藏或点击了懂了 - m2m.remove(user) + model_m2m.remove(user) result['added'] = False - result['times'] = m2m.count() + result['times'] = model_m2m.count() except: result['error'] = True result['added'] = False return HttpResponse(json.dumps(result), - mimetype = 'application/json') + mimetype = 'application/json') def show_result(request, resultid): - result = get_object_or_404(ResultContent, id=resultid) + result = get_object_or_404(sm.ResultContent, id=resultid) blog = result.blog return render(request, 'sciblog/blog_detail_results-detail.html', locals()) diff --git a/97suifangqa/isuifangqa.db b/97suifangqa/isuifangqa.db Binary files differindex 229fa8f..6d37e50 100644 --- a/97suifangqa/isuifangqa.db +++ b/97suifangqa/isuifangqa.db |