Admin Columns - Version 2.2.7

Version Description

  • [Added] Added date format option for "Last modified" column
  • [Updated] Change references from Codepress Admin Columns to Admin Columns
  • [Updated] General code clean-up
  • [Improved] Documentation improvements
Download this release

Release Info

Developer engelen
Plugin Icon 128x128 Admin Columns
Version 2.2.7
Comparing to
See all releases

Code changes from version 2.2.6.4 to 2.2.7

Files changed (47) hide show
  1. README.md +0 -0
  2. assets/css/admin-column.css +9 -0
  3. assets/images/addon_sortable_1.png +0 -0
  4. assets/images/arrows.png +0 -0
  5. assets/images/checkbox.png +0 -0
  6. assets/images/checkmark.png +0 -0
  7. assets/images/checkmark_single.png +0 -0
  8. assets/images/comment_edit.png +0 -0
  9. assets/images/cross.png +0 -0
  10. assets/images/facebook.png +0 -0
  11. assets/images/icon.png +0 -0
  12. assets/images/import_export.png +0 -0
  13. assets/images/information.png +0 -0
  14. assets/images/loading.gif +0 -0
  15. assets/images/no.png +0 -0
  16. assets/images/settings.png +0 -0
  17. assets/images/sort.png +0 -0
  18. assets/images/square.png +0 -0
  19. assets/images/trash.png +0 -0
  20. assets/images/twitter.png +0 -0
  21. assets/js/upgrade.js +0 -0
  22. assets/less/admin-column.less +16 -0
  23. assets/ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  24. assets/ui-theme/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  25. assets/ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  26. assets/ui-theme/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  27. assets/ui-theme/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  28. assets/ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  29. assets/ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  30. assets/ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  31. assets/ui-theme/images/ui-icons_222222_256x240.png +0 -0
  32. assets/ui-theme/images/ui-icons_2e83ff_256x240.png +0 -0
  33. assets/ui-theme/images/ui-icons_454545_256x240.png +0 -0
  34. assets/ui-theme/images/ui-icons_888888_256x240.png +0 -0
  35. assets/ui-theme/images/ui-icons_cd0a0a_256x240.png +0 -0
  36. assets/ui-theme/jquery-ui-1.8.18.custom.css +0 -0
  37. classes/column.php +25 -3
  38. classes/column/custom-field.php +0 -20
  39. classes/column/post/modified.php +20 -3
  40. classes/settings.php +2 -5
  41. classes/storage_model.php +3 -2
  42. classes/upgrade.php +15 -1
  43. codepress-admin-columns.php +160 -146
  44. external/qtip2/jquery.qtip.css +11 -11
  45. external/qtip2/jquery.qtip.js +229 -229
  46. external/qtip2/jquery.qtip.min.js +0 -1
  47. readme.txt +11 -5
README.md DELETED
File without changes
assets/css/admin-column.css CHANGED
@@ -815,6 +815,15 @@ table.cpac-form-table td .cpac_export .ms-container ul.ms-list li {
815
  padding-top: 5px;
816
  padding-bottom: 5px;
817
  }
 
 
 
 
 
 
 
 
 
818
  /**
819
  * WP Pointer
820
  * ----------------------------------------------------------------------------
815
  padding-top: 5px;
816
  padding-bottom: 5px;
817
  }
818
+ table.cpac-form-table.settings tr td {
819
+ padding-top: 74px;
820
+ }
821
+ table.cpac-form-table.settings tr:first-child th {
822
+ padding-top: 0;
823
+ }
824
+ table.cpac-form-table.settings tr:first-child td {
825
+ padding-top: 54px;
826
+ }
827
  /**
828
  * WP Pointer
829
  * ----------------------------------------------------------------------------
assets/images/addon_sortable_1.png CHANGED
File without changes
assets/images/arrows.png CHANGED
File without changes
assets/images/checkbox.png CHANGED
File without changes
assets/images/checkmark.png CHANGED
File without changes
assets/images/checkmark_single.png CHANGED
File without changes
assets/images/comment_edit.png CHANGED
File without changes
assets/images/cross.png CHANGED
File without changes
assets/images/facebook.png CHANGED
File without changes
assets/images/icon.png CHANGED
File without changes
assets/images/import_export.png CHANGED
File without changes
assets/images/information.png CHANGED
File without changes
assets/images/loading.gif CHANGED
File without changes
assets/images/no.png CHANGED
File without changes
assets/images/settings.png CHANGED
File without changes
assets/images/sort.png CHANGED
File without changes
assets/images/square.png CHANGED
File without changes
assets/images/trash.png CHANGED
File without changes
assets/images/twitter.png CHANGED
File without changes
assets/js/upgrade.js CHANGED
File without changes
assets/less/admin-column.less CHANGED
@@ -995,6 +995,22 @@ table.cpac-form-table {
995
  }
996
  }
997
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
998
  }
999
 
1000
  /**
995
  }
996
  }
997
  }
998
+
999
+ &.settings {
1000
+ tr td {
1001
+ padding-top: 74px;
1002
+ }
1003
+
1004
+ tr:first-child {
1005
+ th {
1006
+ padding-top: 0;
1007
+ }
1008
+
1009
+ td {
1010
+ padding-top: 54px;
1011
+ }
1012
+ }
1013
+ }
1014
  }
1015
 
1016
  /**
assets/ui-theme/images/ui-bg_flat_0_aaaaaa_40x100.png CHANGED
File without changes
assets/ui-theme/images/ui-bg_flat_75_ffffff_40x100.png CHANGED
File without changes
assets/ui-theme/images/ui-bg_glass_55_fbf9ee_1x400.png CHANGED
File without changes
assets/ui-theme/images/ui-bg_glass_65_ffffff_1x400.png CHANGED
File without changes
assets/ui-theme/images/ui-bg_glass_75_dadada_1x400.png CHANGED
File without changes
assets/ui-theme/images/ui-bg_glass_75_e6e6e6_1x400.png CHANGED
File without changes
assets/ui-theme/images/ui-bg_glass_95_fef1ec_1x400.png CHANGED
File without changes
assets/ui-theme/images/ui-bg_highlight-soft_75_cccccc_1x100.png CHANGED
File without changes
assets/ui-theme/images/ui-icons_222222_256x240.png CHANGED
File without changes
assets/ui-theme/images/ui-icons_2e83ff_256x240.png CHANGED
File without changes
assets/ui-theme/images/ui-icons_454545_256x240.png CHANGED
File without changes
assets/ui-theme/images/ui-icons_888888_256x240.png CHANGED
File without changes
assets/ui-theme/images/ui-icons_cd0a0a_256x240.png CHANGED
File without changes
assets/ui-theme/jquery-ui-1.8.18.custom.css CHANGED
File without changes
classes/column.php CHANGED
@@ -79,7 +79,7 @@ class CPAC_Column {
79
  /**
80
  * Determine whether this column type should be available
81
  *
82
- * @since 2.3
83
  *
84
  * @return bool Whether the column type should be available
85
  */
@@ -139,8 +139,10 @@ class CPAC_Column {
139
 
140
  // Default options
141
  $default_options = array(
142
- 'width' => null, // Width for this column.
143
- 'state' => 'off' // Active state for this column.
 
 
144
  );
145
 
146
  /**
@@ -832,6 +834,26 @@ class CPAC_Column {
832
  return date_i18n( $format, $date );
833
  }
834
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
835
  /**
836
  * @since 2.0
837
  * @param string $field_key
79
  /**
80
  * Determine whether this column type should be available
81
  *
82
+ * @since 2.2
83
  *
84
  * @return bool Whether the column type should be available
85
  */
139
 
140
  // Default options
141
  $default_options = array(
142
+ 'before' => '', // Before field
143
+ 'after' => '', // After field
144
+ 'width' => null, // Width for this column.
145
+ 'state' => 'off' // Active state for this column.
146
  );
147
 
148
  /**
834
  return date_i18n( $format, $date );
835
  }
836
 
837
+ /**
838
+ * Get before value
839
+ *
840
+ * @since 1.0
841
+ */
842
+ public function get_before() {
843
+
844
+ return stripslashes( $this->options->before );
845
+ }
846
+
847
+ /**
848
+ * Get after value
849
+ *
850
+ * @since 1.0
851
+ */
852
+ public function get_after() {
853
+
854
+ return stripslashes( $this->options->after );
855
+ }
856
+
857
  /**
858
  * @since 2.0
859
  * @param string $field_key
classes/column/custom-field.php CHANGED
@@ -275,26 +275,6 @@ class CPAC_Column_Custom_Field extends CPAC_Column {
275
  return $meta;
276
  }
277
 
278
- /**
279
- * Get before value
280
- *
281
- * @since 1.0
282
- */
283
- function get_before() {
284
-
285
- return stripslashes( $this->options->before );
286
- }
287
-
288
- /**
289
- * Get after value
290
- *
291
- * @since 1.0
292
- */
293
- function get_after() {
294
-
295
- return stripslashes( $this->options->after );
296
- }
297
-
298
  /**
299
  * @see CPAC_Column::get_raw_value()
300
  * @since 2.0.3
275
  return $meta;
276
  }
277
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  /**
279
  * @see CPAC_Column::get_raw_value()
280
  * @since 2.0.3
classes/column/post/modified.php CHANGED
@@ -17,27 +17,44 @@ class CPAC_Column_Post_Modified extends CPAC_Column {
17
  // Properties
18
  $this->properties['type'] = 'column-modified';
19
  $this->properties['label'] = __( 'Last modified', 'cpac' );
 
 
 
20
  }
21
 
22
  /**
23
  * @see CPAC_Column::get_value()
24
  * @since 2.0
25
  */
26
- function get_value( $post_id ) {
27
 
28
  $modified = $this->get_raw_value( $post_id );
29
 
30
- return $this->get_date( $modified ) . ' ' . $this->get_time( $modified );
 
 
 
 
31
  }
32
 
33
  /**
34
  * @see CPAC_Column::get_raw_value()
35
  * @since 2.0.3
36
  */
37
- function get_raw_value( $post_id ) {
38
 
39
  $p = get_post( $post_id );
40
 
41
  return $p->post_modified;
42
  }
 
 
 
 
 
 
 
 
 
 
43
  }
17
  // Properties
18
  $this->properties['type'] = 'column-modified';
19
  $this->properties['label'] = __( 'Last modified', 'cpac' );
20
+
21
+ // Options
22
+ $this->options['date_format'] = '';
23
  }
24
 
25
  /**
26
  * @see CPAC_Column::get_value()
27
  * @since 2.0
28
  */
29
+ public function get_value( $post_id ) {
30
 
31
  $modified = $this->get_raw_value( $post_id );
32
 
33
+ if ( ! $this->options->date_format ) {
34
+ return $this->get_date( $modified ) . ' ' . $this->get_time( $modified );
35
+ }
36
+
37
+ return date( $this->options->date_format, strtotime( $modified ) );
38
  }
39
 
40
  /**
41
  * @see CPAC_Column::get_raw_value()
42
  * @since 2.0.3
43
  */
44
+ public function get_raw_value( $post_id ) {
45
 
46
  $p = get_post( $post_id );
47
 
48
  return $p->post_modified;
49
  }
50
+
51
+ /**
52
+ * @see CPAC_Column::display_settings()
53
+ * @since 2.2.7
54
+ */
55
+ function display_settings() {
56
+
57
+ $this->display_field_date_format();
58
+ }
59
+
60
  }
classes/settings.php CHANGED
@@ -272,7 +272,7 @@ class CPAC_Settings {
272
  array(
273
  'title' => __( "Overview", 'cpac' ),
274
  'content' =>
275
- "<h5>Codepress Admin Columns</h5>
276
  <p>". __( "This plugin is for adding and removing additional columns to the administration screens for post(types), pages, media library, comments, links and users. Change the column's label and reorder them.", 'cpac' ) . "</p>"
277
  ),
278
  array(
@@ -488,7 +488,7 @@ class CPAC_Settings {
488
  */
489
  public function display_settings() {
490
  ?>
491
- <table class="form-table cpac-form-table">
492
  <tbody>
493
 
494
  <tr class="general">
@@ -501,9 +501,6 @@ class CPAC_Settings {
501
  <form method="post" action="options.php">
502
  <?php settings_fields( 'cpac-general-settings' ); ?>
503
  <?php $options = get_option( 'cpac_general_options' ); ?>
504
- <p>
505
- <br/>
506
- </p>
507
  <p>
508
  <label for="show_edit_button">
509
  <input name="cpac_general_options[show_edit_button]" type="hidden" value="0" >
272
  array(
273
  'title' => __( "Overview", 'cpac' ),
274
  'content' =>
275
+ "<h5>Admin Columns</h5>
276
  <p>". __( "This plugin is for adding and removing additional columns to the administration screens for post(types), pages, media library, comments, links and users. Change the column's label and reorder them.", 'cpac' ) . "</p>"
277
  ),
278
  array(
488
  */
489
  public function display_settings() {
490
  ?>
491
+ <table class="form-table cpac-form-table settings">
492
  <tbody>
493
 
494
  <tr class="general">
501
  <form method="post" action="options.php">
502
  <?php settings_fields( 'cpac-general-settings' ); ?>
503
  <?php $options = get_option( 'cpac_general_options' ); ?>
 
 
 
504
  <p>
505
  <label for="show_edit_button">
506
  <input name="cpac_general_options[show_edit_button]" type="hidden" value="0" >
classes/storage_model.php CHANGED
@@ -284,8 +284,9 @@ abstract class CPAC_Storage_Model {
284
  $iterator = new DirectoryIterator( $columns_dir );
285
  foreach( $iterator as $leaf ) {
286
 
287
- if ( $leaf->isDot() || $leaf->isDir() )
288
  continue;
 
289
 
290
  // only allow php files, exclude .SVN .DS_STORE and such
291
  if ( substr( $leaf->getFilename(), -4 ) !== '.php' ) {
@@ -523,7 +524,7 @@ abstract class CPAC_Storage_Model {
523
  /**
524
  * Filter the available column type groups
525
  *
526
- * @since 2.3
527
  *
528
  * @param array $groups Available groups ([groupid] => [label])
529
  * @param CPAC_Storage_Model $storage_model_instance Storage model class instance
284
  $iterator = new DirectoryIterator( $columns_dir );
285
  foreach( $iterator as $leaf ) {
286
 
287
+ if ( $leaf->isDot() || $leaf->isDir() ) {
288
  continue;
289
+ }
290
 
291
  // only allow php files, exclude .SVN .DS_STORE and such
292
  if ( substr( $leaf->getFilename(), -4 ) !== '.php' ) {
524
  /**
525
  * Filter the available column type groups
526
  *
527
+ * @since 2.2
528
  *
529
  * @param array $groups Available groups ([groupid] => [label])
530
  * @param CPAC_Storage_Model $storage_model_instance Storage model class instance
classes/upgrade.php CHANGED
@@ -22,9 +22,10 @@ class CPAC_Upgrade {
22
 
23
  $this->cpac = $cpac;
24
 
25
- // run upgrade based on version
26
  add_action( 'admin_init', array( $this, 'init' ) );
27
  add_action( 'admin_menu', array( $this, 'admin_menu' ), 11 );
 
28
  add_action( 'wp_ajax_cpac_upgrade', array( $this, 'ajax_upgrade' ) );
29
 
30
  if ( ! $this->allow_upgrade() ) {
@@ -32,6 +33,19 @@ class CPAC_Upgrade {
32
  }
33
  }
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  /**
36
  * Display a notice about the deprecated pro add-on
37
  *
22
 
23
  $this->cpac = $cpac;
24
 
25
+ // Hooks
26
  add_action( 'admin_init', array( $this, 'init' ) );
27
  add_action( 'admin_menu', array( $this, 'admin_menu' ), 11 );
28
+ add_action( 'admin_head', array( $this, 'admin_head' ) );
29
  add_action( 'wp_ajax_cpac_upgrade', array( $this, 'ajax_upgrade' ) );
30
 
31
  if ( ! $this->allow_upgrade() ) {
33
  }
34
  }
35
 
36
+ /**
37
+ * Admin CSS to hide upgrade menu and place icon
38
+ *
39
+ * @since 2.2.7
40
+ */
41
+ public function admin_head() {
42
+ ?>
43
+ <style type="text/css">
44
+ #menu-settings a[href="options-general.php?page=cpac-upgrade"] { display: none; }
45
+ </style>
46
+ <?php
47
+ }
48
+
49
  /**
50
  * Display a notice about the deprecated pro add-on
51
  *
codepress-admin-columns.php CHANGED
@@ -1,17 +1,16 @@
1
  <?php
2
  /*
3
-
4
- Plugin Name: Codepress Admin Columns
5
- Version: 2.2.6.4
6
  Description: Customize columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
7
- Author: Codepress
8
- Author URI: http://www.codepresshq.com
9
- Plugin URI: http://www.codepresshq.com/wordpress-plugins/admin-columns/
10
  Text Domain: cpac
11
  Domain Path: /languages
12
  License: GPLv2
13
 
14
- Copyright 2011-2014 Codepress info@codepress.nl
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License version 2 as published by
@@ -27,14 +26,11 @@ along with this program; if not, write to the Free Software
27
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28
  */
29
 
30
- if ( ! defined( 'ABSPATH' ) ) {
31
- // Exit if accessed directly
32
- exit;
33
- }
34
 
35
  // Plugin information
36
- define( 'CPAC_VERSION', '2.2.6.4' ); // current plugin version
37
- define( 'CPAC_UPGRADE_VERSION', '2.0.0' ); // this is the latest version which requires an upgrade
38
  define( 'CPAC_URL', plugin_dir_url( __FILE__ ) );
39
  define( 'CPAC_DIR', plugin_dir_path( __FILE__ ) );
40
 
@@ -54,7 +50,7 @@ require_once CPAC_DIR . 'includes/arrays.php';
54
  require_once CPAC_DIR . 'api.php';
55
 
56
  /**
57
- * The Codepress Admin Columns Class
58
  *
59
  * @since 1.0
60
  */
@@ -62,7 +58,7 @@ class CPAC {
62
 
63
  /**
64
  * Registered storage model class instances
65
- * Array of CPAC_Storage_Model instances
66
  *
67
  * @since 2.0
68
  * @var array
@@ -87,6 +83,15 @@ class CPAC {
87
  */
88
  private $_settings;
89
 
 
 
 
 
 
 
 
 
 
90
  /**
91
  * @since 1.0
92
  */
@@ -94,20 +99,12 @@ class CPAC {
94
 
95
  register_activation_hook( __FILE__, array( $this, 'set_capabilities' ) );
96
 
97
- // Localization
98
  add_action( 'init', array( $this, 'localize' ) );
99
-
100
- // Storage models
101
- add_action( 'wp_loaded', array( $this, 'set_storage_models_on_cac_screen' ), 5 );
102
-
103
- // Setup callback, important to load after set_storage_models
104
- add_action( 'wp_loaded', array( $this, 'after_setup' ) );
105
-
106
- // Add settings link
107
- add_filter( 'plugin_action_links', array( $this, 'add_settings_link' ), 1, 2 );
108
-
109
- // Scripts
110
  add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
 
111
 
112
  // Settings
113
  include_once CPAC_DIR . 'classes/settings.php';
@@ -119,7 +116,7 @@ class CPAC {
119
 
120
  // Upgrade
121
  require_once CPAC_DIR . 'classes/upgrade.php';
122
- new CPAC_Upgrade( $this );
123
  }
124
 
125
  /**
@@ -148,99 +145,24 @@ class CPAC {
148
  load_plugin_textdomain( 'cpac', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
149
  }
150
 
151
- /**
152
- * Whether this request is an AJAX request and marked as admin-column-ajax request.
153
- *
154
- * @since 2.2
155
- * @return bool Returns true if in an AJAX request, false otherwise
156
- */
157
- function is_doing_ajax() {
158
-
159
- if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
160
- return false;
161
- }
162
-
163
- if ( ( isset( $_POST['plugin_id'] ) && 'cpac' == $_POST['plugin_id'] ) || ( isset( $_GET['plugin_id'] ) && 'cpac' == $_GET['plugin_id'] ) ) {
164
- return true;
165
- }
166
-
167
- return false;
168
- }
169
-
170
- /**
171
- * Whether this request is a columns screen (i.e. a content overview page)
172
- *
173
- * @since 2.2
174
- * @return bool Returns true if the current screen is a columns screen, false otherwise
175
- */
176
- function is_columns_screen() {
177
-
178
- global $pagenow;
179
-
180
- $columns_screen = in_array( $pagenow, array( 'edit.php', 'upload.php', 'link-manager.php', 'edit-comments.php', 'users.php', 'edit-tags.php' ) );
181
-
182
- /**
183
- * Filter whether the current screen is a columns screen (i.e. a content overview page)
184
- * Useful for advanced used with custom content overview pages
185
- *
186
- * @since 2.2
187
- * @param bool $columns_screen Whether the current request is a columns screen
188
- */
189
- $columns_screen = apply_filters( 'cac/is_columns_screen', $columns_screen );
190
-
191
- return $columns_screen;
192
- }
193
-
194
- /**
195
- * Whether the current screen is the Admin Columns settings screen
196
- *
197
- * @since 2.2
198
- * @return bool True if the current screen is the settings screen, false otherwise
199
- */
200
- function is_settings_screen() {
201
-
202
- global $pagenow;
203
-
204
- if ( ! ( 'options-general.php' === $pagenow && isset( $_GET['page'] ) && ( 'codepress-admin-columns' === $_GET['page'] ) ) ) {
205
- return false;
206
- }
207
-
208
- return true;
209
- }
210
-
211
- /**
212
- * Whether the current screen is a screen in which Admin Columns is used
213
- * Used to check whether storage models should be loaded
214
- *
215
- * @since 2.2
216
- * @return bool Whether the current screen is an Admin Columns screen
217
- */
218
- function is_cac_screen() {
219
-
220
- /**
221
- * Filter whether the current screen is a screen in which Admin Columns is active
222
- *
223
- * @since 2.2
224
- * @param bool $is_cac_screen Whether the current screen is an Admin Columns screen
225
- */
226
- return apply_filters( 'cac/is_cac_screen', $this->is_columns_screen() || $this->is_doing_ajax() || $this->is_settings_screen() );
227
- }
228
-
229
  /**
230
  * @since 2.2.4
231
  */
232
  public function scripts() {
233
 
234
- add_action( 'admin_head', array( $this, 'global_head_scripts') );
235
-
236
  wp_register_script( 'cpac-admin-columns', CPAC_URL . 'assets/js/admin-columns.js', array( 'jquery', 'jquery-qtip2' ), CPAC_VERSION );
 
 
 
237
 
238
  if ( $this->is_columns_screen() ) {
239
  add_filter( 'admin_body_class', array( $this, 'admin_class' ) );
240
  add_action( 'admin_head', array( $this, 'admin_scripts') );
241
 
242
  wp_enqueue_script( 'cpac-admin-columns' );
243
- wp_enqueue_script( 'jquery-floatthead' );
 
 
244
 
245
  $data = array();
246
 
@@ -251,8 +173,6 @@ class CPAC {
251
  }*/
252
 
253
  wp_localize_script( 'cpac-admin-columns', 'CPAC', $data );
254
-
255
- $this->column_styles();
256
  }
257
  }
258
 
@@ -268,10 +188,12 @@ class CPAC {
268
  }
269
  }
270
 
271
- /**
272
- * @since 2.0
 
 
273
  */
274
- public function set_storage_models_on_cac_screen() {
275
 
276
  if ( ! $this->is_cac_screen() ) {
277
  return;
@@ -281,13 +203,15 @@ class CPAC {
281
  }
282
 
283
  /**
 
 
284
  * @since 2.0
285
  */
286
  public function set_storage_models() {
287
 
288
  $storage_models = array();
289
 
290
- // include parent and childs
291
  require_once CPAC_DIR . 'classes/column.php';
292
  require_once CPAC_DIR . 'classes/column/default.php';
293
  require_once CPAC_DIR . 'classes/column/actions.php';
@@ -298,11 +222,13 @@ class CPAC {
298
  require_once CPAC_DIR . 'classes/storage_model/comment.php';
299
  require_once CPAC_DIR . 'classes/storage_model/link.php';
300
 
 
301
  foreach ( $this->get_post_types() as $post_type ) {
302
  $storage_model = new CPAC_Storage_Model_Post( $post_type );
303
  $storage_models[ $storage_model->key ] = $storage_model;
304
  }
305
 
 
306
  $storage_model = new CPAC_Storage_Model_User();
307
  $storage_models[ $storage_model->key ] = $storage_model;
308
 
@@ -328,8 +254,12 @@ class CPAC {
328
  }
329
 
330
  /**
 
 
331
  * @since 2.0
332
- * @return array|false object Storage Model
 
 
333
  */
334
  public function get_storage_model( $key ) {
335
 
@@ -341,7 +271,12 @@ class CPAC {
341
  }
342
 
343
  /**
 
 
 
344
  * @since 2.2.4
 
 
345
  */
346
  public function get_current_storage_model() {
347
 
@@ -355,8 +290,11 @@ class CPAC {
355
  }
356
 
357
  /**
 
 
358
  * @since 1.0
359
- * @return array Posttypes
 
360
  */
361
  public function get_post_types() {
362
 
@@ -373,7 +311,7 @@ class CPAC {
373
  $post_types = array_merge( $post_types, get_post_types( array(
374
  '_builtin' => false,
375
  'show_ui' => true
376
- )));
377
 
378
  /**
379
  * Filter the post types for which Admin Columns is active
@@ -385,7 +323,10 @@ class CPAC {
385
  }
386
 
387
  /**
 
 
388
  * @since 1.0
 
389
  */
390
  function add_settings_link( $links, $file ) {
391
 
@@ -394,31 +335,20 @@ class CPAC {
394
  }
395
 
396
  array_unshift( $links, '<a href="' . esc_url( admin_url( "options-general.php?page=codepress-admin-columns" ) ) . '">' . __( 'Settings' ) . '</a>' );
397
- return $links;
398
- }
399
-
400
- /**
401
- * @since 1.0
402
- */
403
- public function column_styles() {
404
-
405
- wp_register_script( 'jquery-qtip2', CPAC_URL . 'external/qtip2/jquery.qtip.min.js', array( 'jquery' ), CPAC_VERSION );
406
- wp_register_style( 'jquery-qtip2', CPAC_URL . 'external/qtip2/jquery.qtip.min.css', array(), CPAC_VERSION, 'all' );
407
- wp_register_style( 'cpac-columns', CPAC_URL . 'assets/css/column.css', array(), CPAC_VERSION, 'all' );
408
 
409
- wp_enqueue_script( 'jquery-qtip2' );
410
- wp_enqueue_style( 'jquery-qtip2' );
411
- wp_enqueue_style( 'cpac-columns' );
412
  }
413
 
414
  /**
415
  * Adds a body class which is used to set individual column widths
416
  *
417
  * @since 1.4.0
 
418
  * @param string $classes body classes
419
  * @return string
420
  */
421
  function admin_class( $classes ) {
 
422
  if ( $storage_model = $this->get_current_storage_model() ) {
423
  $classes .= " cp-{$storage_model->key}";
424
  }
@@ -426,18 +356,6 @@ class CPAC {
426
  return $classes;
427
  }
428
 
429
- /**
430
- * Admin CSS to hide upgrade menu and place icon
431
- *
432
- * @since 1.4.0
433
- */
434
- function global_head_scripts() { ?>
435
- <style type="text/css">
436
- #menu-settings a[href="options-general.php?page=cpac-upgrade"] { display: none; }
437
- </style>
438
- <?php
439
- }
440
-
441
  /**
442
  * Admin CSS for Column width and Settings Icon
443
  *
@@ -488,6 +406,84 @@ class CPAC {
488
  <?php
489
  }
490
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  /**
492
  * Get admin columns settings class instance
493
  *
@@ -509,12 +505,30 @@ class CPAC {
509
 
510
  return $this->_addons;
511
  }
 
 
 
 
 
 
 
 
 
 
 
512
  }
513
 
514
  /**
515
- * Init Class Codepress_Admin_Columns ( sets Global for backwards compatibility. )
516
  *
517
  * @since 1.0
 
518
  */
519
- $GLOBALS['cpac'] = new CPAC();
520
 
 
 
 
 
 
 
1
  <?php
2
  /*
3
+ Plugin Name: Admin Columns
4
+ Version: 2.2.7
 
5
  Description: Customize columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
6
+ Author: AdminColumns.com
7
+ Author URI: http://www.admincolumns.com
8
+ Plugin URI: http://www.admincolumns.com
9
  Text Domain: cpac
10
  Domain Path: /languages
11
  License: GPLv2
12
 
13
+ Copyright 2011-2014 AdminColumns.com info@admincolumns.com
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License version 2 as published by
26
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
  */
28
 
29
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
 
 
 
30
 
31
  // Plugin information
32
+ define( 'CPAC_VERSION', '2.2.7' ); // Current plugin version
33
+ define( 'CPAC_UPGRADE_VERSION', '2.0.0' ); // Latest version which requires an upgrade
34
  define( 'CPAC_URL', plugin_dir_url( __FILE__ ) );
35
  define( 'CPAC_DIR', plugin_dir_path( __FILE__ ) );
36
 
50
  require_once CPAC_DIR . 'api.php';
51
 
52
  /**
53
+ * The Admin Columns Class
54
  *
55
  * @since 1.0
56
  */
58
 
59
  /**
60
  * Registered storage model class instances
61
+ * Array of CPAC_Storage_Model instances, with the storage model keys (e.g. post, page, wp-users) as keys
62
  *
63
  * @since 2.0
64
  * @var array
83
  */
84
  private $_settings;
85
 
86
+ /**
87
+ * Admin Columns plugin upgrade class instance
88
+ *
89
+ * @since 2.2.7
90
+ * @access private
91
+ * @var CPAC_Upgrade
92
+ */
93
+ private $_upgrade;
94
+
95
  /**
96
  * @since 1.0
97
  */
99
 
100
  register_activation_hook( __FILE__, array( $this, 'set_capabilities' ) );
101
 
102
+ // Hooks
103
  add_action( 'init', array( $this, 'localize' ) );
104
+ add_action( 'wp_loaded', array( $this, 'maybe_set_storage_models' ), 5 );
105
+ add_action( 'wp_loaded', array( $this, 'after_setup' ) ); // Setup callback, important to load after set_storage_models
 
 
 
 
 
 
 
 
 
106
  add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
107
+ add_filter( 'plugin_action_links', array( $this, 'add_settings_link' ), 1, 2 );
108
 
109
  // Settings
110
  include_once CPAC_DIR . 'classes/settings.php';
116
 
117
  // Upgrade
118
  require_once CPAC_DIR . 'classes/upgrade.php';
119
+ $this->_upgrade = new CPAC_Upgrade( $this );
120
  }
121
 
122
  /**
145
  load_plugin_textdomain( 'cpac', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
146
  }
147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  /**
149
  * @since 2.2.4
150
  */
151
  public function scripts() {
152
 
 
 
153
  wp_register_script( 'cpac-admin-columns', CPAC_URL . 'assets/js/admin-columns.js', array( 'jquery', 'jquery-qtip2' ), CPAC_VERSION );
154
+ wp_register_script( 'jquery-qtip2', CPAC_URL . 'external/qtip2/jquery.qtip.min.js', array( 'jquery' ), CPAC_VERSION );
155
+ wp_register_style( 'jquery-qtip2', CPAC_URL . 'external/qtip2/jquery.qtip.min.css', array(), CPAC_VERSION, 'all' );
156
+ wp_register_style( 'cpac-columns', CPAC_URL . 'assets/css/column.css', array(), CPAC_VERSION, 'all' );
157
 
158
  if ( $this->is_columns_screen() ) {
159
  add_filter( 'admin_body_class', array( $this, 'admin_class' ) );
160
  add_action( 'admin_head', array( $this, 'admin_scripts') );
161
 
162
  wp_enqueue_script( 'cpac-admin-columns' );
163
+ wp_enqueue_script( 'jquery-qtip2' );
164
+ wp_enqueue_style( 'jquery-qtip2' );
165
+ wp_enqueue_style( 'cpac-columns' );
166
 
167
  $data = array();
168
 
173
  }*/
174
 
175
  wp_localize_script( 'cpac-admin-columns', 'CPAC', $data );
 
 
176
  }
177
  }
178
 
188
  }
189
  }
190
 
191
+ /**
192
+ * Load the storage models if the current screen is a columns screen
193
+ *
194
+ * @since 2.2.7
195
  */
196
+ public function maybe_set_storage_models() {
197
 
198
  if ( ! $this->is_cac_screen() ) {
199
  return;
203
  }
204
 
205
  /**
206
+ * Load the storage models, storing them in the storage_models property of this object
207
+ *
208
  * @since 2.0
209
  */
210
  public function set_storage_models() {
211
 
212
  $storage_models = array();
213
 
214
+ // Load storage model class files and column base class files
215
  require_once CPAC_DIR . 'classes/column.php';
216
  require_once CPAC_DIR . 'classes/column/default.php';
217
  require_once CPAC_DIR . 'classes/column/actions.php';
222
  require_once CPAC_DIR . 'classes/storage_model/comment.php';
223
  require_once CPAC_DIR . 'classes/storage_model/link.php';
224
 
225
+ // Create a storage model per post type
226
  foreach ( $this->get_post_types() as $post_type ) {
227
  $storage_model = new CPAC_Storage_Model_Post( $post_type );
228
  $storage_models[ $storage_model->key ] = $storage_model;
229
  }
230
 
231
+ // Create other storage models
232
  $storage_model = new CPAC_Storage_Model_User();
233
  $storage_models[ $storage_model->key ] = $storage_model;
234
 
254
  }
255
 
256
  /**
257
+ * Retrieve a storage model object based on its key
258
+ *
259
  * @since 2.0
260
+ *
261
+ * @param string $key Storage model key (e.g. post, page, wp-users)
262
+ * @return bool|CPAC_Storage_Model Storage Model object (or false, on failure)
263
  */
264
  public function get_storage_model( $key ) {
265
 
271
  }
272
 
273
  /**
274
+ * Get storage model object of currently active storage model
275
+ * On the users overview page, for example, this returns the CPAC_Storage_Model_User object
276
+ *
277
  * @since 2.2.4
278
+ *
279
+ * @return CPAC_Storage_Model
280
  */
281
  public function get_current_storage_model() {
282
 
290
  }
291
 
292
  /**
293
+ * Get a list of post types for which Admin Columns is active
294
+ *
295
  * @since 1.0
296
+ *
297
+ * @return array List of post type keys (e.g. post, page)
298
  */
299
  public function get_post_types() {
300
 
311
  $post_types = array_merge( $post_types, get_post_types( array(
312
  '_builtin' => false,
313
  'show_ui' => true
314
+ ) ) );
315
 
316
  /**
317
  * Filter the post types for which Admin Columns is active
323
  }
324
 
325
  /**
326
+ * Add a settings link to the Admin Columns entry in the plugin overview screen
327
+ *
328
  * @since 1.0
329
+ * @see filter:plugin_action_links
330
  */
331
  function add_settings_link( $links, $file ) {
332
 
335
  }
336
 
337
  array_unshift( $links, '<a href="' . esc_url( admin_url( "options-general.php?page=codepress-admin-columns" ) ) . '">' . __( 'Settings' ) . '</a>' );
 
 
 
 
 
 
 
 
 
 
 
338
 
339
+ return $links;
 
 
340
  }
341
 
342
  /**
343
  * Adds a body class which is used to set individual column widths
344
  *
345
  * @since 1.4.0
346
+ *
347
  * @param string $classes body classes
348
  * @return string
349
  */
350
  function admin_class( $classes ) {
351
+
352
  if ( $storage_model = $this->get_current_storage_model() ) {
353
  $classes .= " cp-{$storage_model->key}";
354
  }
356
  return $classes;
357
  }
358
 
 
 
 
 
 
 
 
 
 
 
 
 
359
  /**
360
  * Admin CSS for Column width and Settings Icon
361
  *
406
  <?php
407
  }
408
 
409
+ /**
410
+ * Whether this request is an AJAX request and marked as admin-column-ajax request.
411
+ *
412
+ * @since 2.2
413
+ * @return bool Returns true if in an AJAX request, false otherwise
414
+ */
415
+ function is_doing_ajax() {
416
+
417
+ if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
418
+ return false;
419
+ }
420
+
421
+ if ( ( isset( $_POST['plugin_id'] ) && 'cpac' == $_POST['plugin_id'] ) || ( isset( $_GET['plugin_id'] ) && 'cpac' == $_GET['plugin_id'] ) ) {
422
+ return true;
423
+ }
424
+
425
+ return false;
426
+ }
427
+
428
+ /**
429
+ * Whether this request is a columns screen (i.e. a content overview page)
430
+ *
431
+ * @since 2.2
432
+ * @return bool Returns true if the current screen is a columns screen, false otherwise
433
+ */
434
+ function is_columns_screen() {
435
+
436
+ global $pagenow;
437
+
438
+ $columns_screen = in_array( $pagenow, array( 'edit.php', 'upload.php', 'link-manager.php', 'edit-comments.php', 'users.php', 'edit-tags.php' ) );
439
+
440
+ /**
441
+ * Filter whether the current screen is a columns screen (i.e. a content overview page)
442
+ * Useful for advanced used with custom content overview pages
443
+ *
444
+ * @since 2.2
445
+ * @param bool $columns_screen Whether the current request is a columns screen
446
+ */
447
+ $columns_screen = apply_filters( 'cac/is_columns_screen', $columns_screen );
448
+
449
+ return $columns_screen;
450
+ }
451
+
452
+ /**
453
+ * Whether the current screen is the Admin Columns settings screen
454
+ *
455
+ * @since 2.2
456
+ * @return bool True if the current screen is the settings screen, false otherwise
457
+ */
458
+ function is_settings_screen() {
459
+
460
+ global $pagenow;
461
+
462
+ if ( ! ( 'options-general.php' === $pagenow && isset( $_GET['page'] ) && ( 'codepress-admin-columns' === $_GET['page'] ) ) ) {
463
+ return false;
464
+ }
465
+
466
+ return true;
467
+ }
468
+
469
+ /**
470
+ * Whether the current screen is a screen in which Admin Columns is used
471
+ * Used to check whether storage models should be loaded
472
+ *
473
+ * @since 2.2
474
+ * @return bool Whether the current screen is an Admin Columns screen
475
+ */
476
+ function is_cac_screen() {
477
+
478
+ /**
479
+ * Filter whether the current screen is a screen in which Admin Columns is active
480
+ *
481
+ * @since 2.2
482
+ * @param bool $is_cac_screen Whether the current screen is an Admin Columns screen
483
+ */
484
+ return apply_filters( 'cac/is_cac_screen', $this->is_columns_screen() || $this->is_doing_ajax() || $this->is_settings_screen() );
485
+ }
486
+
487
  /**
488
  * Get admin columns settings class instance
489
  *
505
 
506
  return $this->_addons;
507
  }
508
+
509
+ /**
510
+ * Get admin columns upgrade class instance
511
+ *
512
+ * @since 2.2.7
513
+ * @return CPAC_Upgrade Upgrade class instance
514
+ */
515
+ public function upgrade() {
516
+
517
+ return $this->_upgrade;
518
+ }
519
  }
520
 
521
  /**
522
+ * Admin Columns class (global for backwards compatibility)
523
  *
524
  * @since 1.0
525
+ * @deprecated 2.2.7 Use filter cac/loaded instead.
526
  */
527
+ global $cpac;
528
 
529
+ /**
530
+ * Initialize Admin Columns class
531
+ *
532
+ * @since 1.0
533
+ */
534
+ $cpac = new CPAC();
external/qtip2/jquery.qtip.css CHANGED
@@ -18,7 +18,7 @@
18
 
19
  max-width: 280px;
20
  min-width: 50px;
21
-
22
  font-size: 10.5px;
23
  line-height: 12px;
24
 
@@ -65,7 +65,7 @@
65
  right: 4px; top: 50%;
66
  margin-top: -9px;
67
  }
68
-
69
  * html .qtip-titlebar .qtip-close{ top: 16px; } /* IE fix */
70
 
71
  .qtip-titlebar .ui-icon,
@@ -120,7 +120,7 @@
120
  background: #F1F1F1;
121
  color: #777;
122
  }
123
-
124
  .qtip-default .qtip-titlebar .qtip-close{
125
  border-color: #AAA;
126
  color: #111;
@@ -154,7 +154,7 @@
154
  -moz-border-radius: 2px;
155
  -webkit-border-radius: 2px;
156
  border-radius: 2px;
157
-
158
  -webkit-box-shadow: 0 0 3px #333;
159
  -moz-box-shadow: 0 0 3px #333;
160
  box-shadow: 0 0 3px #333;
@@ -174,11 +174,11 @@
174
  background-color: #4A4A4A;
175
  background-color: rgba(0,0,0,0);
176
  }
177
-
178
  .qtip-youtube .qtip-content{
179
  padding: .75em;
180
  font: 12px arial,sans-serif;
181
-
182
  filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);
183
  -ms-filter: "progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);";
184
  }
@@ -257,11 +257,11 @@
257
  color: white;
258
  border: 0 dashed transparent;
259
  }
260
-
261
  .qtip-cluetip .qtip-icon{
262
  border-color: #808064;
263
  }
264
-
265
  .qtip-cluetip .qtip-titlebar .ui-state-hover{
266
  border-color: #696952;
267
  color: #696952;
@@ -291,7 +291,7 @@
291
  .qtip-tipsy .qtip-content{
292
  padding: 6px 10px;
293
  }
294
-
295
  .qtip-tipsy .qtip-icon{
296
  border-color: #222;
297
  text-shadow: none;
@@ -462,7 +462,7 @@
462
  margin: 0 auto;
463
  overflow: hidden;
464
  z-index: 10;
465
-
466
  }
467
 
468
  /* Opera bug #357 - Incorrect tip position
@@ -480,7 +480,7 @@
480
  background: transparent;
481
  border: 0 dashed transparent;
482
  }
483
-
484
  .qtip .qtip-tip canvas{ top: 0; left: 0; }
485
 
486
  .qtip .qtip-tip .qtip-vml{
18
 
19
  max-width: 280px;
20
  min-width: 50px;
21
+
22
  font-size: 10.5px;
23
  line-height: 12px;
24
 
65
  right: 4px; top: 50%;
66
  margin-top: -9px;
67
  }
68
+
69
  * html .qtip-titlebar .qtip-close{ top: 16px; } /* IE fix */
70
 
71
  .qtip-titlebar .ui-icon,
120
  background: #F1F1F1;
121
  color: #777;
122
  }
123
+
124
  .qtip-default .qtip-titlebar .qtip-close{
125
  border-color: #AAA;
126
  color: #111;
154
  -moz-border-radius: 2px;
155
  -webkit-border-radius: 2px;
156
  border-radius: 2px;
157
+
158
  -webkit-box-shadow: 0 0 3px #333;
159
  -moz-box-shadow: 0 0 3px #333;
160
  box-shadow: 0 0 3px #333;
174
  background-color: #4A4A4A;
175
  background-color: rgba(0,0,0,0);
176
  }
177
+
178
  .qtip-youtube .qtip-content{
179
  padding: .75em;
180
  font: 12px arial,sans-serif;
181
+
182
  filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);
183
  -ms-filter: "progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);";
184
  }
257
  color: white;
258
  border: 0 dashed transparent;
259
  }
260
+
261
  .qtip-cluetip .qtip-icon{
262
  border-color: #808064;
263
  }
264
+
265
  .qtip-cluetip .qtip-titlebar .ui-state-hover{
266
  border-color: #696952;
267
  color: #696952;
291
  .qtip-tipsy .qtip-content{
292
  padding: 6px 10px;
293
  }
294
+
295
  .qtip-tipsy .qtip-icon{
296
  border-color: #222;
297
  text-shadow: none;
462
  margin: 0 auto;
463
  overflow: hidden;
464
  z-index: 10;
465
+
466
  }
467
 
468
  /* Opera bug #357 - Incorrect tip position
480
  background: transparent;
481
  border: 0 dashed transparent;
482
  }
483
+
484
  .qtip .qtip-tip canvas{ top: 0; left: 0; }
485
 
486
  .qtip .qtip-tip .qtip-vml{
external/qtip2/jquery.qtip.js CHANGED
@@ -85,216 +85,216 @@ BROWSER = {
85
  }
86
  return v > 4 ? v : NaN;
87
  }()),
88
-
89
  /*
90
  * iOS version detection
91
  */
92
- iOS: parseFloat(
93
  ('' + (/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0,''])[1])
94
  .replace('undefined', '3_2').replace('_', '.').replace('_', '')
95
  ) || FALSE
96
  };
97
 
98
- ;function QTip(target, options, id, attr) {
99
- // Elements and ID
100
- this.id = id;
101
- this.target = target;
102
- this.tooltip = NULL;
103
- this.elements = { target: target };
104
-
105
- // Internal constructs
106
- this._id = NAMESPACE + '-' + id;
107
- this.timers = { img: {} };
108
- this.options = options;
109
- this.plugins = {};
110
-
111
- // Cache object
112
- this.cache = {
113
- event: {},
114
- target: $(),
115
- disabled: FALSE,
116
- attr: attr,
117
- onTooltip: FALSE,
118
- lastClass: ''
119
- };
120
-
121
- // Set the initial flags
122
- this.rendered = this.destroyed = this.disabled = this.waiting =
123
- this.hiddenDuringWait = this.positioning = this.triggering = FALSE;
124
- }
125
- PROTOTYPE = QTip.prototype;
126
-
127
- PROTOTYPE._when = function(deferreds) {
128
- return $.when.apply($, deferreds);
129
- };
130
-
131
- PROTOTYPE.render = function(show) {
132
- if(this.rendered || this.destroyed) { return this; } // If tooltip has already been rendered, exit
133
-
134
- var self = this,
135
- options = this.options,
136
- cache = this.cache,
137
- elements = this.elements,
138
- text = options.content.text,
139
- title = options.content.title,
140
- button = options.content.button,
141
- posOptions = options.position,
142
- namespace = '.'+this._id+' ',
143
- deferreds = [],
144
- tooltip;
145
-
146
- // Add ARIA attributes to target
147
- $.attr(this.target[0], 'aria-describedby', this._id);
148
-
149
- // Create tooltip element
150
- this.tooltip = elements.tooltip = tooltip = $('<div/>', {
151
- 'id': this._id,
152
- 'class': [ NAMESPACE, CLASS_DEFAULT, options.style.classes, NAMESPACE + '-pos-' + options.position.my.abbrev() ].join(' '),
153
- 'width': options.style.width || '',
154
- 'height': options.style.height || '',
155
- 'tracking': posOptions.target === 'mouse' && posOptions.adjust.mouse,
156
-
157
- /* ARIA specific attributes */
158
- 'role': 'alert',
159
- 'aria-live': 'polite',
160
- 'aria-atomic': FALSE,
161
- 'aria-describedby': this._id + '-content',
162
- 'aria-hidden': TRUE
163
- })
164
- .toggleClass(CLASS_DISABLED, this.disabled)
165
- .attr(ATTR_ID, this.id)
166
- .data(NAMESPACE, this)
167
- .appendTo(posOptions.container)
168
- .append(
169
- // Create content element
170
- elements.content = $('<div />', {
171
- 'class': NAMESPACE + '-content',
172
- 'id': this._id + '-content',
173
- 'aria-atomic': TRUE
174
- })
175
- );
176
-
177
- // Set rendered flag and prevent redundant reposition calls for now
178
- this.rendered = -1;
179
- this.positioning = TRUE;
180
-
181
- // Create title...
182
- if(title) {
183
- this._createTitle();
184
-
185
- // Update title only if its not a callback (called in toggle if so)
186
- if(!$.isFunction(title)) {
187
- deferreds.push( this._updateTitle(title, FALSE) );
188
- }
189
- }
190
-
191
- // Create button
192
- if(button) { this._createButton(); }
193
-
194
- // Set proper rendered flag and update content if not a callback function (called in toggle)
195
- if(!$.isFunction(text)) {
196
- deferreds.push( this._updateContent(text, FALSE) );
197
- }
198
- this.rendered = TRUE;
199
-
200
- // Setup widget classes
201
- this._setWidget();
202
-
203
- // Initialize 'render' plugins
204
- $.each(PLUGINS, function(name) {
205
- var instance;
206
- if(this.initialize === 'render' && (instance = this(self))) {
207
- self.plugins[name] = instance;
208
- }
209
- });
210
-
211
- // Unassign initial events and assign proper events
212
- this._unassignEvents();
213
- this._assignEvents();
214
-
215
- // When deferreds have completed
216
- this._when(deferreds).then(function() {
217
- // tooltiprender event
218
- self._trigger('render');
219
-
220
- // Reset flags
221
- self.positioning = FALSE;
222
-
223
- // Show tooltip if not hidden during wait period
224
- if(!self.hiddenDuringWait && (options.show.ready || show)) {
225
- self.toggle(TRUE, cache.event, FALSE);
226
- }
227
- self.hiddenDuringWait = FALSE;
228
- });
229
-
230
- // Expose API
231
- QTIP.api[this.id] = this;
232
-
233
- return this;
234
- };
235
-
236
- PROTOTYPE.destroy = function(immediate) {
237
- // Set flag the signify destroy is taking place to plugins
238
- // and ensure it only gets destroyed once!
239
- if(this.destroyed) { return this.target; }
240
-
241
- function process() {
242
- if(this.destroyed) { return; }
243
- this.destroyed = TRUE;
244
-
245
- var target = this.target,
246
- title = target.attr(oldtitle);
247
-
248
- // Destroy tooltip if rendered
249
- if(this.rendered) {
250
- this.tooltip.stop(1,0).find('*').remove().end().remove();
251
- }
252
-
253
- // Destroy all plugins
254
- $.each(this.plugins, function(name) {
255
- this.destroy && this.destroy();
256
- });
257
-
258
- // Clear timers and remove bound events
259
- clearTimeout(this.timers.show);
260
- clearTimeout(this.timers.hide);
261
- this._unassignEvents();
262
-
263
- // Remove api object and ARIA attributes
264
- target.removeData(NAMESPACE)
265
- .removeAttr(ATTR_ID)
266
- .removeAttr(ATTR_HAS)
267
- .removeAttr('aria-describedby');
268
-
269
- // Reset old title attribute if removed
270
- if(this.options.suppress && title) {
271
- target.attr('title', title).removeAttr(oldtitle);
272
- }
273
-
274
- // Remove qTip events associated with this API
275
- this._unbind(target);
276
-
277
- // Remove ID from used id objects, and delete object references
278
- // for better garbage collection and leak protection
279
- this.options = this.elements = this.cache = this.timers =
280
- this.plugins = this.mouse = NULL;
281
-
282
- // Delete epoxsed API object
283
- delete QTIP.api[this.id];
284
- }
285
-
286
- // If an immediate destory is needed
287
- if((immediate !== TRUE || this.triggering === 'hide') && this.rendered) {
288
- this.tooltip.one('tooltiphidden', $.proxy(process, this));
289
- !this.triggering && this.hide();
290
- }
291
-
292
- // If we're not in the process of hiding... process
293
- else { process.call(this); }
294
-
295
- return this.target;
296
- };
297
-
298
  ;function invalidOpt(a) {
299
  return a === NULL || $.type(a) !== 'object';
300
  }
@@ -367,7 +367,7 @@ function sanitizeOptions(opts) {
367
  }
368
 
369
  if('show' in opts && invalidOpt(opts.show)) {
370
- opts.show = opts.show.jquery ? { target: opts.show } :
371
  opts.show === TRUE ? { ready: TRUE } : { event: opts.show };
372
  }
373
 
@@ -432,7 +432,7 @@ CHECKS = PROTOTYPE.checks = {
432
  },
433
  '^content.title.(text|button)$': function(obj, o, v) {
434
  this.set('content.'+o, v); // Backwards title.text/button compat
435
- },
436
 
437
  // Position checks
438
  '^position.(my|at)$': function(obj, o, v){
@@ -624,7 +624,7 @@ PROTOTYPE.set = function(option, value) {
624
 
625
  PROTOTYPE._waitForContent = function(element) {
626
  var cache = this.cache;
627
-
628
  // Set flag
629
  cache.waiting = TRUE;
630
 
@@ -735,7 +735,7 @@ PROTOTYPE._removeTitle = function(reposition)
735
  if(mouse && mouse.pageX && (adjust.mouse || !event || !event.pageX) ) {
736
  event = mouse;
737
  }
738
-
739
  // If the passed event has no coordinates (such as a scroll event)
740
  else if(!event || !event.pageX) {
741
  // Use the mouse origin that caused the show event, if distance hiding is enabled
@@ -830,8 +830,8 @@ PROTOTYPE._removeTitle = function(reposition)
830
  position = this.reposition.offset(target, position, container);
831
 
832
  // Adjust for position.fixed tooltips (and also iOS scroll bug in v3.2-4.0 & v4.3-4.3.2)
833
- if((BROWSER.iOS > 3.1 && BROWSER.iOS < 4.1) ||
834
- (BROWSER.iOS >= 4.3 && BROWSER.iOS < 4.33) ||
835
  (!BROWSER.iOS && type === 'fixed')
836
  ){
837
  position.left -= win.scrollLeft();
@@ -946,7 +946,7 @@ var C = (CORNER = PROTOTYPE.reposition.Corner = function(corner, forceY) {
946
  }).prototype;
947
 
948
  C.invert = function(z, center) {
949
- this[z] = this[z] === LEFT ? RIGHT : this[z] === RIGHT ? LEFT : center || this[z];
950
  };
951
 
952
  C.string = function() {
@@ -978,7 +978,7 @@ PROTOTYPE.toggle = function(state, event) {
978
  // Cache event
979
  cache.event = cloneEvent(event);
980
  }
981
-
982
  // If we're currently waiting and we've just hidden... stop it
983
  this.waiting && !state && (this.hiddenDuringWait = TRUE);
984
 
@@ -1258,7 +1258,7 @@ PROTOTYPE._setWidget = function()
1258
  tooltip.toggleClass(CLASS_DISABLED, disabled);
1259
 
1260
  tooltip.toggleClass('ui-helper-reset '+createWidgetClass(), on).toggleClass(CLASS_DEFAULT, this.options.style.def && !on);
1261
-
1262
  if(elements.content) {
1263
  elements.content.toggleClass( createWidgetClass('content'), on);
1264
  }
@@ -1318,8 +1318,8 @@ function hideMethod(event) {
1318
 
1319
  // Prevent hiding if tooltip is fixed and event target is the tooltip.
1320
  // Or if mouse positioning is enabled and cursor momentarily overlaps
1321
- if(this !== relatedTarget[0] &&
1322
- (this.options.position.target === 'mouse' && ontoTooltip) ||
1323
  (this.options.hide.fixed && (
1324
  (/mouse(out|leave|move)/).test(event.type) && (ontoTooltip || ontoTarget))
1325
  ))
@@ -1375,7 +1375,7 @@ PROTOTYPE._unbind = function(targets, suffix) {
1375
 
1376
  // Apply common event handlers using delegate (avoids excessive .bind calls!)
1377
  var ns = '.'+NAMESPACE;
1378
- function delegate(selector, events, method) {
1379
  $(document.body).delegate(selector,
1380
  (events.split ? events : events.join(ns + ' ')) + ns,
1381
  function() {
@@ -1404,7 +1404,7 @@ $(function() {
1404
  // On mouseleave...
1405
  else {
1406
  // Hide when we leave the tooltip and not onto the show target (if a hide event is set)
1407
- if(options.position.target === 'mouse' && options.hide.event &&
1408
  options.show.target && !target.closest(options.show.target[0]).length) {
1409
  this.hide(event);
1410
  }
@@ -1737,7 +1737,7 @@ function init(elem, id, opts) {
1737
  elem.data(NAMESPACE, obj);
1738
 
1739
  // Catch remove/removeqtip events on target element to destroy redundant tooltip
1740
- elem.one('remove.qtip-'+id+' removeqtip.qtip-'+id, function() {
1741
  var api; if((api = $(this).data(NAMESPACE))) { api.destroy(true); }
1742
  });
1743
 
@@ -1881,7 +1881,7 @@ if(!$.ui) {
1881
  $.cleanData = function( elems ) {
1882
  for(var i = 0, elem; (elem = $( elems[i] )).length; i++) {
1883
  if(elem.attr(ATTR_HAS)) {
1884
- try { elem.triggerHandler('removeqtip'); }
1885
  catch( e ) {}
1886
  }
1887
  }
@@ -1972,7 +1972,7 @@ QTIP.defaults = {
1972
  }
1973
  };
1974
 
1975
- ;var TIP,
1976
 
1977
  // .bind()/.on() namespace
1978
  TIPNS = '.qtip-tip',
@@ -2034,7 +2034,7 @@ else {
2034
  var PIXEL_RATIO = window.devicePixelRatio || 1,
2035
  BACKING_STORE_RATIO = (function() {
2036
  var context = document.createElement('canvas').getContext('2d');
2037
- return context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio ||
2038
  context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || 1;
2039
  }()),
2040
  SCALE = PIXEL_RATIO / BACKING_STORE_RATIO;
@@ -2133,7 +2133,7 @@ $.extend(Tip.prototype, {
2133
  prop = BORDER + camel(corner.y) + camel(corner.x) + 'Radius';
2134
 
2135
  return BROWSER.ie < 9 ? 0 :
2136
- intCss(this._useTitle(corner) && elements.titlebar || elements.content, prop) ||
2137
  intCss(elements.tooltip, prop) || 0;
2138
  },
2139
 
@@ -2150,11 +2150,11 @@ $.extend(Tip.prototype, {
2150
  css = this._invalidColour, color = [];
2151
 
2152
  // Attempt to detect the background colour from various elements, left-to-right precedance
2153
- color[0] = css(tip, BG_COLOR) || css(colorElem, BG_COLOR) || css(elements.content, BG_COLOR) ||
2154
  css(elements.tooltip, BG_COLOR) || tip.css(BG_COLOR);
2155
 
2156
  // Attempt to detect the correct border side colour from various elements, left-to-right precedance
2157
- color[1] = css(tip, borderSide, COLOR) || css(colorElem, borderSide, COLOR) ||
2158
  css(elements.content, borderSide, COLOR) || css(elements.tooltip, borderSide, COLOR) || elements.tooltip.css(borderSide);
2159
 
2160
  // Reset background and border colours
@@ -2226,7 +2226,7 @@ $.extend(Tip.prototype, {
2226
  create: function() {
2227
  // Determine tip corner
2228
  var c = this.corner = (HASCANVAS || BROWSER.ie) && this._parseCorner(this.options.corner);
2229
-
2230
  // If we have a tip corner...
2231
  if( (this.enabled = !!this.corner && this.corner.abbrev() !== 'c') ) {
2232
  // Cache it
@@ -2324,7 +2324,7 @@ $.extend(Tip.prototype, {
2324
  context = inner[0].getContext('2d');
2325
  context.restore(); context.save();
2326
  context.clearRect(0,0,6000,6000);
2327
-
2328
  // Calculate coordinates
2329
  coords = this._calculateTip(mimic, curSize, SCALE);
2330
  bigCoords = this._calculateTip(mimic, this.size, SCALE);
@@ -2466,7 +2466,7 @@ $.extend(Tip.prototype, {
2466
  newCorner.precedance = newCorner.precedance === X ? Y : X;
2467
  }
2468
  else if(direction !== SHIFT && adjust[side]){
2469
- newCorner[precedance] = newCorner[precedance] === CENTER ?
2470
  (adjust[side] > 0 ? side : opposite) : (newCorner[precedance] === side ? opposite : side);
2471
  }
2472
  }
@@ -2483,7 +2483,7 @@ $.extend(Tip.prototype, {
2483
  pos[side] -= adjust[side];
2484
  shift[side] = FALSE;
2485
  }
2486
-
2487
  css[ offset[opposite] !== undefined ? opposite : side ] = shift[xy];
2488
  }
2489
  }
@@ -2522,9 +2522,9 @@ $.extend(Tip.prototype, {
2522
  );
2523
 
2524
  // Adjust position to accomodate tip dimensions
2525
- pos.left -= offset.left.charAt ? offset.user :
2526
  horizontal !== SHIFT || shift.top || !shift.left && !shift.top ? offset.left + this.border : 0;
2527
- pos.top -= offset.top.charAt ? offset.user :
2528
  vertical !== SHIFT || shift.left || !shift.left && !shift.top ? offset.top + this.border : 0;
2529
 
2530
  // Cache details
@@ -2565,7 +2565,7 @@ CHECKS.tip = {
2565
  '^position.my|style.tip.(corner|mimic|border)$': function() {
2566
  // Make sure a tip can be drawn
2567
  this.create();
2568
-
2569
  // Reposition the tooltip
2570
  this.qtip.reposition();
2571
  },
85
  }
86
  return v > 4 ? v : NaN;
87
  }()),
88
+
89
  /*
90
  * iOS version detection
91
  */
92
+ iOS: parseFloat(
93
  ('' + (/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0,''])[1])
94
  .replace('undefined', '3_2').replace('_', '.').replace('_', '')
95
  ) || FALSE
96
  };
97
 
98
+ ;function QTip(target, options, id, attr) {
99
+ // Elements and ID
100
+ this.id = id;
101
+ this.target = target;
102
+ this.tooltip = NULL;
103
+ this.elements = { target: target };
104
+
105
+ // Internal constructs
106
+ this._id = NAMESPACE + '-' + id;
107
+ this.timers = { img: {} };
108
+ this.options = options;
109
+ this.plugins = {};
110
+
111
+ // Cache object
112
+ this.cache = {
113
+ event: {},
114
+ target: $(),
115
+ disabled: FALSE,
116
+ attr: attr,
117
+ onTooltip: FALSE,
118
+ lastClass: ''
119
+ };
120
+
121
+ // Set the initial flags
122
+ this.rendered = this.destroyed = this.disabled = this.waiting =
123
+ this.hiddenDuringWait = this.positioning = this.triggering = FALSE;
124
+ }
125
+ PROTOTYPE = QTip.prototype;
126
+
127
+ PROTOTYPE._when = function(deferreds) {
128
+ return $.when.apply($, deferreds);
129
+ };
130
+
131
+ PROTOTYPE.render = function(show) {
132
+ if(this.rendered || this.destroyed) { return this; } // If tooltip has already been rendered, exit
133
+
134
+ var self = this,
135
+ options = this.options,
136
+ cache = this.cache,
137
+ elements = this.elements,
138
+ text = options.content.text,
139
+ title = options.content.title,
140
+ button = options.content.button,
141
+ posOptions = options.position,
142
+ namespace = '.'+this._id+' ',
143
+ deferreds = [],
144
+ tooltip;
145
+
146
+ // Add ARIA attributes to target
147
+ $.attr(this.target[0], 'aria-describedby', this._id);
148
+
149
+ // Create tooltip element
150
+ this.tooltip = elements.tooltip = tooltip = $('<div/>', {
151
+ 'id': this._id,
152
+ 'class': [ NAMESPACE, CLASS_DEFAULT, options.style.classes, NAMESPACE + '-pos-' + options.position.my.abbrev() ].join(' '),
153
+ 'width': options.style.width || '',
154
+ 'height': options.style.height || '',
155
+ 'tracking': posOptions.target === 'mouse' && posOptions.adjust.mouse,
156
+
157
+ /* ARIA specific attributes */
158
+ 'role': 'alert',
159
+ 'aria-live': 'polite',
160
+ 'aria-atomic': FALSE,
161
+ 'aria-describedby': this._id + '-content',
162
+ 'aria-hidden': TRUE
163
+ })
164
+ .toggleClass(CLASS_DISABLED, this.disabled)
165
+ .attr(ATTR_ID, this.id)
166
+ .data(NAMESPACE, this)
167
+ .appendTo(posOptions.container)
168
+ .append(
169
+ // Create content element
170
+ elements.content = $('<div />', {
171
+ 'class': NAMESPACE + '-content',
172
+ 'id': this._id + '-content',
173
+ 'aria-atomic': TRUE
174
+ })
175
+ );
176
+
177
+ // Set rendered flag and prevent redundant reposition calls for now
178
+ this.rendered = -1;
179
+ this.positioning = TRUE;
180
+
181
+ // Create title...
182
+ if(title) {
183
+ this._createTitle();
184
+
185
+ // Update title only if its not a callback (called in toggle if so)
186
+ if(!$.isFunction(title)) {
187
+ deferreds.push( this._updateTitle(title, FALSE) );
188
+ }
189
+ }
190
+
191
+ // Create button
192
+ if(button) { this._createButton(); }
193
+
194
+ // Set proper rendered flag and update content if not a callback function (called in toggle)
195
+ if(!$.isFunction(text)) {
196
+ deferreds.push( this._updateContent(text, FALSE) );
197
+ }
198
+ this.rendered = TRUE;
199
+
200
+ // Setup widget classes
201
+ this._setWidget();
202
+
203
+ // Initialize 'render' plugins
204
+ $.each(PLUGINS, function(name) {
205
+ var instance;
206
+ if(this.initialize === 'render' && (instance = this(self))) {
207
+ self.plugins[name] = instance;
208
+ }
209
+ });
210
+
211
+ // Unassign initial events and assign proper events
212
+ this._unassignEvents();
213
+ this._assignEvents();
214
+
215
+ // When deferreds have completed
216
+ this._when(deferreds).then(function() {
217
+ // tooltiprender event
218
+ self._trigger('render');
219
+
220
+ // Reset flags
221
+ self.positioning = FALSE;
222
+
223
+ // Show tooltip if not hidden during wait period
224
+ if(!self.hiddenDuringWait && (options.show.ready || show)) {
225
+ self.toggle(TRUE, cache.event, FALSE);
226
+ }
227
+ self.hiddenDuringWait = FALSE;
228
+ });
229
+
230
+ // Expose API
231
+ QTIP.api[this.id] = this;
232
+
233
+ return this;
234
+ };
235
+
236
+ PROTOTYPE.destroy = function(immediate) {
237
+ // Set flag the signify destroy is taking place to plugins
238
+ // and ensure it only gets destroyed once!
239
+ if(this.destroyed) { return this.target; }
240
+
241
+ function process() {
242
+ if(this.destroyed) { return; }
243
+ this.destroyed = TRUE;
244
+
245
+ var target = this.target,
246
+ title = target.attr(oldtitle);
247
+
248
+ // Destroy tooltip if rendered
249
+ if(this.rendered) {
250
+ this.tooltip.stop(1,0).find('*').remove().end().remove();
251
+ }
252
+
253
+ // Destroy all plugins
254
+ $.each(this.plugins, function(name) {
255
+ this.destroy && this.destroy();
256
+ });
257
+
258
+ // Clear timers and remove bound events
259
+ clearTimeout(this.timers.show);
260
+ clearTimeout(this.timers.hide);
261
+ this._unassignEvents();
262
+
263
+ // Remove api object and ARIA attributes
264
+ target.removeData(NAMESPACE)
265
+ .removeAttr(ATTR_ID)
266
+ .removeAttr(ATTR_HAS)
267
+ .removeAttr('aria-describedby');
268
+
269
+ // Reset old title attribute if removed
270
+ if(this.options.suppress && title) {
271
+ target.attr('title', title).removeAttr(oldtitle);
272
+ }
273
+
274
+ // Remove qTip events associated with this API
275
+ this._unbind(target);
276
+
277
+ // Remove ID from used id objects, and delete object references
278
+ // for better garbage collection and leak protection
279
+ this.options = this.elements = this.cache = this.timers =
280
+ this.plugins = this.mouse = NULL;
281
+
282
+ // Delete epoxsed API object
283
+ delete QTIP.api[this.id];
284
+ }
285
+
286
+ // If an immediate destory is needed
287
+ if((immediate !== TRUE || this.triggering === 'hide') && this.rendered) {
288
+ this.tooltip.one('tooltiphidden', $.proxy(process, this));
289
+ !this.triggering && this.hide();
290
+ }
291
+
292
+ // If we're not in the process of hiding... process
293
+ else { process.call(this); }
294
+
295
+ return this.target;
296
+ };
297
+
298
  ;function invalidOpt(a) {
299
  return a === NULL || $.type(a) !== 'object';
300
  }
367
  }
368
 
369
  if('show' in opts && invalidOpt(opts.show)) {
370
+ opts.show = opts.show.jquery ? { target: opts.show } :
371
  opts.show === TRUE ? { ready: TRUE } : { event: opts.show };
372
  }
373
 
432
  },
433
  '^content.title.(text|button)$': function(obj, o, v) {
434
  this.set('content.'+o, v); // Backwards title.text/button compat
435
+ },
436
 
437
  // Position checks
438
  '^position.(my|at)$': function(obj, o, v){
624
 
625
  PROTOTYPE._waitForContent = function(element) {
626
  var cache = this.cache;
627
+
628
  // Set flag
629
  cache.waiting = TRUE;
630
 
735
  if(mouse && mouse.pageX && (adjust.mouse || !event || !event.pageX) ) {
736
  event = mouse;
737
  }
738
+
739
  // If the passed event has no coordinates (such as a scroll event)
740
  else if(!event || !event.pageX) {
741
  // Use the mouse origin that caused the show event, if distance hiding is enabled
830
  position = this.reposition.offset(target, position, container);
831
 
832
  // Adjust for position.fixed tooltips (and also iOS scroll bug in v3.2-4.0 & v4.3-4.3.2)
833
+ if((BROWSER.iOS > 3.1 && BROWSER.iOS < 4.1) ||
834
+ (BROWSER.iOS >= 4.3 && BROWSER.iOS < 4.33) ||
835
  (!BROWSER.iOS && type === 'fixed')
836
  ){
837
  position.left -= win.scrollLeft();
946
  }).prototype;
947
 
948
  C.invert = function(z, center) {
949
+ this[z] = this[z] === LEFT ? RIGHT : this[z] === RIGHT ? LEFT : center || this[z];
950
  };
951
 
952
  C.string = function() {
978
  // Cache event
979
  cache.event = cloneEvent(event);
980
  }
981
+
982
  // If we're currently waiting and we've just hidden... stop it
983
  this.waiting && !state && (this.hiddenDuringWait = TRUE);
984
 
1258
  tooltip.toggleClass(CLASS_DISABLED, disabled);
1259
 
1260
  tooltip.toggleClass('ui-helper-reset '+createWidgetClass(), on).toggleClass(CLASS_DEFAULT, this.options.style.def && !on);
1261
+
1262
  if(elements.content) {
1263
  elements.content.toggleClass( createWidgetClass('content'), on);
1264
  }
1318
 
1319
  // Prevent hiding if tooltip is fixed and event target is the tooltip.
1320
  // Or if mouse positioning is enabled and cursor momentarily overlaps
1321
+ if(this !== relatedTarget[0] &&
1322
+ (this.options.position.target === 'mouse' && ontoTooltip) ||
1323
  (this.options.hide.fixed && (
1324
  (/mouse(out|leave|move)/).test(event.type) && (ontoTooltip || ontoTarget))
1325
  ))
1375
 
1376
  // Apply common event handlers using delegate (avoids excessive .bind calls!)
1377
  var ns = '.'+NAMESPACE;
1378
+ function delegate(selector, events, method) {
1379
  $(document.body).delegate(selector,
1380
  (events.split ? events : events.join(ns + ' ')) + ns,
1381
  function() {
1404
  // On mouseleave...
1405
  else {
1406
  // Hide when we leave the tooltip and not onto the show target (if a hide event is set)
1407
+ if(options.position.target === 'mouse' && options.hide.event &&
1408
  options.show.target && !target.closest(options.show.target[0]).length) {
1409
  this.hide(event);
1410
  }
1737
  elem.data(NAMESPACE, obj);
1738
 
1739
  // Catch remove/removeqtip events on target element to destroy redundant tooltip
1740
+ elem.one('remove.qtip-'+id+' removeqtip.qtip-'+id, function() {
1741
  var api; if((api = $(this).data(NAMESPACE))) { api.destroy(true); }
1742
  });
1743
 
1881
  $.cleanData = function( elems ) {
1882
  for(var i = 0, elem; (elem = $( elems[i] )).length; i++) {
1883
  if(elem.attr(ATTR_HAS)) {
1884
+ try { elem.triggerHandler('removeqtip'); }
1885
  catch( e ) {}
1886
  }
1887
  }
1972
  }
1973
  };
1974
 
1975
+ ;var TIP,
1976
 
1977
  // .bind()/.on() namespace
1978
  TIPNS = '.qtip-tip',
2034
  var PIXEL_RATIO = window.devicePixelRatio || 1,
2035
  BACKING_STORE_RATIO = (function() {
2036
  var context = document.createElement('canvas').getContext('2d');
2037
+ return context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio ||
2038
  context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || 1;
2039
  }()),
2040
  SCALE = PIXEL_RATIO / BACKING_STORE_RATIO;
2133
  prop = BORDER + camel(corner.y) + camel(corner.x) + 'Radius';
2134
 
2135
  return BROWSER.ie < 9 ? 0 :
2136
+ intCss(this._useTitle(corner) && elements.titlebar || elements.content, prop) ||
2137
  intCss(elements.tooltip, prop) || 0;
2138
  },
2139
 
2150
  css = this._invalidColour, color = [];
2151
 
2152
  // Attempt to detect the background colour from various elements, left-to-right precedance
2153
+ color[0] = css(tip, BG_COLOR) || css(colorElem, BG_COLOR) || css(elements.content, BG_COLOR) ||
2154
  css(elements.tooltip, BG_COLOR) || tip.css(BG_COLOR);
2155
 
2156
  // Attempt to detect the correct border side colour from various elements, left-to-right precedance
2157
+ color[1] = css(tip, borderSide, COLOR) || css(colorElem, borderSide, COLOR) ||
2158
  css(elements.content, borderSide, COLOR) || css(elements.tooltip, borderSide, COLOR) || elements.tooltip.css(borderSide);
2159
 
2160
  // Reset background and border colours
2226
  create: function() {
2227
  // Determine tip corner
2228
  var c = this.corner = (HASCANVAS || BROWSER.ie) && this._parseCorner(this.options.corner);
2229
+
2230
  // If we have a tip corner...
2231
  if( (this.enabled = !!this.corner && this.corner.abbrev() !== 'c') ) {
2232
  // Cache it
2324
  context = inner[0].getContext('2d');
2325
  context.restore(); context.save();
2326
  context.clearRect(0,0,6000,6000);
2327
+
2328
  // Calculate coordinates
2329
  coords = this._calculateTip(mimic, curSize, SCALE);
2330
  bigCoords = this._calculateTip(mimic, this.size, SCALE);
2466
  newCorner.precedance = newCorner.precedance === X ? Y : X;
2467
  }
2468
  else if(direction !== SHIFT && adjust[side]){
2469
+ newCorner[precedance] = newCorner[precedance] === CENTER ?
2470
  (adjust[side] > 0 ? side : opposite) : (newCorner[precedance] === side ? opposite : side);
2471
  }
2472
  }
2483
  pos[side] -= adjust[side];
2484
  shift[side] = FALSE;
2485
  }
2486
+
2487
  css[ offset[opposite] !== undefined ? opposite : side ] = shift[xy];
2488
  }
2489
  }
2522
  );
2523
 
2524
  // Adjust position to accomodate tip dimensions
2525
+ pos.left -= offset.left.charAt ? offset.user :
2526
  horizontal !== SHIFT || shift.top || !shift.left && !shift.top ? offset.left + this.border : 0;
2527
+ pos.top -= offset.top.charAt ? offset.user :
2528
  vertical !== SHIFT || shift.left || !shift.left && !shift.top ? offset.top + this.border : 0;
2529
 
2530
  // Cache details
2565
  '^position.my|style.tip.(corner|mimic|border)$': function() {
2566
  // Make sure a tip can be drawn
2567
  this.create();
2568
+
2569
  // Reposition the tooltip
2570
  this.qtip.reposition();
2571
  },
external/qtip2/jquery.qtip.min.js CHANGED
@@ -2,4 +2,3 @@
2
 
3
  !function(a,b,c){!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):jQuery&&!jQuery.fn.qtip&&a(jQuery)}(function(d){"use strict";function e(a,b,c,e){this.id=c,this.target=a,this.tooltip=E,this.elements={target:a},this._id=R+"-"+c,this.timers={img:{}},this.options=b,this.plugins={},this.cache={event:{},target:d(),disabled:D,attr:e,onTooltip:D,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=D}function f(a){return a===E||"object"!==d.type(a)}function g(a){return!(d.isFunction(a)||a&&a.attr||a.length||"object"===d.type(a)&&(a.jquery||a.then))}function h(a){var b,c,e,h;return f(a)?D:(f(a.metadata)&&(a.metadata={type:a.metadata}),"content"in a&&(b=a.content,f(b)||b.jquery||b.done?b=a.content={text:c=g(b)?D:b}:c=b.text,"ajax"in b&&(e=b.ajax,h=e&&e.once!==D,delete b.ajax,b.text=function(a,b){var f=c||d(this).attr(b.options.content.attr)||"Loading...",g=d.ajax(d.extend({},e,{context:b})).then(e.success,E,e.error).then(function(a){return a&&h&&b.set("content.text",a),a},function(a,c,d){b.destroyed||0===a.status||b.set("content.text",c+": "+d)});return h?f:(b.set("content.text",f),g)}),"title"in b&&(f(b.title)||(b.button=b.title.button,b.title=b.title.text),g(b.title||D)&&(b.title=D))),"position"in a&&f(a.position)&&(a.position={my:a.position,at:a.position}),"show"in a&&f(a.show)&&(a.show=a.show.jquery?{target:a.show}:a.show===C?{ready:C}:{event:a.show}),"hide"in a&&f(a.hide)&&(a.hide=a.hide.jquery?{target:a.hide}:{event:a.hide}),"style"in a&&f(a.style)&&(a.style={classes:a.style}),d.each(Q,function(){this.sanitize&&this.sanitize(a)}),a)}function i(a,b){for(var c,d=0,e=a,f=b.split(".");e=e[f[d++]];)d<f.length&&(c=e);return[c||a,f.pop()]}function j(a,b){var c,d,e;for(c in this.checks)for(d in this.checks[c])(e=new RegExp(d,"i").exec(a))&&(b.push(e),("builtin"===c||this.plugins[c])&&this.checks[c][d].apply(this.plugins[c]||this,b))}function k(a){return U.concat("").join(a?"-"+a+" ":" ")}function l(c){return c&&{type:c.type,pageX:c.pageX,pageY:c.pageY,target:c.target,relatedTarget:c.relatedTarget,scrollX:c.scrollX||a.pageXOffset||b.body.scrollLeft||b.documentElement.scrollLeft,scrollY:c.scrollY||a.pageYOffset||b.body.scrollTop||b.documentElement.scrollTop}||{}}function m(a,b){return b>0?setTimeout(d.proxy(a,this),b):(a.call(this),void 0)}function n(a){return this.tooltip.hasClass(_)?D:(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this.timers.show=m.call(this,function(){this.toggle(C,a)},this.options.show.delay),void 0)}function o(a){if(this.tooltip.hasClass(_))return D;var b=d(a.relatedTarget),c=b.closest(V)[0]===this.tooltip[0],e=b[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==b[0]&&"mouse"===this.options.position.target&&c||this.options.hide.fixed&&/mouse(out|leave|move)/.test(a.type)&&(c||e))try{a.preventDefault(),a.stopImmediatePropagation()}catch(f){}else this.timers.hide=m.call(this,function(){this.toggle(D,a)},this.options.hide.delay,this)}function p(a){return this.tooltip.hasClass(_)||!this.options.hide.inactive?D:(clearTimeout(this.timers.inactive),this.timers.inactive=m.call(this,function(){this.hide(a)},this.options.hide.inactive),void 0)}function q(a){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(a)}function r(a,c,e){d(b.body).delegate(a,(c.split?c:c.join(gb+" "))+gb,function(){var a=x.api[d.attr(this,T)];a&&!a.disabled&&e.apply(a,arguments)})}function s(a,c,f){var g,i,j,k,l,m=d(b.body),n=a[0]===b?m:a,o=a.metadata?a.metadata(f.metadata):E,p="html5"===f.metadata.type&&o?o[f.metadata.name]:E,q=a.data(f.metadata.name||"qtipopts");try{q="string"==typeof q?d.parseJSON(q):q}catch(r){}if(k=d.extend(C,{},x.defaults,f,"object"==typeof q?h(q):E,h(p||o)),i=k.position,k.id=c,"boolean"==typeof k.content.text){if(j=a.attr(k.content.attr),k.content.attr===D||!j)return D;k.content.text=j}if(i.container.length||(i.container=m),i.target===D&&(i.target=n),k.show.target===D&&(k.show.target=n),k.show.solo===C&&(k.show.solo=i.container.closest("body")),k.hide.target===D&&(k.hide.target=n),k.position.viewport===C&&(k.position.viewport=i.container),i.container=i.container.eq(0),i.at=new z(i.at,C),i.my=new z(i.my),a.data(R))if(k.overwrite)a.qtip("destroy",!0);else if(k.overwrite===D)return D;return a.attr(S,c),k.suppress&&(l=a.attr("title"))&&a.removeAttr("title").attr(bb,l).attr("title",""),g=new e(a,k,c,!!j),a.data(R,g),a.one("remove.qtip-"+c+" removeqtip.qtip-"+c,function(){var a;(a=d(this).data(R))&&a.destroy(!0)}),g}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function u(a,b){var d,e,f=b.charAt(0).toUpperCase()+b.slice(1),g=(b+" "+rb.join(f+" ")+f).split(" "),h=0;if(qb[b])return a.css(qb[b]);for(;d=g[h++];)if((e=a.css(d))!==c)return qb[b]=d,e}function v(a,b){return Math.ceil(parseFloat(u(a,b)))}function w(a,b){this._ns="tip",this.options=b,this.offset=b.offset,this.size=[b.width,b.height],this.init(this.qtip=a)}var x,y,z,A,B,C=!0,D=!1,E=null,F="x",G="y",H="width",I="height",J="top",K="left",L="bottom",M="right",N="center",O="flipinvert",P="shift",Q={},R="qtip",S="data-hasqtip",T="data-qtip-id",U=["ui-widget","ui-tooltip"],V="."+R,W="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),X=R+"-fixed",Y=R+"-default",Z=R+"-focus",$=R+"-hover",_=R+"-disabled",ab="_replacedByqTip",bb="oldtitle",cb={ie:function(){for(var a=3,c=b.createElement("div");(c.innerHTML="<!--[if gt IE "+ ++a+"]><i></i><![endif]-->")&&c.getElementsByTagName("i")[0];);return a>4?a:0/0}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||D};y=e.prototype,y._when=function(a){return d.when.apply(d,a)},y.render=function(a){if(this.rendered||this.destroyed)return this;var b,c=this,e=this.options,f=this.cache,g=this.elements,h=e.content.text,i=e.content.title,j=e.content.button,k=e.position,l=("."+this._id+" ",[]);return d.attr(this.target[0],"aria-describedby",this._id),this.tooltip=g.tooltip=b=d("<div/>",{id:this._id,"class":[R,Y,e.style.classes,R+"-pos-"+e.position.my.abbrev()].join(" "),width:e.style.width||"",height:e.style.height||"",tracking:"mouse"===k.target&&k.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":D,"aria-describedby":this._id+"-content","aria-hidden":C}).toggleClass(_,this.disabled).attr(T,this.id).data(R,this).appendTo(k.container).append(g.content=d("<div />",{"class":R+"-content",id:this._id+"-content","aria-atomic":C})),this.rendered=-1,this.positioning=C,i&&(this._createTitle(),d.isFunction(i)||l.push(this._updateTitle(i,D))),j&&this._createButton(),d.isFunction(h)||l.push(this._updateContent(h,D)),this.rendered=C,this._setWidget(),d.each(Q,function(a){var b;"render"===this.initialize&&(b=this(c))&&(c.plugins[a]=b)}),this._unassignEvents(),this._assignEvents(),this._when(l).then(function(){c._trigger("render"),c.positioning=D,c.hiddenDuringWait||!e.show.ready&&!a||c.toggle(C,f.event,D),c.hiddenDuringWait=D}),x.api[this.id]=this,this},y.destroy=function(a){function b(){if(!this.destroyed){this.destroyed=C;var a=this.target,b=a.attr(bb);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),d.each(this.plugins,function(){this.destroy&&this.destroy()}),clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this._unassignEvents(),a.removeData(R).removeAttr(T).removeAttr(S).removeAttr("aria-describedby"),this.options.suppress&&b&&a.attr("title",b).removeAttr(bb),this._unbind(a),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=E,delete x.api[this.id]}}return this.destroyed?this.target:(a===C&&"hide"!==this.triggering||!this.rendered?b.call(this):(this.tooltip.one("tooltiphidden",d.proxy(b,this)),!this.triggering&&this.hide()),this.target)},A=y.checks={builtin:{"^id$":function(a,b,c,e){var f=c===C?x.nextid:c,g=R+"-"+f;f!==D&&f.length>0&&!d("#"+g).length?(this._id=g,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):a[b]=e},"^prerender":function(a,b,c){c&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(a,b,c){this._updateContent(c)},"^content.attr$":function(a,b,c,d){this.options.content.text===this.target.attr(d)&&this._updateContent(this.target.attr(c))},"^content.title$":function(a,b,c){return c?(c&&!this.elements.title&&this._createTitle(),this._updateTitle(c),void 0):this._removeTitle()},"^content.button$":function(a,b,c){this._updateButton(c)},"^content.title.(text|button)$":function(a,b,c){this.set("content."+b,c)},"^position.(my|at)$":function(a,b,c){"string"==typeof c&&(a[b]=new z(c,"at"===b))},"^position.container$":function(a,b,c){this.rendered&&this.tooltip.appendTo(c)},"^show.ready$":function(a,b,c){c&&(!this.rendered&&this.render(C)||this.toggle(C))},"^style.classes$":function(a,b,c,d){this.rendered&&this.tooltip.removeClass(d).addClass(c)},"^style.(width|height)":function(a,b,c){this.rendered&&this.tooltip.css(b,c)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(a,b,c){this.rendered&&this.tooltip.toggleClass(Y,!!c)},"^events.(render|show|move|hide|focus|blur)$":function(a,b,c){this.rendered&&this.tooltip[(d.isFunction(c)?"":"un")+"bind"]("tooltip"+b,c)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var a=this.options.position;this.tooltip.attr("tracking","mouse"===a.target&&a.adjust.mouse),this._unassignEvents(),this._assignEvents()}}}},y.get=function(a){if(this.destroyed)return this;var b=i(this.options,a.toLowerCase()),c=b[0][b[1]];return c.precedance?c.string():c};var db=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,eb=/^prerender|show\.ready/i;y.set=function(a,b){if(this.destroyed)return this;{var c,e=this.rendered,f=D,g=this.options;this.checks}return"string"==typeof a?(c=a,a={},a[c]=b):a=d.extend({},a),d.each(a,function(b,c){if(e&&eb.test(b))return delete a[b],void 0;var h,j=i(g,b.toLowerCase());h=j[0][j[1]],j[0][j[1]]=c&&c.nodeType?d(c):c,f=db.test(b)||f,a[b]=[j[0],j[1],c,h]}),h(g),this.positioning=C,d.each(a,d.proxy(j,this)),this.positioning=D,this.rendered&&this.tooltip[0].offsetWidth>0&&f&&this.reposition("mouse"===g.position.target?E:this.cache.event),this},y._update=function(a,b){var c=this,e=this.cache;return this.rendered&&a?(d.isFunction(a)&&(a=a.call(this.elements.target,e.event,this)||""),d.isFunction(a.then)?(e.waiting=C,a.then(function(a){return e.waiting=D,c._update(a,b)},E,function(a){return c._update(a,b)})):a===D||!a&&""!==a?D:(a.jquery&&a.length>0?b.empty().append(a.css({display:"block",visibility:"visible"})):b.html(a),this._waitForContent(b).then(function(a){a.images&&a.images.length&&c.rendered&&c.tooltip[0].offsetWidth>0&&c.reposition(e.event,!a.length)}))):D},y._waitForContent=function(a){var b=this.cache;return b.waiting=C,(d.fn.imagesLoaded?a.imagesLoaded():d.Deferred().resolve([])).done(function(){b.waiting=D}).promise()},y._updateContent=function(a,b){this._update(a,this.elements.content,b)},y._updateTitle=function(a,b){this._update(a,this.elements.title,b)===D&&this._removeTitle(D)},y._createTitle=function(){var a=this.elements,b=this._id+"-title";a.titlebar&&this._removeTitle(),a.titlebar=d("<div />",{"class":R+"-titlebar "+(this.options.style.widget?k("header"):"")}).append(a.title=d("<div />",{id:b,"class":R+"-title","aria-atomic":C})).insertBefore(a.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(a){d(this).toggleClass("ui-state-active ui-state-focus","down"===a.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(a){d(this).toggleClass("ui-state-hover","mouseover"===a.type)}),this.options.content.button&&this._createButton()},y._removeTitle=function(a){var b=this.elements;b.title&&(b.titlebar.remove(),b.titlebar=b.title=b.button=E,a!==D&&this.reposition())},y.reposition=function(c,e){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=C;var f,g,h=this.cache,i=this.tooltip,j=this.options.position,k=j.target,l=j.my,m=j.at,n=j.viewport,o=j.container,p=j.adjust,q=p.method.split(" "),r=i.outerWidth(D),s=i.outerHeight(D),t=0,u=0,v=i.css("position"),w={left:0,top:0},x=i[0].offsetWidth>0,y=c&&"scroll"===c.type,z=d(a),A=o[0].ownerDocument,B=this.mouse;if(d.isArray(k)&&2===k.length)m={x:K,y:J},w={left:k[0],top:k[1]};else if("mouse"===k)m={x:K,y:J},!B||!B.pageX||!p.mouse&&c&&c.pageX?c&&c.pageX||((!p.mouse||this.options.show.distance)&&h.origin&&h.origin.pageX?c=h.origin:(!c||c&&("resize"===c.type||"scroll"===c.type))&&(c=h.event)):c=B,"static"!==v&&(w=o.offset()),A.body.offsetWidth!==(a.innerWidth||A.documentElement.clientWidth)&&(g=d(b.body).offset()),w={left:c.pageX-w.left+(g&&g.left||0),top:c.pageY-w.top+(g&&g.top||0)},p.mouse&&y&&B&&(w.left-=(B.scrollX||0)-z.scrollLeft(),w.top-=(B.scrollY||0)-z.scrollTop());else{if("event"===k?c&&c.target&&"scroll"!==c.type&&"resize"!==c.type?h.target=d(c.target):c.target||(h.target=this.elements.target):"event"!==k&&(h.target=d(k.jquery?k:this.elements.target)),k=h.target,k=d(k).eq(0),0===k.length)return this;k[0]===b||k[0]===a?(t=cb.iOS?a.innerWidth:k.width(),u=cb.iOS?a.innerHeight:k.height(),k[0]===a&&(w={top:(n||k).scrollTop(),left:(n||k).scrollLeft()})):Q.imagemap&&k.is("area")?f=Q.imagemap(this,k,m,Q.viewport?q:D):Q.svg&&k&&k[0].ownerSVGElement?f=Q.svg(this,k,m,Q.viewport?q:D):(t=k.outerWidth(D),u=k.outerHeight(D),w=k.offset()),f&&(t=f.width,u=f.height,g=f.offset,w=f.position),w=this.reposition.offset(k,w,o),(cb.iOS>3.1&&cb.iOS<4.1||cb.iOS>=4.3&&cb.iOS<4.33||!cb.iOS&&"fixed"===v)&&(w.left-=z.scrollLeft(),w.top-=z.scrollTop()),(!f||f&&f.adjustable!==D)&&(w.left+=m.x===M?t:m.x===N?t/2:0,w.top+=m.y===L?u:m.y===N?u/2:0)}return w.left+=p.x+(l.x===M?-r:l.x===N?-r/2:0),w.top+=p.y+(l.y===L?-s:l.y===N?-s/2:0),Q.viewport?(w.adjusted=Q.viewport(this,w,j,t,u,r,s),g&&w.adjusted.left&&(w.left+=g.left),g&&w.adjusted.top&&(w.top+=g.top)):w.adjusted={left:0,top:0},this._trigger("move",[w,n.elem||n],c)?(delete w.adjusted,e===D||!x||isNaN(w.left)||isNaN(w.top)||"mouse"===k||!d.isFunction(j.effect)?i.css(w):d.isFunction(j.effect)&&(j.effect.call(i,this,d.extend({},w)),i.queue(function(a){d(this).css({opacity:"",height:""}),cb.ie&&this.style.removeAttribute("filter"),a()})),this.positioning=D,this):this},y.reposition.offset=function(a,c,e){function f(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}if(!e[0])return c;var g,h,i,j,k=d(a[0].ownerDocument),l=!!cb.ie&&"CSS1Compat"!==b.compatMode,m=e[0];do"static"!==(h=d.css(m,"position"))&&("fixed"===h?(i=m.getBoundingClientRect(),f(k,-1)):(i=d(m).position(),i.left+=parseFloat(d.css(m,"borderLeftWidth"))||0,i.top+=parseFloat(d.css(m,"borderTopWidth"))||0),c.left-=i.left+(parseFloat(d.css(m,"marginLeft"))||0),c.top-=i.top+(parseFloat(d.css(m,"marginTop"))||0),g||"hidden"===(j=d.css(m,"overflow"))||"visible"===j||(g=d(m)));while(m=m.offsetParent);return g&&(g[0]!==k[0]||l)&&f(g,1),c};var fb=(z=y.reposition.Corner=function(a,b){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,N).toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!b;var c=a.charAt(0);this.precedance="t"===c||"b"===c?G:F}).prototype;fb.invert=function(a,b){this[a]=this[a]===K?M:this[a]===M?K:b||this[a]},fb.string=function(){var a=this.x,b=this.y;return a===b?a:this.precedance===G||this.forceY&&"center"!==b?b+" "+a:a+" "+b},fb.abbrev=function(){var a=this.string().split(" ");return a[0].charAt(0)+(a[1]&&a[1].charAt(0)||"")},fb.clone=function(){return new z(this.string(),this.forceY)},y.toggle=function(a,c){var e=this.cache,f=this.options,g=this.tooltip;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(e.event.type)&&f.show.target.add(c.target).length===f.show.target.length&&g.has(c.relatedTarget).length)return this;e.event=l(c)}if(this.waiting&&!a&&(this.hiddenDuringWait=C),!this.rendered)return a?this.render(1):this;if(this.destroyed||this.disabled)return this;var h,i,j,k=a?"show":"hide",m=this.options[k],n=(this.options[a?"hide":"show"],this.options.position),o=this.options.content,p=this.tooltip.css("width"),q=this.tooltip.is(":visible"),r=a||1===m.target.length,s=!c||m.target.length<2||e.target[0]===c.target;return(typeof a).search("boolean|number")&&(a=!q),h=!g.is(":animated")&&q===a&&s,i=h?E:!!this._trigger(k,[90]),this.destroyed?this:(i!==D&&a&&this.focus(c),!i||h?this:(d.attr(g[0],"aria-hidden",!a),a?(e.origin=l(this.mouse),d.isFunction(o.text)&&this._updateContent(o.text,D),d.isFunction(o.title)&&this._updateTitle(o.title,D),!B&&"mouse"===n.target&&n.adjust.mouse&&(d(b).bind("mousemove."+R,this._storeMouse),B=C),p||g.css("width",g.outerWidth(D)),this.reposition(c,arguments[2]),p||g.css("width",""),m.solo&&("string"==typeof m.solo?d(m.solo):d(V,m.solo)).not(g).not(m.target).qtip("hide",d.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete e.origin,B&&!d(V+'[tracking="true"]:visible',m.solo).not(g).length&&(d(b).unbind("mousemove."+R),B=D),this.blur(c)),j=d.proxy(function(){a?(cb.ie&&g[0].style.removeAttribute("filter"),g.css("overflow",""),"string"==typeof m.autofocus&&d(this.options.show.autofocus,g).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):g.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(a?"visible":"hidden")},this),m.effect===D||r===D?(g[k](),j()):d.isFunction(m.effect)?(g.stop(1,1),m.effect.call(g,this),g.queue("fx",function(a){j(),a()})):g.fadeTo(90,a?1:0,j),a&&m.target.trigger("qtip-"+this.id+"-inactive"),this))},y.show=function(a){return this.toggle(C,a)},y.hide=function(a){return this.toggle(D,a)},y.focus=function(a){if(!this.rendered||this.destroyed)return this;var b=d(V),c=this.tooltip,e=parseInt(c[0].style.zIndex,10),f=x.zindex+b.length;return c.hasClass(Z)||this._trigger("focus",[f],a)&&(e!==f&&(b.each(function(){this.style.zIndex>e&&(this.style.zIndex=this.style.zIndex-1)}),b.filter("."+Z).qtip("blur",a)),c.addClass(Z)[0].style.zIndex=f),this},y.blur=function(a){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(Z),this._trigger("blur",[this.tooltip.css("zIndex")],a),this)},y.disable=function(a){return this.destroyed?this:("toggle"===a?a=!(this.rendered?this.tooltip.hasClass(_):this.disabled):"boolean"!=typeof a&&(a=C),this.rendered&&this.tooltip.toggleClass(_,a).attr("aria-disabled",a),this.disabled=!!a,this)},y.enable=function(){return this.disable(D)},y._createButton=function(){var a=this,b=this.elements,c=b.tooltip,e=this.options.content.button,f="string"==typeof e,g=f?e:"Close tooltip";b.button&&b.button.remove(),b.button=e.jquery?e:d("<a />",{"class":"qtip-close "+(this.options.style.widget?"":R+"-icon"),title:g,"aria-label":g}).prepend(d("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"})),b.button.appendTo(b.titlebar||c).attr("role","button").click(function(b){return c.hasClass(_)||a.hide(b),D})},y._updateButton=function(a){if(!this.rendered)return D;var b=this.elements.button;a?this._createButton():b.remove()},y._setWidget=function(){var a=this.options.style.widget,b=this.elements,c=b.tooltip,d=c.hasClass(_);c.removeClass(_),_=a?"ui-state-disabled":"qtip-disabled",c.toggleClass(_,d),c.toggleClass("ui-helper-reset "+k(),a).toggleClass(Y,this.options.style.def&&!a),b.content&&b.content.toggleClass(k("content"),a),b.titlebar&&b.titlebar.toggleClass(k("header"),a),b.button&&b.button.toggleClass(R+"-icon",!a)},y._storeMouse=function(a){(this.mouse=l(a)).type="mousemove"},y._bind=function(a,b,c,e,f){var g="."+this._id+(e?"-"+e:"");b.length&&d(a).bind((b.split?b:b.join(g+" "))+g,d.proxy(c,f||this))},y._unbind=function(a,b){d(a).unbind("."+this._id+(b?"-"+b:""))};var gb="."+R;d(function(){r(V,["mouseenter","mouseleave"],function(a){var b="mouseenter"===a.type,c=d(a.currentTarget),e=d(a.relatedTarget||a.target),f=this.options;b?(this.focus(a),c.hasClass(X)&&!c.hasClass(_)&&clearTimeout(this.timers.hide)):"mouse"===f.position.target&&f.hide.event&&f.show.target&&!e.closest(f.show.target[0]).length&&this.hide(a),c.toggleClass($,b)}),r("["+T+"]",W,p)}),y._trigger=function(a,b,c){var e=d.Event("tooltip"+a);return e.originalEvent=c&&d.extend({},c)||this.cache.event||E,this.triggering=a,this.tooltip.trigger(e,[this].concat(b||[])),this.triggering=D,!e.isDefaultPrevented()},y._bindEvents=function(a,b,c,e,f,g){if(e.add(c).length===e.length){var h=[];b=d.map(b,function(b){var c=d.inArray(b,a);return c>-1?(h.push(a.splice(c,1)[0]),void 0):b}),h.length&&this._bind(c,h,function(a){var b=this.rendered?this.tooltip[0].offsetWidth>0:!1;(b?g:f).call(this,a)})}this._bind(c,a,f),this._bind(e,b,g)},y._assignInitialEvents=function(a){function b(a){return this.disabled||this.destroyed?D:(this.cache.event=l(a),this.cache.target=a?d(a.target):[c],clearTimeout(this.timers.show),this.timers.show=m.call(this,function(){this.render("object"==typeof a||e.show.ready)},e.show.delay),void 0)}var e=this.options,f=e.show.target,g=e.hide.target,h=e.show.event?d.trim(""+e.show.event).split(" "):[],i=e.hide.event?d.trim(""+e.hide.event).split(" "):[];/mouse(over|enter)/i.test(e.show.event)&&!/mouse(out|leave)/i.test(e.hide.event)&&i.push("mouseleave"),this._bind(f,"mousemove",function(a){this._storeMouse(a),this.cache.onTarget=C}),this._bindEvents(h,i,f,g,b,function(){clearTimeout(this.timers.show)}),(e.show.ready||e.prerender)&&b.call(this,a)},y._assignEvents=function(){var c=this,e=this.options,f=e.position,g=this.tooltip,h=e.show.target,i=e.hide.target,j=f.container,k=f.viewport,l=d(b),m=(d(b.body),d(a)),r=e.show.event?d.trim(""+e.show.event).split(" "):[],s=e.hide.event?d.trim(""+e.hide.event).split(" "):[];d.each(e.events,function(a,b){c._bind(g,"toggle"===a?["tooltipshow","tooltiphide"]:["tooltip"+a],b,null,g)}),/mouse(out|leave)/i.test(e.hide.event)&&"window"===e.hide.leave&&this._bind(l,["mouseout","blur"],function(a){/select|option/.test(a.target.nodeName)||a.relatedTarget||this.hide(a)}),e.hide.fixed?i=i.add(g.addClass(X)):/mouse(over|enter)/i.test(e.show.event)&&this._bind(i,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+e.hide.event).indexOf("unfocus")>-1&&this._bind(j.closest("html"),["mousedown","touchstart"],function(a){var b=d(a.target),c=this.rendered&&!this.tooltip.hasClass(_)&&this.tooltip[0].offsetWidth>0,e=b.parents(V).filter(this.tooltip[0]).length>0;b[0]===this.target[0]||b[0]===this.tooltip[0]||e||this.target.has(b[0]).length||!c||this.hide(a)}),"number"==typeof e.hide.inactive&&(this._bind(h,"qtip-"+this.id+"-inactive",p),this._bind(i.add(g),x.inactiveEvents,p,"-inactive")),this._bindEvents(r,s,h,i,n,o),this._bind(h.add(g),"mousemove",function(a){if("number"==typeof e.hide.distance){var b=this.cache.origin||{},c=this.options.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&this.hide(a)}this._storeMouse(a)}),"mouse"===f.target&&f.adjust.mouse&&(e.hide.event&&this._bind(h,["mouseenter","mouseleave"],function(a){this.cache.onTarget="mouseenter"===a.type}),this._bind(l,"mousemove",function(a){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(_)&&this.tooltip[0].offsetWidth>0&&this.reposition(a)})),(f.adjust.resize||k.length)&&this._bind(d.event.special.resize?k:m,"resize",q),f.adjust.scroll&&this._bind(m.add(f.container),"scroll",q)},y._unassignEvents=function(){var c=[this.options.show.target[0],this.options.hide.target[0],this.rendered&&this.tooltip[0],this.options.position.container[0],this.options.position.viewport[0],this.options.position.container.closest("html")[0],a,b];this._unbind(d([]).pushStack(d.grep(c,function(a){return"object"==typeof a})))},x=d.fn.qtip=function(a,b,e){var f=(""+a).toLowerCase(),g=E,i=d.makeArray(arguments).slice(1),j=i[i.length-1],k=this[0]?d.data(this[0],R):E;return!arguments.length&&k||"api"===f?k:"string"==typeof a?(this.each(function(){var a=d.data(this,R);if(!a)return C;if(j&&j.timeStamp&&(a.cache.event=j),!b||"option"!==f&&"options"!==f)a[f]&&a[f].apply(a,i);else{if(e===c&&!d.isPlainObject(b))return g=a.get(b),D;a.set(b,e)}}),g!==E?g:this):"object"!=typeof a&&arguments.length?void 0:(k=h(d.extend(C,{},a)),this.each(function(a){var b,c;return c=d.isArray(k.id)?k.id[a]:k.id,c=!c||c===D||c.length<1||x.api[c]?x.nextid++:c,b=s(d(this),c,k),b===D?C:(x.api[c]=b,d.each(Q,function(){"initialize"===this.initialize&&this(b)}),b._assignInitialEvents(j),void 0)}))},d.qtip=e,x.api={},d.each({attr:function(a,b){if(this.length){var c=this[0],e="title",f=d.data(c,"qtip");if(a===e&&f&&"object"==typeof f&&f.options.suppress)return arguments.length<2?d.attr(c,bb):(f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",b),this.attr(bb,b))}return d.fn["attr"+ab].apply(this,arguments)},clone:function(a){var b=(d([]),d.fn["clone"+ab].apply(this,arguments));return a||b.filter("["+bb+"]").attr("title",function(){return d.attr(this,bb)}).removeAttr(bb),b}},function(a,b){if(!b||d.fn[a+ab])return C;var c=d.fn[a+ab]=d.fn[a];d.fn[a]=function(){return b.apply(this,arguments)||c.apply(this,arguments)}}),d.ui||(d["cleanData"+ab]=d.cleanData,d.cleanData=function(a){for(var b,c=0;(b=d(a[c])).length;c++)if(b.attr(S))try{b.triggerHandler("removeqtip")}catch(e){}d["cleanData"+ab].apply(this,arguments)}),x.version="2.2.0",x.nextid=0,x.inactiveEvents=W,x.zindex=15e3,x.defaults={prerender:D,id:D,overwrite:C,suppress:C,content:{text:C,attr:"title",title:D,button:D},position:{my:"top left",at:"bottom right",target:D,container:D,viewport:D,adjust:{x:0,y:0,mouse:C,scroll:C,resize:C,method:"flipinvert flipinvert"},effect:function(a,b){d(this).animate(b,{duration:200,queue:D})}},show:{target:D,event:"mouseenter",effect:C,delay:90,solo:D,ready:D,autofocus:D},hide:{target:D,event:"mouseleave",effect:C,delay:0,fixed:D,inactive:D,leave:"window",distance:D},style:{classes:"",widget:D,width:D,height:D,def:C},events:{render:E,move:E,show:E,hide:E,toggle:E,visible:E,hidden:E,focus:E,blur:E}};var hb,ib="margin",jb="border",kb="color",lb="background-color",mb="transparent",nb=" !important",ob=!!b.createElement("canvas").getContext,pb=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,qb={},rb=["Webkit","O","Moz","ms"];if(ob)var sb=a.devicePixelRatio||1,tb=function(){var a=b.createElement("canvas").getContext("2d");return a.backingStorePixelRatio||a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||1}(),ub=sb/tb;else var vb=function(a,b,c){return"<qtipvml:"+a+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(b||"")+' style="behavior: url(#default#VML); '+(c||"")+'" />'};d.extend(w.prototype,{init:function(a){var b,c;c=this.element=a.elements.tip=d("<div />",{"class":R+"-tip"}).prependTo(a.tooltip),ob?(b=d("<canvas />").appendTo(this.element)[0].getContext("2d"),b.lineJoin="miter",b.miterLimit=1e5,b.save()):(b=vb("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(b+b),a._bind(d("*",c).add(c),["click","mousedown"],function(a){a.stopPropagation()},this._ns)),a._bind(a.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(a){var b=this.qtip.elements.titlebar;return b&&(a.y===J||a.y===N&&this.element.position().top+this.size[1]/2+this.options.offset<b.outerHeight(C))},_parseCorner:function(a){var b=this.qtip.options.position.my;return a===D||b===D?a=D:a===C?a=new z(b.string()):a.string||(a=new z(a),a.fixed=C),a},_parseWidth:function(a,b,c){var d=this.qtip.elements,e=jb+t(b)+"Width";return(c?v(c,e):v(d.content,e)||v(this._useTitle(a)&&d.titlebar||d.content,e)||v(d.tooltip,e))||0},_parseRadius:function(a){var b=this.qtip.elements,c=jb+t(a.y)+t(a.x)+"Radius";return cb.ie<9?0:v(this._useTitle(a)&&b.titlebar||b.content,c)||v(b.tooltip,c)||0},_invalidColour:function(a,b,c){var d=a.css(b);return!d||c&&d===a.css(c)||pb.test(d)?D:d},_parseColours:function(a){var b=this.qtip.elements,c=this.element.css("cssText",""),e=jb+t(a[a.precedance])+t(kb),f=this._useTitle(a)&&b.titlebar||b.content,g=this._invalidColour,h=[];return h[0]=g(c,lb)||g(f,lb)||g(b.content,lb)||g(b.tooltip,lb)||c.css(lb),h[1]=g(c,e,kb)||g(f,e,kb)||g(b.content,e,kb)||g(b.tooltip,e,kb)||b.tooltip.css(e),d("*",c).add(c).css("cssText",lb+":"+mb+nb+";"+jb+":0"+nb+";"),h},_calculateSize:function(a){var b,c,d,e=a.precedance===G,f=this.options.width,g=this.options.height,h="c"===a.abbrev(),i=(e?f:g)*(h?.5:1),j=Math.pow,k=Math.round,l=Math.sqrt(j(i,2)+j(g,2)),m=[this.border/i*l,this.border/g*l];return m[2]=Math.sqrt(j(m[0],2)-j(this.border,2)),m[3]=Math.sqrt(j(m[1],2)-j(this.border,2)),b=l+m[2]+m[3]+(h?0:m[0]),c=b/l,d=[k(c*f),k(c*g)],e?d:d.reverse()},_calculateTip:function(a,b,c){c=c||1,b=b||this.size;var d=b[0]*c,e=b[1]*c,f=Math.ceil(d/2),g=Math.ceil(e/2),h={br:[0,0,d,e,d,0],bl:[0,0,d,0,0,e],tr:[0,e,d,0,d,e],tl:[0,0,0,e,d,e],tc:[0,e,f,0,d,e],bc:[0,0,d,0,f,e],rc:[0,0,d,g,0,e],lc:[d,0,d,e,0,g]};return h.lt=h.br,h.rt=h.bl,h.lb=h.tr,h.rb=h.tl,h[a.abbrev()]},_drawCoords:function(a,b){a.beginPath(),a.moveTo(b[0],b[1]),a.lineTo(b[2],b[3]),a.lineTo(b[4],b[5]),a.closePath()},create:function(){var a=this.corner=(ob||cb.ie)&&this._parseCorner(this.options.corner);return(this.enabled=!!this.corner&&"c"!==this.corner.abbrev())&&(this.qtip.cache.corner=a.clone(),this.update()),this.element.toggle(this.enabled),this.corner},update:function(b,c){if(!this.enabled)return this;var e,f,g,h,i,j,k,l,m=this.qtip.elements,n=this.element,o=n.children(),p=this.options,q=this.size,r=p.mimic,s=Math.round;b||(b=this.qtip.cache.corner||this.corner),r===D?r=b:(r=new z(r),r.precedance=b.precedance,"inherit"===r.x?r.x=b.x:"inherit"===r.y?r.y=b.y:r.x===r.y&&(r[b.precedance]=b[b.precedance])),f=r.precedance,b.precedance===F?this._swapDimensions():this._resetDimensions(),e=this.color=this._parseColours(b),e[1]!==mb?(l=this.border=this._parseWidth(b,b[b.precedance]),p.border&&1>l&&!pb.test(e[1])&&(e[0]=e[1]),this.border=l=p.border!==C?p.border:l):this.border=l=0,k=this.size=this._calculateSize(b),n.css({width:k[0],height:k[1],lineHeight:k[1]+"px"}),j=b.precedance===G?[s(r.x===K?l:r.x===M?k[0]-q[0]-l:(k[0]-q[0])/2),s(r.y===J?k[1]-q[1]:0)]:[s(r.x===K?k[0]-q[0]:0),s(r.y===J?l:r.y===L?k[1]-q[1]-l:(k[1]-q[1])/2)],ob?(g=o[0].getContext("2d"),g.restore(),g.save(),g.clearRect(0,0,6e3,6e3),h=this._calculateTip(r,q,ub),i=this._calculateTip(r,this.size,ub),o.attr(H,k[0]*ub).attr(I,k[1]*ub),o.css(H,k[0]).css(I,k[1]),this._drawCoords(g,i),g.fillStyle=e[1],g.fill(),g.translate(j[0]*ub,j[1]*ub),this._drawCoords(g,h),g.fillStyle=e[0],g.fill()):(h=this._calculateTip(r),h="m"+h[0]+","+h[1]+" l"+h[2]+","+h[3]+" "+h[4]+","+h[5]+" xe",j[2]=l&&/^(r|b)/i.test(b.string())?8===cb.ie?2:1:0,o.css({coordsize:k[0]+l+" "+(k[1]+l),antialias:""+(r.string().indexOf(N)>-1),left:j[0]-j[2]*Number(f===F),top:j[1]-j[2]*Number(f===G),width:k[0]+l,height:k[1]+l}).each(function(a){var b=d(this);b[b.prop?"prop":"attr"]({coordsize:k[0]+l+" "+(k[1]+l),path:h,fillcolor:e[0],filled:!!a,stroked:!a}).toggle(!(!l&&!a)),!a&&b.html(vb("stroke",'weight="'+2*l+'px" color="'+e[1]+'" miterlimit="1000" joinstyle="miter"'))})),a.opera&&setTimeout(function(){m.tip.css({display:"inline-block",visibility:"visible"})},1),c!==D&&this.calculate(b,k)},calculate:function(a,b){if(!this.enabled)return D;var c,e,f=this,g=this.qtip.elements,h=this.element,i=this.options.offset,j=(g.tooltip.hasClass("ui-widget"),{});return a=a||this.corner,c=a.precedance,b=b||this._calculateSize(a),e=[a.x,a.y],c===F&&e.reverse(),d.each(e,function(d,e){var h,k,l;e===N?(h=c===G?K:J,j[h]="50%",j[ib+"-"+h]=-Math.round(b[c===G?0:1]/2)+i):(h=f._parseWidth(a,e,g.tooltip),k=f._parseWidth(a,e,g.content),l=f._parseRadius(a),j[e]=Math.max(-f.border,d?k:i+(l>h?l:-h)))}),j[a[c]]-=b[c===F?0:1],h.css({margin:"",top:"",bottom:"",left:"",right:""}).css(j),j
4
  },reposition:function(a,b,d){function e(a,b,c,d,e){a===P&&j.precedance===b&&k[d]&&j[c]!==N?j.precedance=j.precedance===F?G:F:a!==P&&k[d]&&(j[b]=j[b]===N?k[d]>0?d:e:j[b]===d?e:d)}function f(a,b,e){j[a]===N?p[ib+"-"+b]=o[a]=g[ib+"-"+b]-k[b]:(h=g[e]!==c?[k[b],-g[b]]:[-k[b],g[b]],(o[a]=Math.max(h[0],h[1]))>h[0]&&(d[b]-=k[b],o[b]=D),p[g[e]!==c?e:b]=o[a])}if(this.enabled){var g,h,i=b.cache,j=this.corner.clone(),k=d.adjusted,l=b.options.position.adjust.method.split(" "),m=l[0],n=l[1]||l[0],o={left:D,top:D,x:0,y:0},p={};this.corner.fixed!==C&&(e(m,F,G,K,M),e(n,G,F,J,L),j.string()===i.corner.string()||i.cornerTop===k.top&&i.cornerLeft===k.left||this.update(j,D)),g=this.calculate(j),g.right!==c&&(g.left=-g.right),g.bottom!==c&&(g.top=-g.bottom),g.user=this.offset,(o.left=m===P&&!!k.left)&&f(F,K,M),(o.top=n===P&&!!k.top)&&f(G,J,L),this.element.css(p).toggle(!(o.x&&o.y||j.x===N&&o.y||j.y===N&&o.x)),d.left-=g.left.charAt?g.user:m!==P||o.top||!o.left&&!o.top?g.left+this.border:0,d.top-=g.top.charAt?g.user:n!==P||o.left||!o.left&&!o.top?g.top+this.border:0,i.cornerLeft=k.left,i.cornerTop=k.top,i.corner=j.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),hb=Q.tip=function(a){return new w(a,a.options.style.tip)},hb.initialize="render",hb.sanitize=function(a){if(a.style&&"tip"in a.style){var b=a.style.tip;"object"!=typeof b&&(b=a.style.tip={corner:b}),/string|boolean/i.test(typeof b.corner)||(b.corner=C)}},A.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(a){this.size=[a.width,a.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},d.extend(C,x.defaults,{style:{tip:{corner:C,mimic:D,width:6,height:6,border:C,offset:0}}}),Q.viewport=function(c,d,e,f,g,h,i){function j(a,b,c,e,f,g,h,i,j){var k=d[f],m=v[a],t=w[a],u=c===P,x=m===f?j:m===g?-j:-j/2,y=t===f?i:t===g?-i:-i/2,z=r[f]+s[f]-(o?0:n[f]),A=z-k,B=k+j-(h===H?p:q)-z,C=x-(v.precedance===a||m===v[b]?y:0)-(t===N?i/2:0);return u?(C=(m===f?1:-1)*x,d[f]+=A>0?A:B>0?-B:0,d[f]=Math.max(-n[f]+s[f],k-C,Math.min(Math.max(-n[f]+s[f]+(h===H?p:q),k+C),d[f],"center"===m?k-x:1e9))):(e*=c===O?2:0,A>0&&(m!==f||B>0)?(d[f]-=C+e,l.invert(a,f)):B>0&&(m!==g||A>0)&&(d[f]-=(m===N?-C:C)+e,l.invert(a,g)),d[f]<r&&-d[f]>B&&(d[f]=k,l=v.clone())),d[f]-k}var k,l,m,n,o,p,q,r,s,t=e.target,u=c.elements.tooltip,v=e.my,w=e.at,x=e.adjust,y=x.method.split(" "),z=y[0],A=y[1]||y[0],B=e.viewport,C=e.container,E=c.cache,Q={left:0,top:0};return B.jquery&&t[0]!==a&&t[0]!==b.body&&"none"!==x.method?(n=C.offset()||Q,o="static"===C.css("position"),k="fixed"===u.css("position"),p=B[0]===a?B.width():B.outerWidth(D),q=B[0]===a?B.height():B.outerHeight(D),r={left:k?0:B.scrollLeft(),top:k?0:B.scrollTop()},s=B.offset()||Q,("shift"!==z||"shift"!==A)&&(l=v.clone()),Q={left:"none"!==z?j(F,G,z,x.x,K,M,H,f,h):0,top:"none"!==A?j(G,F,A,x.y,J,L,I,g,i):0},l&&E.lastClass!==(m=R+"-pos-"+l.abbrev())&&u.removeClass(c.cache.lastClass).addClass(c.cache.lastClass=m),Q):Q}})}(window,document);
5
- //# sourceMappingURL=http://cdnjs.cloudflare.com/ajax/libs/qtip2/2.2.0//var/www/qtip2/build/tmp/tmp-11954ixg744g/jquery.qtip.min.map
2
 
3
  !function(a,b,c){!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):jQuery&&!jQuery.fn.qtip&&a(jQuery)}(function(d){"use strict";function e(a,b,c,e){this.id=c,this.target=a,this.tooltip=E,this.elements={target:a},this._id=R+"-"+c,this.timers={img:{}},this.options=b,this.plugins={},this.cache={event:{},target:d(),disabled:D,attr:e,onTooltip:D,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=D}function f(a){return a===E||"object"!==d.type(a)}function g(a){return!(d.isFunction(a)||a&&a.attr||a.length||"object"===d.type(a)&&(a.jquery||a.then))}function h(a){var b,c,e,h;return f(a)?D:(f(a.metadata)&&(a.metadata={type:a.metadata}),"content"in a&&(b=a.content,f(b)||b.jquery||b.done?b=a.content={text:c=g(b)?D:b}:c=b.text,"ajax"in b&&(e=b.ajax,h=e&&e.once!==D,delete b.ajax,b.text=function(a,b){var f=c||d(this).attr(b.options.content.attr)||"Loading...",g=d.ajax(d.extend({},e,{context:b})).then(e.success,E,e.error).then(function(a){return a&&h&&b.set("content.text",a),a},function(a,c,d){b.destroyed||0===a.status||b.set("content.text",c+": "+d)});return h?f:(b.set("content.text",f),g)}),"title"in b&&(f(b.title)||(b.button=b.title.button,b.title=b.title.text),g(b.title||D)&&(b.title=D))),"position"in a&&f(a.position)&&(a.position={my:a.position,at:a.position}),"show"in a&&f(a.show)&&(a.show=a.show.jquery?{target:a.show}:a.show===C?{ready:C}:{event:a.show}),"hide"in a&&f(a.hide)&&(a.hide=a.hide.jquery?{target:a.hide}:{event:a.hide}),"style"in a&&f(a.style)&&(a.style={classes:a.style}),d.each(Q,function(){this.sanitize&&this.sanitize(a)}),a)}function i(a,b){for(var c,d=0,e=a,f=b.split(".");e=e[f[d++]];)d<f.length&&(c=e);return[c||a,f.pop()]}function j(a,b){var c,d,e;for(c in this.checks)for(d in this.checks[c])(e=new RegExp(d,"i").exec(a))&&(b.push(e),("builtin"===c||this.plugins[c])&&this.checks[c][d].apply(this.plugins[c]||this,b))}function k(a){return U.concat("").join(a?"-"+a+" ":" ")}function l(c){return c&&{type:c.type,pageX:c.pageX,pageY:c.pageY,target:c.target,relatedTarget:c.relatedTarget,scrollX:c.scrollX||a.pageXOffset||b.body.scrollLeft||b.documentElement.scrollLeft,scrollY:c.scrollY||a.pageYOffset||b.body.scrollTop||b.documentElement.scrollTop}||{}}function m(a,b){return b>0?setTimeout(d.proxy(a,this),b):(a.call(this),void 0)}function n(a){return this.tooltip.hasClass(_)?D:(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this.timers.show=m.call(this,function(){this.toggle(C,a)},this.options.show.delay),void 0)}function o(a){if(this.tooltip.hasClass(_))return D;var b=d(a.relatedTarget),c=b.closest(V)[0]===this.tooltip[0],e=b[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==b[0]&&"mouse"===this.options.position.target&&c||this.options.hide.fixed&&/mouse(out|leave|move)/.test(a.type)&&(c||e))try{a.preventDefault(),a.stopImmediatePropagation()}catch(f){}else this.timers.hide=m.call(this,function(){this.toggle(D,a)},this.options.hide.delay,this)}function p(a){return this.tooltip.hasClass(_)||!this.options.hide.inactive?D:(clearTimeout(this.timers.inactive),this.timers.inactive=m.call(this,function(){this.hide(a)},this.options.hide.inactive),void 0)}function q(a){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(a)}function r(a,c,e){d(b.body).delegate(a,(c.split?c:c.join(gb+" "))+gb,function(){var a=x.api[d.attr(this,T)];a&&!a.disabled&&e.apply(a,arguments)})}function s(a,c,f){var g,i,j,k,l,m=d(b.body),n=a[0]===b?m:a,o=a.metadata?a.metadata(f.metadata):E,p="html5"===f.metadata.type&&o?o[f.metadata.name]:E,q=a.data(f.metadata.name||"qtipopts");try{q="string"==typeof q?d.parseJSON(q):q}catch(r){}if(k=d.extend(C,{},x.defaults,f,"object"==typeof q?h(q):E,h(p||o)),i=k.position,k.id=c,"boolean"==typeof k.content.text){if(j=a.attr(k.content.attr),k.content.attr===D||!j)return D;k.content.text=j}if(i.container.length||(i.container=m),i.target===D&&(i.target=n),k.show.target===D&&(k.show.target=n),k.show.solo===C&&(k.show.solo=i.container.closest("body")),k.hide.target===D&&(k.hide.target=n),k.position.viewport===C&&(k.position.viewport=i.container),i.container=i.container.eq(0),i.at=new z(i.at,C),i.my=new z(i.my),a.data(R))if(k.overwrite)a.qtip("destroy",!0);else if(k.overwrite===D)return D;return a.attr(S,c),k.suppress&&(l=a.attr("title"))&&a.removeAttr("title").attr(bb,l).attr("title",""),g=new e(a,k,c,!!j),a.data(R,g),a.one("remove.qtip-"+c+" removeqtip.qtip-"+c,function(){var a;(a=d(this).data(R))&&a.destroy(!0)}),g}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function u(a,b){var d,e,f=b.charAt(0).toUpperCase()+b.slice(1),g=(b+" "+rb.join(f+" ")+f).split(" "),h=0;if(qb[b])return a.css(qb[b]);for(;d=g[h++];)if((e=a.css(d))!==c)return qb[b]=d,e}function v(a,b){return Math.ceil(parseFloat(u(a,b)))}function w(a,b){this._ns="tip",this.options=b,this.offset=b.offset,this.size=[b.width,b.height],this.init(this.qtip=a)}var x,y,z,A,B,C=!0,D=!1,E=null,F="x",G="y",H="width",I="height",J="top",K="left",L="bottom",M="right",N="center",O="flipinvert",P="shift",Q={},R="qtip",S="data-hasqtip",T="data-qtip-id",U=["ui-widget","ui-tooltip"],V="."+R,W="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),X=R+"-fixed",Y=R+"-default",Z=R+"-focus",$=R+"-hover",_=R+"-disabled",ab="_replacedByqTip",bb="oldtitle",cb={ie:function(){for(var a=3,c=b.createElement("div");(c.innerHTML="<!--[if gt IE "+ ++a+"]><i></i><![endif]-->")&&c.getElementsByTagName("i")[0];);return a>4?a:0/0}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||D};y=e.prototype,y._when=function(a){return d.when.apply(d,a)},y.render=function(a){if(this.rendered||this.destroyed)return this;var b,c=this,e=this.options,f=this.cache,g=this.elements,h=e.content.text,i=e.content.title,j=e.content.button,k=e.position,l=("."+this._id+" ",[]);return d.attr(this.target[0],"aria-describedby",this._id),this.tooltip=g.tooltip=b=d("<div/>",{id:this._id,"class":[R,Y,e.style.classes,R+"-pos-"+e.position.my.abbrev()].join(" "),width:e.style.width||"",height:e.style.height||"",tracking:"mouse"===k.target&&k.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":D,"aria-describedby":this._id+"-content","aria-hidden":C}).toggleClass(_,this.disabled).attr(T,this.id).data(R,this).appendTo(k.container).append(g.content=d("<div />",{"class":R+"-content",id:this._id+"-content","aria-atomic":C})),this.rendered=-1,this.positioning=C,i&&(this._createTitle(),d.isFunction(i)||l.push(this._updateTitle(i,D))),j&&this._createButton(),d.isFunction(h)||l.push(this._updateContent(h,D)),this.rendered=C,this._setWidget(),d.each(Q,function(a){var b;"render"===this.initialize&&(b=this(c))&&(c.plugins[a]=b)}),this._unassignEvents(),this._assignEvents(),this._when(l).then(function(){c._trigger("render"),c.positioning=D,c.hiddenDuringWait||!e.show.ready&&!a||c.toggle(C,f.event,D),c.hiddenDuringWait=D}),x.api[this.id]=this,this},y.destroy=function(a){function b(){if(!this.destroyed){this.destroyed=C;var a=this.target,b=a.attr(bb);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),d.each(this.plugins,function(){this.destroy&&this.destroy()}),clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this._unassignEvents(),a.removeData(R).removeAttr(T).removeAttr(S).removeAttr("aria-describedby"),this.options.suppress&&b&&a.attr("title",b).removeAttr(bb),this._unbind(a),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=E,delete x.api[this.id]}}return this.destroyed?this.target:(a===C&&"hide"!==this.triggering||!this.rendered?b.call(this):(this.tooltip.one("tooltiphidden",d.proxy(b,this)),!this.triggering&&this.hide()),this.target)},A=y.checks={builtin:{"^id$":function(a,b,c,e){var f=c===C?x.nextid:c,g=R+"-"+f;f!==D&&f.length>0&&!d("#"+g).length?(this._id=g,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):a[b]=e},"^prerender":function(a,b,c){c&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(a,b,c){this._updateContent(c)},"^content.attr$":function(a,b,c,d){this.options.content.text===this.target.attr(d)&&this._updateContent(this.target.attr(c))},"^content.title$":function(a,b,c){return c?(c&&!this.elements.title&&this._createTitle(),this._updateTitle(c),void 0):this._removeTitle()},"^content.button$":function(a,b,c){this._updateButton(c)},"^content.title.(text|button)$":function(a,b,c){this.set("content."+b,c)},"^position.(my|at)$":function(a,b,c){"string"==typeof c&&(a[b]=new z(c,"at"===b))},"^position.container$":function(a,b,c){this.rendered&&this.tooltip.appendTo(c)},"^show.ready$":function(a,b,c){c&&(!this.rendered&&this.render(C)||this.toggle(C))},"^style.classes$":function(a,b,c,d){this.rendered&&this.tooltip.removeClass(d).addClass(c)},"^style.(width|height)":function(a,b,c){this.rendered&&this.tooltip.css(b,c)},"^style.widget|content.title":function(){this.rendered&&this._setWidget()},"^style.def":function(a,b,c){this.rendered&&this.tooltip.toggleClass(Y,!!c)},"^events.(render|show|move|hide|focus|blur)$":function(a,b,c){this.rendered&&this.tooltip[(d.isFunction(c)?"":"un")+"bind"]("tooltip"+b,c)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){if(this.rendered){var a=this.options.position;this.tooltip.attr("tracking","mouse"===a.target&&a.adjust.mouse),this._unassignEvents(),this._assignEvents()}}}},y.get=function(a){if(this.destroyed)return this;var b=i(this.options,a.toLowerCase()),c=b[0][b[1]];return c.precedance?c.string():c};var db=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,eb=/^prerender|show\.ready/i;y.set=function(a,b){if(this.destroyed)return this;{var c,e=this.rendered,f=D,g=this.options;this.checks}return"string"==typeof a?(c=a,a={},a[c]=b):a=d.extend({},a),d.each(a,function(b,c){if(e&&eb.test(b))return delete a[b],void 0;var h,j=i(g,b.toLowerCase());h=j[0][j[1]],j[0][j[1]]=c&&c.nodeType?d(c):c,f=db.test(b)||f,a[b]=[j[0],j[1],c,h]}),h(g),this.positioning=C,d.each(a,d.proxy(j,this)),this.positioning=D,this.rendered&&this.tooltip[0].offsetWidth>0&&f&&this.reposition("mouse"===g.position.target?E:this.cache.event),this},y._update=function(a,b){var c=this,e=this.cache;return this.rendered&&a?(d.isFunction(a)&&(a=a.call(this.elements.target,e.event,this)||""),d.isFunction(a.then)?(e.waiting=C,a.then(function(a){return e.waiting=D,c._update(a,b)},E,function(a){return c._update(a,b)})):a===D||!a&&""!==a?D:(a.jquery&&a.length>0?b.empty().append(a.css({display:"block",visibility:"visible"})):b.html(a),this._waitForContent(b).then(function(a){a.images&&a.images.length&&c.rendered&&c.tooltip[0].offsetWidth>0&&c.reposition(e.event,!a.length)}))):D},y._waitForContent=function(a){var b=this.cache;return b.waiting=C,(d.fn.imagesLoaded?a.imagesLoaded():d.Deferred().resolve([])).done(function(){b.waiting=D}).promise()},y._updateContent=function(a,b){this._update(a,this.elements.content,b)},y._updateTitle=function(a,b){this._update(a,this.elements.title,b)===D&&this._removeTitle(D)},y._createTitle=function(){var a=this.elements,b=this._id+"-title";a.titlebar&&this._removeTitle(),a.titlebar=d("<div />",{"class":R+"-titlebar "+(this.options.style.widget?k("header"):"")}).append(a.title=d("<div />",{id:b,"class":R+"-title","aria-atomic":C})).insertBefore(a.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(a){d(this).toggleClass("ui-state-active ui-state-focus","down"===a.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(a){d(this).toggleClass("ui-state-hover","mouseover"===a.type)}),this.options.content.button&&this._createButton()},y._removeTitle=function(a){var b=this.elements;b.title&&(b.titlebar.remove(),b.titlebar=b.title=b.button=E,a!==D&&this.reposition())},y.reposition=function(c,e){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=C;var f,g,h=this.cache,i=this.tooltip,j=this.options.position,k=j.target,l=j.my,m=j.at,n=j.viewport,o=j.container,p=j.adjust,q=p.method.split(" "),r=i.outerWidth(D),s=i.outerHeight(D),t=0,u=0,v=i.css("position"),w={left:0,top:0},x=i[0].offsetWidth>0,y=c&&"scroll"===c.type,z=d(a),A=o[0].ownerDocument,B=this.mouse;if(d.isArray(k)&&2===k.length)m={x:K,y:J},w={left:k[0],top:k[1]};else if("mouse"===k)m={x:K,y:J},!B||!B.pageX||!p.mouse&&c&&c.pageX?c&&c.pageX||((!p.mouse||this.options.show.distance)&&h.origin&&h.origin.pageX?c=h.origin:(!c||c&&("resize"===c.type||"scroll"===c.type))&&(c=h.event)):c=B,"static"!==v&&(w=o.offset()),A.body.offsetWidth!==(a.innerWidth||A.documentElement.clientWidth)&&(g=d(b.body).offset()),w={left:c.pageX-w.left+(g&&g.left||0),top:c.pageY-w.top+(g&&g.top||0)},p.mouse&&y&&B&&(w.left-=(B.scrollX||0)-z.scrollLeft(),w.top-=(B.scrollY||0)-z.scrollTop());else{if("event"===k?c&&c.target&&"scroll"!==c.type&&"resize"!==c.type?h.target=d(c.target):c.target||(h.target=this.elements.target):"event"!==k&&(h.target=d(k.jquery?k:this.elements.target)),k=h.target,k=d(k).eq(0),0===k.length)return this;k[0]===b||k[0]===a?(t=cb.iOS?a.innerWidth:k.width(),u=cb.iOS?a.innerHeight:k.height(),k[0]===a&&(w={top:(n||k).scrollTop(),left:(n||k).scrollLeft()})):Q.imagemap&&k.is("area")?f=Q.imagemap(this,k,m,Q.viewport?q:D):Q.svg&&k&&k[0].ownerSVGElement?f=Q.svg(this,k,m,Q.viewport?q:D):(t=k.outerWidth(D),u=k.outerHeight(D),w=k.offset()),f&&(t=f.width,u=f.height,g=f.offset,w=f.position),w=this.reposition.offset(k,w,o),(cb.iOS>3.1&&cb.iOS<4.1||cb.iOS>=4.3&&cb.iOS<4.33||!cb.iOS&&"fixed"===v)&&(w.left-=z.scrollLeft(),w.top-=z.scrollTop()),(!f||f&&f.adjustable!==D)&&(w.left+=m.x===M?t:m.x===N?t/2:0,w.top+=m.y===L?u:m.y===N?u/2:0)}return w.left+=p.x+(l.x===M?-r:l.x===N?-r/2:0),w.top+=p.y+(l.y===L?-s:l.y===N?-s/2:0),Q.viewport?(w.adjusted=Q.viewport(this,w,j,t,u,r,s),g&&w.adjusted.left&&(w.left+=g.left),g&&w.adjusted.top&&(w.top+=g.top)):w.adjusted={left:0,top:0},this._trigger("move",[w,n.elem||n],c)?(delete w.adjusted,e===D||!x||isNaN(w.left)||isNaN(w.top)||"mouse"===k||!d.isFunction(j.effect)?i.css(w):d.isFunction(j.effect)&&(j.effect.call(i,this,d.extend({},w)),i.queue(function(a){d(this).css({opacity:"",height:""}),cb.ie&&this.style.removeAttribute("filter"),a()})),this.positioning=D,this):this},y.reposition.offset=function(a,c,e){function f(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}if(!e[0])return c;var g,h,i,j,k=d(a[0].ownerDocument),l=!!cb.ie&&"CSS1Compat"!==b.compatMode,m=e[0];do"static"!==(h=d.css(m,"position"))&&("fixed"===h?(i=m.getBoundingClientRect(),f(k,-1)):(i=d(m).position(),i.left+=parseFloat(d.css(m,"borderLeftWidth"))||0,i.top+=parseFloat(d.css(m,"borderTopWidth"))||0),c.left-=i.left+(parseFloat(d.css(m,"marginLeft"))||0),c.top-=i.top+(parseFloat(d.css(m,"marginTop"))||0),g||"hidden"===(j=d.css(m,"overflow"))||"visible"===j||(g=d(m)));while(m=m.offsetParent);return g&&(g[0]!==k[0]||l)&&f(g,1),c};var fb=(z=y.reposition.Corner=function(a,b){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,N).toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this.forceY=!!b;var c=a.charAt(0);this.precedance="t"===c||"b"===c?G:F}).prototype;fb.invert=function(a,b){this[a]=this[a]===K?M:this[a]===M?K:b||this[a]},fb.string=function(){var a=this.x,b=this.y;return a===b?a:this.precedance===G||this.forceY&&"center"!==b?b+" "+a:a+" "+b},fb.abbrev=function(){var a=this.string().split(" ");return a[0].charAt(0)+(a[1]&&a[1].charAt(0)||"")},fb.clone=function(){return new z(this.string(),this.forceY)},y.toggle=function(a,c){var e=this.cache,f=this.options,g=this.tooltip;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(e.event.type)&&f.show.target.add(c.target).length===f.show.target.length&&g.has(c.relatedTarget).length)return this;e.event=l(c)}if(this.waiting&&!a&&(this.hiddenDuringWait=C),!this.rendered)return a?this.render(1):this;if(this.destroyed||this.disabled)return this;var h,i,j,k=a?"show":"hide",m=this.options[k],n=(this.options[a?"hide":"show"],this.options.position),o=this.options.content,p=this.tooltip.css("width"),q=this.tooltip.is(":visible"),r=a||1===m.target.length,s=!c||m.target.length<2||e.target[0]===c.target;return(typeof a).search("boolean|number")&&(a=!q),h=!g.is(":animated")&&q===a&&s,i=h?E:!!this._trigger(k,[90]),this.destroyed?this:(i!==D&&a&&this.focus(c),!i||h?this:(d.attr(g[0],"aria-hidden",!a),a?(e.origin=l(this.mouse),d.isFunction(o.text)&&this._updateContent(o.text,D),d.isFunction(o.title)&&this._updateTitle(o.title,D),!B&&"mouse"===n.target&&n.adjust.mouse&&(d(b).bind("mousemove."+R,this._storeMouse),B=C),p||g.css("width",g.outerWidth(D)),this.reposition(c,arguments[2]),p||g.css("width",""),m.solo&&("string"==typeof m.solo?d(m.solo):d(V,m.solo)).not(g).not(m.target).qtip("hide",d.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete e.origin,B&&!d(V+'[tracking="true"]:visible',m.solo).not(g).length&&(d(b).unbind("mousemove."+R),B=D),this.blur(c)),j=d.proxy(function(){a?(cb.ie&&g[0].style.removeAttribute("filter"),g.css("overflow",""),"string"==typeof m.autofocus&&d(this.options.show.autofocus,g).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):g.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(a?"visible":"hidden")},this),m.effect===D||r===D?(g[k](),j()):d.isFunction(m.effect)?(g.stop(1,1),m.effect.call(g,this),g.queue("fx",function(a){j(),a()})):g.fadeTo(90,a?1:0,j),a&&m.target.trigger("qtip-"+this.id+"-inactive"),this))},y.show=function(a){return this.toggle(C,a)},y.hide=function(a){return this.toggle(D,a)},y.focus=function(a){if(!this.rendered||this.destroyed)return this;var b=d(V),c=this.tooltip,e=parseInt(c[0].style.zIndex,10),f=x.zindex+b.length;return c.hasClass(Z)||this._trigger("focus",[f],a)&&(e!==f&&(b.each(function(){this.style.zIndex>e&&(this.style.zIndex=this.style.zIndex-1)}),b.filter("."+Z).qtip("blur",a)),c.addClass(Z)[0].style.zIndex=f),this},y.blur=function(a){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(Z),this._trigger("blur",[this.tooltip.css("zIndex")],a),this)},y.disable=function(a){return this.destroyed?this:("toggle"===a?a=!(this.rendered?this.tooltip.hasClass(_):this.disabled):"boolean"!=typeof a&&(a=C),this.rendered&&this.tooltip.toggleClass(_,a).attr("aria-disabled",a),this.disabled=!!a,this)},y.enable=function(){return this.disable(D)},y._createButton=function(){var a=this,b=this.elements,c=b.tooltip,e=this.options.content.button,f="string"==typeof e,g=f?e:"Close tooltip";b.button&&b.button.remove(),b.button=e.jquery?e:d("<a />",{"class":"qtip-close "+(this.options.style.widget?"":R+"-icon"),title:g,"aria-label":g}).prepend(d("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"})),b.button.appendTo(b.titlebar||c).attr("role","button").click(function(b){return c.hasClass(_)||a.hide(b),D})},y._updateButton=function(a){if(!this.rendered)return D;var b=this.elements.button;a?this._createButton():b.remove()},y._setWidget=function(){var a=this.options.style.widget,b=this.elements,c=b.tooltip,d=c.hasClass(_);c.removeClass(_),_=a?"ui-state-disabled":"qtip-disabled",c.toggleClass(_,d),c.toggleClass("ui-helper-reset "+k(),a).toggleClass(Y,this.options.style.def&&!a),b.content&&b.content.toggleClass(k("content"),a),b.titlebar&&b.titlebar.toggleClass(k("header"),a),b.button&&b.button.toggleClass(R+"-icon",!a)},y._storeMouse=function(a){(this.mouse=l(a)).type="mousemove"},y._bind=function(a,b,c,e,f){var g="."+this._id+(e?"-"+e:"");b.length&&d(a).bind((b.split?b:b.join(g+" "))+g,d.proxy(c,f||this))},y._unbind=function(a,b){d(a).unbind("."+this._id+(b?"-"+b:""))};var gb="."+R;d(function(){r(V,["mouseenter","mouseleave"],function(a){var b="mouseenter"===a.type,c=d(a.currentTarget),e=d(a.relatedTarget||a.target),f=this.options;b?(this.focus(a),c.hasClass(X)&&!c.hasClass(_)&&clearTimeout(this.timers.hide)):"mouse"===f.position.target&&f.hide.event&&f.show.target&&!e.closest(f.show.target[0]).length&&this.hide(a),c.toggleClass($,b)}),r("["+T+"]",W,p)}),y._trigger=function(a,b,c){var e=d.Event("tooltip"+a);return e.originalEvent=c&&d.extend({},c)||this.cache.event||E,this.triggering=a,this.tooltip.trigger(e,[this].concat(b||[])),this.triggering=D,!e.isDefaultPrevented()},y._bindEvents=function(a,b,c,e,f,g){if(e.add(c).length===e.length){var h=[];b=d.map(b,function(b){var c=d.inArray(b,a);return c>-1?(h.push(a.splice(c,1)[0]),void 0):b}),h.length&&this._bind(c,h,function(a){var b=this.rendered?this.tooltip[0].offsetWidth>0:!1;(b?g:f).call(this,a)})}this._bind(c,a,f),this._bind(e,b,g)},y._assignInitialEvents=function(a){function b(a){return this.disabled||this.destroyed?D:(this.cache.event=l(a),this.cache.target=a?d(a.target):[c],clearTimeout(this.timers.show),this.timers.show=m.call(this,function(){this.render("object"==typeof a||e.show.ready)},e.show.delay),void 0)}var e=this.options,f=e.show.target,g=e.hide.target,h=e.show.event?d.trim(""+e.show.event).split(" "):[],i=e.hide.event?d.trim(""+e.hide.event).split(" "):[];/mouse(over|enter)/i.test(e.show.event)&&!/mouse(out|leave)/i.test(e.hide.event)&&i.push("mouseleave"),this._bind(f,"mousemove",function(a){this._storeMouse(a),this.cache.onTarget=C}),this._bindEvents(h,i,f,g,b,function(){clearTimeout(this.timers.show)}),(e.show.ready||e.prerender)&&b.call(this,a)},y._assignEvents=function(){var c=this,e=this.options,f=e.position,g=this.tooltip,h=e.show.target,i=e.hide.target,j=f.container,k=f.viewport,l=d(b),m=(d(b.body),d(a)),r=e.show.event?d.trim(""+e.show.event).split(" "):[],s=e.hide.event?d.trim(""+e.hide.event).split(" "):[];d.each(e.events,function(a,b){c._bind(g,"toggle"===a?["tooltipshow","tooltiphide"]:["tooltip"+a],b,null,g)}),/mouse(out|leave)/i.test(e.hide.event)&&"window"===e.hide.leave&&this._bind(l,["mouseout","blur"],function(a){/select|option/.test(a.target.nodeName)||a.relatedTarget||this.hide(a)}),e.hide.fixed?i=i.add(g.addClass(X)):/mouse(over|enter)/i.test(e.show.event)&&this._bind(i,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+e.hide.event).indexOf("unfocus")>-1&&this._bind(j.closest("html"),["mousedown","touchstart"],function(a){var b=d(a.target),c=this.rendered&&!this.tooltip.hasClass(_)&&this.tooltip[0].offsetWidth>0,e=b.parents(V).filter(this.tooltip[0]).length>0;b[0]===this.target[0]||b[0]===this.tooltip[0]||e||this.target.has(b[0]).length||!c||this.hide(a)}),"number"==typeof e.hide.inactive&&(this._bind(h,"qtip-"+this.id+"-inactive",p),this._bind(i.add(g),x.inactiveEvents,p,"-inactive")),this._bindEvents(r,s,h,i,n,o),this._bind(h.add(g),"mousemove",function(a){if("number"==typeof e.hide.distance){var b=this.cache.origin||{},c=this.options.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&this.hide(a)}this._storeMouse(a)}),"mouse"===f.target&&f.adjust.mouse&&(e.hide.event&&this._bind(h,["mouseenter","mouseleave"],function(a){this.cache.onTarget="mouseenter"===a.type}),this._bind(l,"mousemove",function(a){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(_)&&this.tooltip[0].offsetWidth>0&&this.reposition(a)})),(f.adjust.resize||k.length)&&this._bind(d.event.special.resize?k:m,"resize",q),f.adjust.scroll&&this._bind(m.add(f.container),"scroll",q)},y._unassignEvents=function(){var c=[this.options.show.target[0],this.options.hide.target[0],this.rendered&&this.tooltip[0],this.options.position.container[0],this.options.position.viewport[0],this.options.position.container.closest("html")[0],a,b];this._unbind(d([]).pushStack(d.grep(c,function(a){return"object"==typeof a})))},x=d.fn.qtip=function(a,b,e){var f=(""+a).toLowerCase(),g=E,i=d.makeArray(arguments).slice(1),j=i[i.length-1],k=this[0]?d.data(this[0],R):E;return!arguments.length&&k||"api"===f?k:"string"==typeof a?(this.each(function(){var a=d.data(this,R);if(!a)return C;if(j&&j.timeStamp&&(a.cache.event=j),!b||"option"!==f&&"options"!==f)a[f]&&a[f].apply(a,i);else{if(e===c&&!d.isPlainObject(b))return g=a.get(b),D;a.set(b,e)}}),g!==E?g:this):"object"!=typeof a&&arguments.length?void 0:(k=h(d.extend(C,{},a)),this.each(function(a){var b,c;return c=d.isArray(k.id)?k.id[a]:k.id,c=!c||c===D||c.length<1||x.api[c]?x.nextid++:c,b=s(d(this),c,k),b===D?C:(x.api[c]=b,d.each(Q,function(){"initialize"===this.initialize&&this(b)}),b._assignInitialEvents(j),void 0)}))},d.qtip=e,x.api={},d.each({attr:function(a,b){if(this.length){var c=this[0],e="title",f=d.data(c,"qtip");if(a===e&&f&&"object"==typeof f&&f.options.suppress)return arguments.length<2?d.attr(c,bb):(f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",b),this.attr(bb,b))}return d.fn["attr"+ab].apply(this,arguments)},clone:function(a){var b=(d([]),d.fn["clone"+ab].apply(this,arguments));return a||b.filter("["+bb+"]").attr("title",function(){return d.attr(this,bb)}).removeAttr(bb),b}},function(a,b){if(!b||d.fn[a+ab])return C;var c=d.fn[a+ab]=d.fn[a];d.fn[a]=function(){return b.apply(this,arguments)||c.apply(this,arguments)}}),d.ui||(d["cleanData"+ab]=d.cleanData,d.cleanData=function(a){for(var b,c=0;(b=d(a[c])).length;c++)if(b.attr(S))try{b.triggerHandler("removeqtip")}catch(e){}d["cleanData"+ab].apply(this,arguments)}),x.version="2.2.0",x.nextid=0,x.inactiveEvents=W,x.zindex=15e3,x.defaults={prerender:D,id:D,overwrite:C,suppress:C,content:{text:C,attr:"title",title:D,button:D},position:{my:"top left",at:"bottom right",target:D,container:D,viewport:D,adjust:{x:0,y:0,mouse:C,scroll:C,resize:C,method:"flipinvert flipinvert"},effect:function(a,b){d(this).animate(b,{duration:200,queue:D})}},show:{target:D,event:"mouseenter",effect:C,delay:90,solo:D,ready:D,autofocus:D},hide:{target:D,event:"mouseleave",effect:C,delay:0,fixed:D,inactive:D,leave:"window",distance:D},style:{classes:"",widget:D,width:D,height:D,def:C},events:{render:E,move:E,show:E,hide:E,toggle:E,visible:E,hidden:E,focus:E,blur:E}};var hb,ib="margin",jb="border",kb="color",lb="background-color",mb="transparent",nb=" !important",ob=!!b.createElement("canvas").getContext,pb=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,qb={},rb=["Webkit","O","Moz","ms"];if(ob)var sb=a.devicePixelRatio||1,tb=function(){var a=b.createElement("canvas").getContext("2d");return a.backingStorePixelRatio||a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||1}(),ub=sb/tb;else var vb=function(a,b,c){return"<qtipvml:"+a+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(b||"")+' style="behavior: url(#default#VML); '+(c||"")+'" />'};d.extend(w.prototype,{init:function(a){var b,c;c=this.element=a.elements.tip=d("<div />",{"class":R+"-tip"}).prependTo(a.tooltip),ob?(b=d("<canvas />").appendTo(this.element)[0].getContext("2d"),b.lineJoin="miter",b.miterLimit=1e5,b.save()):(b=vb("shape",'coordorigin="0,0"',"position:absolute;"),this.element.html(b+b),a._bind(d("*",c).add(c),["click","mousedown"],function(a){a.stopPropagation()},this._ns)),a._bind(a.tooltip,"tooltipmove",this.reposition,this._ns,this),this.create()},_swapDimensions:function(){this.size[0]=this.options.height,this.size[1]=this.options.width},_resetDimensions:function(){this.size[0]=this.options.width,this.size[1]=this.options.height},_useTitle:function(a){var b=this.qtip.elements.titlebar;return b&&(a.y===J||a.y===N&&this.element.position().top+this.size[1]/2+this.options.offset<b.outerHeight(C))},_parseCorner:function(a){var b=this.qtip.options.position.my;return a===D||b===D?a=D:a===C?a=new z(b.string()):a.string||(a=new z(a),a.fixed=C),a},_parseWidth:function(a,b,c){var d=this.qtip.elements,e=jb+t(b)+"Width";return(c?v(c,e):v(d.content,e)||v(this._useTitle(a)&&d.titlebar||d.content,e)||v(d.tooltip,e))||0},_parseRadius:function(a){var b=this.qtip.elements,c=jb+t(a.y)+t(a.x)+"Radius";return cb.ie<9?0:v(this._useTitle(a)&&b.titlebar||b.content,c)||v(b.tooltip,c)||0},_invalidColour:function(a,b,c){var d=a.css(b);return!d||c&&d===a.css(c)||pb.test(d)?D:d},_parseColours:function(a){var b=this.qtip.elements,c=this.element.css("cssText",""),e=jb+t(a[a.precedance])+t(kb),f=this._useTitle(a)&&b.titlebar||b.content,g=this._invalidColour,h=[];return h[0]=g(c,lb)||g(f,lb)||g(b.content,lb)||g(b.tooltip,lb)||c.css(lb),h[1]=g(c,e,kb)||g(f,e,kb)||g(b.content,e,kb)||g(b.tooltip,e,kb)||b.tooltip.css(e),d("*",c).add(c).css("cssText",lb+":"+mb+nb+";"+jb+":0"+nb+";"),h},_calculateSize:function(a){var b,c,d,e=a.precedance===G,f=this.options.width,g=this.options.height,h="c"===a.abbrev(),i=(e?f:g)*(h?.5:1),j=Math.pow,k=Math.round,l=Math.sqrt(j(i,2)+j(g,2)),m=[this.border/i*l,this.border/g*l];return m[2]=Math.sqrt(j(m[0],2)-j(this.border,2)),m[3]=Math.sqrt(j(m[1],2)-j(this.border,2)),b=l+m[2]+m[3]+(h?0:m[0]),c=b/l,d=[k(c*f),k(c*g)],e?d:d.reverse()},_calculateTip:function(a,b,c){c=c||1,b=b||this.size;var d=b[0]*c,e=b[1]*c,f=Math.ceil(d/2),g=Math.ceil(e/2),h={br:[0,0,d,e,d,0],bl:[0,0,d,0,0,e],tr:[0,e,d,0,d,e],tl:[0,0,0,e,d,e],tc:[0,e,f,0,d,e],bc:[0,0,d,0,f,e],rc:[0,0,d,g,0,e],lc:[d,0,d,e,0,g]};return h.lt=h.br,h.rt=h.bl,h.lb=h.tr,h.rb=h.tl,h[a.abbrev()]},_drawCoords:function(a,b){a.beginPath(),a.moveTo(b[0],b[1]),a.lineTo(b[2],b[3]),a.lineTo(b[4],b[5]),a.closePath()},create:function(){var a=this.corner=(ob||cb.ie)&&this._parseCorner(this.options.corner);return(this.enabled=!!this.corner&&"c"!==this.corner.abbrev())&&(this.qtip.cache.corner=a.clone(),this.update()),this.element.toggle(this.enabled),this.corner},update:function(b,c){if(!this.enabled)return this;var e,f,g,h,i,j,k,l,m=this.qtip.elements,n=this.element,o=n.children(),p=this.options,q=this.size,r=p.mimic,s=Math.round;b||(b=this.qtip.cache.corner||this.corner),r===D?r=b:(r=new z(r),r.precedance=b.precedance,"inherit"===r.x?r.x=b.x:"inherit"===r.y?r.y=b.y:r.x===r.y&&(r[b.precedance]=b[b.precedance])),f=r.precedance,b.precedance===F?this._swapDimensions():this._resetDimensions(),e=this.color=this._parseColours(b),e[1]!==mb?(l=this.border=this._parseWidth(b,b[b.precedance]),p.border&&1>l&&!pb.test(e[1])&&(e[0]=e[1]),this.border=l=p.border!==C?p.border:l):this.border=l=0,k=this.size=this._calculateSize(b),n.css({width:k[0],height:k[1],lineHeight:k[1]+"px"}),j=b.precedance===G?[s(r.x===K?l:r.x===M?k[0]-q[0]-l:(k[0]-q[0])/2),s(r.y===J?k[1]-q[1]:0)]:[s(r.x===K?k[0]-q[0]:0),s(r.y===J?l:r.y===L?k[1]-q[1]-l:(k[1]-q[1])/2)],ob?(g=o[0].getContext("2d"),g.restore(),g.save(),g.clearRect(0,0,6e3,6e3),h=this._calculateTip(r,q,ub),i=this._calculateTip(r,this.size,ub),o.attr(H,k[0]*ub).attr(I,k[1]*ub),o.css(H,k[0]).css(I,k[1]),this._drawCoords(g,i),g.fillStyle=e[1],g.fill(),g.translate(j[0]*ub,j[1]*ub),this._drawCoords(g,h),g.fillStyle=e[0],g.fill()):(h=this._calculateTip(r),h="m"+h[0]+","+h[1]+" l"+h[2]+","+h[3]+" "+h[4]+","+h[5]+" xe",j[2]=l&&/^(r|b)/i.test(b.string())?8===cb.ie?2:1:0,o.css({coordsize:k[0]+l+" "+(k[1]+l),antialias:""+(r.string().indexOf(N)>-1),left:j[0]-j[2]*Number(f===F),top:j[1]-j[2]*Number(f===G),width:k[0]+l,height:k[1]+l}).each(function(a){var b=d(this);b[b.prop?"prop":"attr"]({coordsize:k[0]+l+" "+(k[1]+l),path:h,fillcolor:e[0],filled:!!a,stroked:!a}).toggle(!(!l&&!a)),!a&&b.html(vb("stroke",'weight="'+2*l+'px" color="'+e[1]+'" miterlimit="1000" joinstyle="miter"'))})),a.opera&&setTimeout(function(){m.tip.css({display:"inline-block",visibility:"visible"})},1),c!==D&&this.calculate(b,k)},calculate:function(a,b){if(!this.enabled)return D;var c,e,f=this,g=this.qtip.elements,h=this.element,i=this.options.offset,j=(g.tooltip.hasClass("ui-widget"),{});return a=a||this.corner,c=a.precedance,b=b||this._calculateSize(a),e=[a.x,a.y],c===F&&e.reverse(),d.each(e,function(d,e){var h,k,l;e===N?(h=c===G?K:J,j[h]="50%",j[ib+"-"+h]=-Math.round(b[c===G?0:1]/2)+i):(h=f._parseWidth(a,e,g.tooltip),k=f._parseWidth(a,e,g.content),l=f._parseRadius(a),j[e]=Math.max(-f.border,d?k:i+(l>h?l:-h)))}),j[a[c]]-=b[c===F?0:1],h.css({margin:"",top:"",bottom:"",left:"",right:""}).css(j),j
4
  },reposition:function(a,b,d){function e(a,b,c,d,e){a===P&&j.precedance===b&&k[d]&&j[c]!==N?j.precedance=j.precedance===F?G:F:a!==P&&k[d]&&(j[b]=j[b]===N?k[d]>0?d:e:j[b]===d?e:d)}function f(a,b,e){j[a]===N?p[ib+"-"+b]=o[a]=g[ib+"-"+b]-k[b]:(h=g[e]!==c?[k[b],-g[b]]:[-k[b],g[b]],(o[a]=Math.max(h[0],h[1]))>h[0]&&(d[b]-=k[b],o[b]=D),p[g[e]!==c?e:b]=o[a])}if(this.enabled){var g,h,i=b.cache,j=this.corner.clone(),k=d.adjusted,l=b.options.position.adjust.method.split(" "),m=l[0],n=l[1]||l[0],o={left:D,top:D,x:0,y:0},p={};this.corner.fixed!==C&&(e(m,F,G,K,M),e(n,G,F,J,L),j.string()===i.corner.string()||i.cornerTop===k.top&&i.cornerLeft===k.left||this.update(j,D)),g=this.calculate(j),g.right!==c&&(g.left=-g.right),g.bottom!==c&&(g.top=-g.bottom),g.user=this.offset,(o.left=m===P&&!!k.left)&&f(F,K,M),(o.top=n===P&&!!k.top)&&f(G,J,L),this.element.css(p).toggle(!(o.x&&o.y||j.x===N&&o.y||j.y===N&&o.x)),d.left-=g.left.charAt?g.user:m!==P||o.top||!o.left&&!o.top?g.left+this.border:0,d.top-=g.top.charAt?g.user:n!==P||o.left||!o.left&&!o.top?g.top+this.border:0,i.cornerLeft=k.left,i.cornerTop=k.top,i.corner=j.clone()}},destroy:function(){this.qtip._unbind(this.qtip.tooltip,this._ns),this.qtip.elements.tip&&this.qtip.elements.tip.find("*").remove().end().remove()}}),hb=Q.tip=function(a){return new w(a,a.options.style.tip)},hb.initialize="render",hb.sanitize=function(a){if(a.style&&"tip"in a.style){var b=a.style.tip;"object"!=typeof b&&(b=a.style.tip={corner:b}),/string|boolean/i.test(typeof b.corner)||(b.corner=C)}},A.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){this.create(),this.qtip.reposition()},"^style.tip.(height|width)$":function(a){this.size=[a.width,a.height],this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){this.update()}},d.extend(C,x.defaults,{style:{tip:{corner:C,mimic:D,width:6,height:6,border:C,offset:0}}}),Q.viewport=function(c,d,e,f,g,h,i){function j(a,b,c,e,f,g,h,i,j){var k=d[f],m=v[a],t=w[a],u=c===P,x=m===f?j:m===g?-j:-j/2,y=t===f?i:t===g?-i:-i/2,z=r[f]+s[f]-(o?0:n[f]),A=z-k,B=k+j-(h===H?p:q)-z,C=x-(v.precedance===a||m===v[b]?y:0)-(t===N?i/2:0);return u?(C=(m===f?1:-1)*x,d[f]+=A>0?A:B>0?-B:0,d[f]=Math.max(-n[f]+s[f],k-C,Math.min(Math.max(-n[f]+s[f]+(h===H?p:q),k+C),d[f],"center"===m?k-x:1e9))):(e*=c===O?2:0,A>0&&(m!==f||B>0)?(d[f]-=C+e,l.invert(a,f)):B>0&&(m!==g||A>0)&&(d[f]-=(m===N?-C:C)+e,l.invert(a,g)),d[f]<r&&-d[f]>B&&(d[f]=k,l=v.clone())),d[f]-k}var k,l,m,n,o,p,q,r,s,t=e.target,u=c.elements.tooltip,v=e.my,w=e.at,x=e.adjust,y=x.method.split(" "),z=y[0],A=y[1]||y[0],B=e.viewport,C=e.container,E=c.cache,Q={left:0,top:0};return B.jquery&&t[0]!==a&&t[0]!==b.body&&"none"!==x.method?(n=C.offset()||Q,o="static"===C.css("position"),k="fixed"===u.css("position"),p=B[0]===a?B.width():B.outerWidth(D),q=B[0]===a?B.height():B.outerHeight(D),r={left:k?0:B.scrollLeft(),top:k?0:B.scrollTop()},s=B.offset()||Q,("shift"!==z||"shift"!==A)&&(l=v.clone()),Q={left:"none"!==z?j(F,G,z,x.x,K,M,H,f,h):0,top:"none"!==A?j(G,F,A,x.y,J,L,I,g,i):0},l&&E.lastClass!==(m=R+"-pos-"+l.abbrev())&&u.removeClass(c.cache.lastClass).addClass(c.cache.lastClass=m),Q):Q}})}(window,document);
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Codepress Admin Columns ===
2
  Contributors: codepress, tschutter, davidmosterd, engelen
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZDZRSYLQ4Z76J
4
  Tags: plugins, wordpress, admin, column, columns, custom columns, custom fields, image, dashboard, sortable, filters, posts, media, users, pages, posttypes, manage columns, wp-admin
5
  Requires at least: 3.5
6
- Tested up to: 3.9.2
7
- Stable tag: 2.2.6.4
8
 
9
  Customise columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
10
 
@@ -173,8 +173,8 @@ You can leave any requests or feedback on [admincolumns.com](http://admincolumns
173
  == Installation ==
174
 
175
  1. Upload codepress-admin-columns to the /wp-content/plugins/ directory
176
- 2. Activate Codepress Admin Columns through the 'Plugins' menu in WordPress
177
- 3. Configure the plugin by going to the Admin Column settings that appears under the Settings menu.
178
 
179
  == Frequently Asked Questions ==
180
 
@@ -248,6 +248,12 @@ You can find a list of the available actions and filters (and examples on how to
248
 
249
  == Changelog ==
250
 
 
 
 
 
 
 
251
  = 2.2.6.4 =
252
  * [Updated] Portuguese (Brazil) language - thanks to André Mácola Machado
253
 
1
+ === Admin Columns ===
2
  Contributors: codepress, tschutter, davidmosterd, engelen
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZDZRSYLQ4Z76J
4
  Tags: plugins, wordpress, admin, column, columns, custom columns, custom fields, image, dashboard, sortable, filters, posts, media, users, pages, posttypes, manage columns, wp-admin
5
  Requires at least: 3.5
6
+ Tested up to: 4.0
7
+ Stable tag: 2.2.7
8
 
9
  Customise columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
10
 
173
  == Installation ==
174
 
175
  1. Upload codepress-admin-columns to the /wp-content/plugins/ directory
176
+ 2. Activate Admin Columns through the 'Plugins' menu in WordPress
177
+ 3. Configure the plugin by going to the Admin Columns settings that appears under the Settings menu.
178
 
179
  == Frequently Asked Questions ==
180
 
248
 
249
  == Changelog ==
250
 
251
+ = 2.2.7 =
252
+ * [Added] Added date format option for "Last modified" column
253
+ * [Updated] Change references from Codepress Admin Columns to Admin Columns
254
+ * [Updated] General code clean-up
255
+ * [Improved] Documentation improvements
256
+
257
  = 2.2.6.4 =
258
  * [Updated] Portuguese (Brazil) language - thanks to André Mácola Machado
259