jQuery Pin It Button for Images - Version 1.10

Version Description

  • Released 2013-08-21
  • Added dynamic mode that allows users to download the image and fixes many issues with the transparency layer
  • Removed the ability to add custom css to the Pin It button, but added the ability to change margins
Download this release

Release Info

Developer mrsztuczkens
Plugin Icon wp plugin jQuery Pin It Button for Images
Version 1.10
Comparing to
See all releases

Code changes from version 1.00 to 1.10

css/admin.css CHANGED
@@ -14,4 +14,36 @@ input[type="checkbox"] ~ label {
14
 
15
  input#custom_image_url {
16
  width: 100%;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  }
14
 
15
  input#custom_image_url {
16
  width: 100%;
17
+ }
18
+
19
+ ul.jpibfi-classes-list {
20
+ margin: 0 0;
21
+ overflow: auto;
22
+ list-style-type: none;
23
+ }
24
+
25
+ ul.jpibfi-classes-list li {
26
+ float: left;
27
+ margin-right: 0px;
28
+ padding: 0 20px 0 0;
29
+ }
30
+
31
+ ul.jpibfi-classes-list a {
32
+ display: inline-block;
33
+ text-indent: -9999px;
34
+ background-color: #ffffff;
35
+ background-image: url('../images/delete.png');
36
+ background-repeat: no-repeat;
37
+ background-position: 0px 0px;
38
+ width: 16px;
39
+ height: 16px;
40
+ cursor: pointer;
41
+ }
42
+
43
+ ul.jpibfi-classes-list a:hover {
44
+ background-position: -16px 0px;
45
+ }
46
+
47
+ ul.jpibfi-classes-list span {
48
+ padding-left: 5px;
49
  }
css/style.css CHANGED
@@ -7,9 +7,38 @@
7
  padding: 0 0;
8
  margin: 0 0;
9
  box-shadow: none;
 
10
  }
11
- .pinit-overlay a {
12
  position:absolute;
13
  display:none;
14
  text-indent:-9999em;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  }
7
  padding: 0 0;
8
  margin: 0 0;
9
  box-shadow: none;
10
+ overflow: visible;
11
  }
12
+ a.pinit-button {
13
  position:absolute;
14
  display:none;
15
  text-indent:-9999em;
16
+ }
17
+
18
+ a.pinit-button.pinit-top-left {
19
+ top:0;
20
+ left:0;
21
+ }
22
+
23
+ a.pinit-button.pinit-top-right {
24
+ top:0;
25
+ right:0;
26
+ }
27
+
28
+ a.pinit-button.pinit-bottom-left {
29
+ bottom:0;
30
+ left:0;
31
+ }
32
+
33
+ a.pinit-button.pinit-bottom-right {
34
+ bottom:0;
35
+ right:0;
36
+ }
37
+
38
+ a.pinit-button.pinit-middle {
39
+ top:0;
40
+ bottom:0;
41
+ left:0;
42
+ right:0;
43
+ margin: auto;
44
  }
images/delete.png ADDED
Binary file
jquery-pin-it-button-for-images.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: jQuery Pin It Button For Images
4
  Plugin URI: http://wordpress.org/extend/plugins/jquery-pin-it-button-for-images/
5
  Description: Highlights images on hover and adds a "Pin It" button over them for easy pinning.
6
  Author: Marcin Skrzypiec
7
- Version: 1.00
8
  Author URI: http://profiles.wordpress.org/mrsztuczkens
9
  */
10
 
@@ -18,10 +18,11 @@ if ( ! function_exists( 'add_action' ) ) {
18
  * CONSTANTS
19
  *
20
  */
21
- define( "JPIBFI_VERSION", "1.00" );
22
  define( "JPIBFI_METADATA", "jpibfi_meta" );
23
  define( "JPIBFI_SELECTION_OPTIONS", "jpibfi_selection_options" );
24
  define( "JPIBFI_VISUAL_OPTIONS", "jpibfi_visual_options" );
 
25
  define( "JPIBFI_VERSION_OPTION", "jpibfi_version");
26
 
27
  //DEFAULT PIN BUTTON IMAGE
@@ -89,6 +90,8 @@ function jpibfi_add_plugin_scripts() {
89
 
90
  $visual_options = get_option( JPIBFI_VISUAL_OPTIONS );
91
  $selection_options = get_option( JPIBFI_SELECTION_OPTIONS );
 
 
92
 
93
  $parameters_array = array(
94
  'image_selector' => $selection_options['image_selector'],
@@ -98,8 +101,18 @@ function jpibfi_add_plugin_scripts() {
98
  'use_post_url' => isset ( $visual_options['use_post_url'] ) ? $visual_options['use_post_url'] : '0',
99
  'min_image_height' => $selection_options['min_image_height'],
100
  'min_image_width' => $selection_options['min_image_width'],
101
- 'site_title' => get_bloginfo( 'name', 'display' )
 
 
 
 
 
 
 
 
 
102
  );
 
103
  wp_localize_script( 'jquery-pin-it-button-script', 'jpibfi_options', $parameters_array );
104
  }
105
 
@@ -111,36 +124,47 @@ function jpibfi_print_header_style_action() {
111
 
112
  $options = get_option( JPIBFI_VISUAL_OPTIONS );
113
 
114
- $button_css = $options[ 'button_css' ];
115
  $use_custom_image = isset( $options[ 'use_custom_image' ] ) && $options[ 'use_custom_image' ] == "1";
116
 
117
  $width = $use_custom_image ? $options['custom_image_width'] : JPIBFI_IMAGE_WIDTH;
118
  $height = $use_custom_image ? $options['custom_image_height'] : JPIBFI_IMAGE_HEIGHT;
119
  $url = $use_custom_image ? $options['custom_image_url'] : JPIBFI_IMAGE_URL;
120
 
121
- $transHex = "#" . jpibfi_convert_to_hex( $options['transparency_value'] ) . "ffffff";
122
-
123
  ?>
124
  <!--[if lt IE 9]>
125
  <style type="text/css">
126
  .pinit-overlay {
127
- background-image: url( '<?php echo plugins_url( '/images/transparency_0.png', __FILE__ ); ?>' );
128
- }
129
- .pinit-overlay:hover {
130
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='<?php echo $transHex; ?>',endColorstr='<?php echo $transHex; ?>');
131
  }
132
  </style>
133
  <![endif]-->
134
 
135
  <style type="text/css">
136
- .pinit-overlay:hover {
137
- background-color: rgba(255, 255, 255, <?php echo $options['transparency_value']; ?>);
 
 
 
 
 
 
 
 
 
 
138
  }
139
- .pinit-overlay a {
140
- width: <?php echo $width; ?>px;
141
- height: <?php echo $height; ?>px;
142
- background: transparent url('<?php echo $url; ?>') no-repeat 0 0;
143
- <?php echo $button_css; ?>
 
 
 
 
 
 
 
144
  }
145
  </style>
146
  <?php
@@ -258,6 +282,7 @@ function jpibfi_uninstall_plugin() {
258
  //delete all added options
259
  delete_option( JPIBFI_SELECTION_OPTIONS );
260
  delete_option( JPIBFI_VISUAL_OPTIONS );
 
261
  delete_option( JPIBFI_VERSION_OPTION );
262
 
263
  //delete added metadata from all posts
@@ -277,7 +302,6 @@ register_uninstall_hook( __FILE__, 'jpibfi_uninstall_plugin' );
277
  */
278
  function jpibfi_update_plugin() {
279
 
280
-
281
  $version = get_option( JPIBFI_VERSION_OPTION );
282
 
283
  //if the plugin isn't installed at all or the version is below 1.00
@@ -292,13 +316,20 @@ function jpibfi_update_plugin() {
292
  if( false == get_option( JPIBFI_SELECTION_OPTIONS ) )
293
  add_option( JPIBFI_SELECTION_OPTIONS, jpibfi_default_selection_options() );
294
 
 
 
 
295
  } else if ( (float)$version < (float)JPIBFI_VERSION ) { //if the plugins version is older than current, we need to update options with new defaults
296
 
297
  $option = get_option( JPIBFI_VISUAL_OPTIONS );
 
298
  jpibfi_update_option_fields( $option, jpibfi_default_visual_options(), JPIBFI_VISUAL_OPTIONS );
299
 
300
  $option = get_option( JPIBFI_SELECTION_OPTIONS );
301
  jpibfi_update_option_fields( $option, jpibfi_default_selection_options(), JPIBFI_SELECTION_OPTIONS );
 
 
 
302
  }
303
 
304
  //update the version of the plugin stored in option
@@ -315,7 +346,6 @@ function jpibfi_convert_settings() {
315
  //get all old options
316
  $basic_option = get_option( "jptbfi_options" );
317
  $advanced_options = get_option( 'jptbfi_advanced_options' );
318
- $button_css = get_option( 'jpibfi_button_custom_css' );
319
 
320
  //if options don't exist, there's nothing to convert so the function ends
321
  if ( false == $basic_option || false == $advanced_options )
@@ -352,8 +382,9 @@ function jpibfi_convert_settings() {
352
  $visual_options[ 'custom_image_height' ] = isset ( $basic_option[ 'custom_image_height' ] ) ? $basic_option[ 'custom_image_height' ] : $default_visual_options[ 'custom_image_height' ];
353
  $visual_options[ 'custom_image_width' ] = isset ( $basic_option[ 'custom_image_width' ] ) ? $basic_option[ 'custom_image_width' ] : $default_visual_options[ 'custom_image_width' ];
354
  $visual_options[ 'use_post_url' ] = isset ( $basic_option[ 'use_post_url' ] ) && '1' == $basic_option[ 'use_post_url' ] ? '1' : '0';
355
- $visual_options[ 'button_position' ] = isset ( $basic_option[ 'button_position' ] ) ? $basic_option[ 'button_position' ] : $default_visual_options[ 'button_position' ];
356
- $visual_options[ 'button_css' ] = true == $button_css ? $button_css : $default_visual_options[ 'button_css' ];
 
357
 
358
  update_option( JPIBFI_VISUAL_OPTIONS, $visual_options );
359
  //just in case any new fields are added to the option in the future
@@ -384,13 +415,14 @@ add_action( 'admin_menu', 'jpibfi_print_admin_page_action' );
384
  * adds admin scripts
385
  */
386
  function jpibfi_add_admin_site_scripts() {
387
- $jpibfi_button_css = jpibfi_button_css();
388
 
389
  wp_register_style( 'jquery-pin-it-button-admin-style', plugins_url( '/css/admin.css', __FILE__ ), array(), JPIBFI_VERSION, 'all' );
390
  wp_enqueue_style( 'jquery-pin-it-button-admin-style' );
391
 
392
  wp_enqueue_script( 'jquery-pin-it-button-admin-script', plugins_url( '/js/admin.js', __FILE__ ), array( 'jquery' ), JPIBFI_VERSION, false );
393
- wp_localize_script( 'jquery-pin-it-button-admin-script', 'jpibfi_button_css', $jpibfi_button_css );
 
 
394
 
395
  if ( function_exists( "wp_enqueue_media") ) {
396
  wp_enqueue_media();
@@ -419,19 +451,20 @@ function jpibfi_print_admin_page() {
419
 
420
  <?php
421
  $tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'selection_options';
422
- if ( 'selection_options' != $tab && 'visual_options' != $tab )
423
  $tab = 'selection_options';
424
  ?>
425
  <div id="icon-plugins" class="icon32"></div>
426
  <h2 class="nav-tab-wrapper">
427
- <a href="?page=jpibfi_settings&tab=selection_options" class="nav-tab <?php echo $tab == 'selection_options' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Selection Options', 'jpibfi' ); ?></a>
428
- <a href="?page=jpibfi_settings&tab=visual_options" class="nav-tab <?php echo $tab == 'visual_options' ? 'nav-tab-active' : ''; ?>"><?php _e( 'Visual Options', 'jpibfi' ); ?></a>
 
429
  </h2>
430
 
431
  <p>
432
  If you like the plugin and would like to support its development, please <a href="http://bit.ly/Uw2mEP" target="_blank" rel="nofollow"><b>donate</b></a>.
433
  </p>
434
- <form method="post" action="options.php">
435
  <?php
436
 
437
  if ( 'selection_options' == $tab ) {
@@ -440,12 +473,17 @@ function jpibfi_print_admin_page() {
440
  } else if ( 'visual_options' == $tab) {
441
  settings_fields( 'jpibfi_visual_options' );
442
  do_settings_sections( 'jpibfi_visual_options' );
 
 
 
443
  }
444
 
445
  submit_button();
446
  ?>
447
  </form>
448
-
 
 
449
  </div>
450
  <?php
451
 
@@ -513,11 +551,10 @@ function jpibfi_initialize_selection_options() {
513
  add_settings_field(
514
  'disabled_classes',
515
  __( 'Disabled classes', 'jpibfi' ),
516
- 'jpibfi_classes_callback',
517
  'jpibfi_selection_options',
518
  'selection_options_section',
519
  array(
520
- 'disabled_classes',
521
  __( 'Pictures with these CSS classes won\'t show the "Pin it" button. Please separate multiple classes with semicolons. Spaces are not accepted.', 'jpibfi' ),
522
  )
523
  );
@@ -525,11 +562,10 @@ function jpibfi_initialize_selection_options() {
525
  add_settings_field(
526
  'enabled_classes',
527
  __( 'Enabled classes', 'jpibfi' ),
528
- 'jpibfi_classes_callback',
529
  'jpibfi_selection_options',
530
  'selection_options_section',
531
  array(
532
- 'enabled_classes',
533
  __( 'Only pictures with these CSS classes will show the "Pin it" button. Please
534
  separate multiple classes with semicolons. If this field is empty, images with any (besides
535
  disabled ones) classes will show the Pin It button.', 'jpibfi' ),
@@ -581,15 +617,62 @@ function jpibfi_image_selector_callback( $args ) {
581
  echo jpibfi_create_description( $args[0] );
582
  }
583
 
584
- function jpibfi_classes_callback( $args ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
 
586
  $options = jpibfi_get_selection_options();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
587
 
588
- $value = esc_attr( $options[ $args[0] ] );
589
 
590
- echo '<textarea id="' . $args[0] . '" name="jpibfi_selection_options[' . $args[0] . ']">' . $value . '</textarea>';
591
- echo jpibfi_create_description( $args[1] );
592
- echo jpibfi_create_errors( $args[0] );
593
  }
594
 
595
  function jpibfi_show_on_field_callback( $args ) {
@@ -714,7 +797,6 @@ function jpibfi_get_selection_options() {
714
  * Default values for visual options section
715
  */
716
  function jpibfi_default_visual_options() {
717
- $jpibfi_button_css = jpibfi_button_css();
718
 
719
  $defaults = array(
720
  'transparency_value' => '0.5',
@@ -725,7 +807,11 @@ function jpibfi_default_visual_options() {
725
  'custom_image_width' => '0',
726
  'use_post_url' => '0',
727
  'button_position' => '0',
728
- 'button_css' => $jpibfi_button_css[0]
 
 
 
 
729
  );
730
 
731
  return $defaults;
@@ -745,6 +831,17 @@ function jpibfi_initialize_visual_options() {
745
  );
746
 
747
  //Then add all necessary fields to the section
 
 
 
 
 
 
 
 
 
 
 
748
  add_settings_field(
749
  'description_option',
750
  __( 'Description source', 'jpibfi' ),
@@ -774,7 +871,7 @@ function jpibfi_initialize_visual_options() {
774
  'jpibfi_visual_options',
775
  'visual_options_section',
776
  array(
777
- __( 'This setting sets the transparency of the layer covering the image.', 'jpibfi' ),
778
  )
779
  );
780
 
@@ -800,6 +897,17 @@ function jpibfi_initialize_visual_options() {
800
  )
801
  );
802
 
 
 
 
 
 
 
 
 
 
 
 
803
  register_setting(
804
  'jpibfi_visual_options',
805
  'jpibfi_visual_options',
@@ -814,6 +922,21 @@ function jpibfi_visual_options_callback() {
814
  echo '<p>' . __('How it should look like', 'jpibfi') . '</p>';
815
  }
816
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
817
  function jpibfi_description_option_callback( $args ) {
818
  $options = jpibfi_get_visual_options();
819
 
@@ -911,12 +1034,10 @@ function jpibfi_pin_it_button_position_callback( $args ) {
911
  __( 'Top right', 'jpibfi' ),
912
  __( 'Bottom left', 'jpibfi' ),
913
  __( 'Bottom right', 'jpibfi' ),
914
- __( 'Middle', 'jpibfi' ),
915
- __( 'Custom', 'jpibfi' )
916
  );
917
 
918
  $button_position = $options[ 'button_position' ];
919
- $button_css = $options[ 'button_css' ];
920
 
921
  ?>
922
 
@@ -925,14 +1046,28 @@ function jpibfi_pin_it_button_position_callback( $args ) {
925
  <option value="<?php echo $i; ?>" <?php selected( $i, $button_position ); ?>><?php echo $jpibfi_button_dropdown[ $i ]; ?></option>
926
  <?php } ?>
927
  </select><br/>
928
- <textarea id="button_css" rows="5" cols="50" name="jpibfi_visual_options[button_css]"><?php echo $button_css; ?></textarea>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
929
 
930
  <?php
931
  echo jpibfi_create_description( $args[0] );
932
  }
933
 
934
  function jpibfi_sanitize_visual_options( $input ) {
935
- $jpibfi_button_css = jpibfi_button_css();
936
 
937
  foreach( $input as $key => $value ) {
938
 
@@ -966,10 +1101,6 @@ function jpibfi_sanitize_visual_options( $input ) {
966
  }
967
  }
968
 
969
- //if user didn't specify his custom css, we need to save button_css setting as one of the defaults
970
- if ( '5' != $input[ 'button_position' ] )
971
- $input[ 'button_css' ] = $jpibfi_button_css[ $input[ 'button_position' ] ];
972
-
973
  $errors = get_settings_errors();
974
 
975
  if ( count( $errors ) > 0 ) {
@@ -989,6 +1120,70 @@ function jpibfi_get_visual_options() {
989
  return jpibfi_get_options( JPIBFI_VISUAL_OPTIONS );
990
  }
991
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
992
  /*
993
  *
994
  * UTILITIES
@@ -1068,32 +1263,20 @@ function jpibfi_get_options( $name ) {
1068
  */
1069
  function jpibfi_update_option_fields( $option, $default_option, $option_name ) {
1070
 
1071
- $option_changed = false;
1072
-
1073
- foreach($default_option as $key => $value) {
1074
- if ( false == array_key_exists( $key, $option ) ) {
1075
- $options [ $key ] = $value;
1076
- $option_changed = true;
1077
- }
1078
- }
1079
-
1080
- if ( $option_changed )
1081
- update_option( $option_name, $option );
1082
 
1083
- }
 
1084
 
1085
- /*
1086
- * function converts 0.0..1.0 value to 00..FF
1087
- */
1088
- function jpibfi_convert_to_hex( $val ) {
 
 
1089
 
1090
- $transparencyDec = floatval( $val );
1091
- $transparencyDec = (int)( $transparencyDec * 255 );
1092
- $transparencyHex = dechex( (int) $transparencyDec );
1093
- if ( strlen( $transparencyHex) == 1 )
1094
- $transparencyHex = "0" . $transparencyHex;
1095
 
1096
- return $transparencyHex;
1097
  }
1098
 
1099
  function jpibfi_is_string_css_class_name( $class_name ) {
@@ -1112,14 +1295,4 @@ function jpibfi_contains_css_class_names_or_empty( $str ) {
1112
  $only_class_names = jpibfi_is_string_css_class_name( $names [ $i ] );
1113
 
1114
  return $only_class_names;
1115
- }
1116
-
1117
- function jpibfi_button_css() {
1118
- $css = array();
1119
- $css[0] = esc_html( "top:0%;&#10;left:0%;&#10;margin:20px 0 0 20px;" ); //Top left
1120
- $css[1] = esc_html( "top:0%;&#10;right:0%;&#10;margin:20px 20px 0 0;" ); //Top right
1121
- $css[2] = esc_html( "bottom:0%;&#10;left:0%;&#10;margin:0 0 20px 20px;" ); //Bottom left
1122
- $css[3] = esc_html( "bottom:0%;&#10;right:0%;&#10;margin:0 20px 20px 0;" ); //Bottom right
1123
- $css[4] = esc_html( "top:0;&#10;left:0;&#10;right:0;&#10;bottom:0;&#10;margin:auto;" ); //Middle
1124
- return $css;
1125
  }
4
  Plugin URI: http://wordpress.org/extend/plugins/jquery-pin-it-button-for-images/
5
  Description: Highlights images on hover and adds a "Pin It" button over them for easy pinning.
6
  Author: Marcin Skrzypiec
7
+ Version: 1.10
8
  Author URI: http://profiles.wordpress.org/mrsztuczkens
9
  */
10
 
18
  * CONSTANTS
19
  *
20
  */
21
+ define( "JPIBFI_VERSION", "1.1" );
22
  define( "JPIBFI_METADATA", "jpibfi_meta" );
23
  define( "JPIBFI_SELECTION_OPTIONS", "jpibfi_selection_options" );
24
  define( "JPIBFI_VISUAL_OPTIONS", "jpibfi_visual_options" );
25
+ define( "JPIBFI_ADVANCED_OPTIONS", "jpibfi_advanced_options" );
26
  define( "JPIBFI_VERSION_OPTION", "jpibfi_version");
27
 
28
  //DEFAULT PIN BUTTON IMAGE
90
 
91
  $visual_options = get_option( JPIBFI_VISUAL_OPTIONS );
92
  $selection_options = get_option( JPIBFI_SELECTION_OPTIONS );
93
+ $advanced_options = get_option( JPIBFI_ADVANCED_OPTIONS );
94
+ $use_custom_image = isset( $visual_options[ 'use_custom_image' ] ) && $visual_options[ 'use_custom_image' ] == "1";
95
 
96
  $parameters_array = array(
97
  'image_selector' => $selection_options['image_selector'],
101
  'use_post_url' => isset ( $visual_options['use_post_url'] ) ? $visual_options['use_post_url'] : '0',
102
  'min_image_height' => $selection_options['min_image_height'],
103
  'min_image_width' => $selection_options['min_image_width'],
104
+ 'site_title' => get_bloginfo( 'name', 'display' ),
105
+ 'mode' => $visual_options[ 'mode' ],
106
+ 'button_position' => $visual_options[ 'button_position' ],
107
+ 'debug' => isset( $advanced_options[ 'debug'] ) ? $advanced_options[ 'debug'] : '0',
108
+ 'pin_image_height' => $use_custom_image ? $visual_options['custom_image_height'] : JPIBFI_IMAGE_HEIGHT,
109
+ 'pin_image_width' => $use_custom_image ? $visual_options['custom_image_width'] : JPIBFI_IMAGE_WIDTH,
110
+ 'button_margin_top' => $visual_options[ 'button_margin_top' ],
111
+ 'button_margin_bottom' => $visual_options[ 'button_margin_bottom' ],
112
+ 'button_margin_left'=> $visual_options[ 'button_margin_left' ],
113
+ 'button_margin_right' => $visual_options[ 'button_margin_right' ]
114
  );
115
+
116
  wp_localize_script( 'jquery-pin-it-button-script', 'jpibfi_options', $parameters_array );
117
  }
118
 
124
 
125
  $options = get_option( JPIBFI_VISUAL_OPTIONS );
126
 
 
127
  $use_custom_image = isset( $options[ 'use_custom_image' ] ) && $options[ 'use_custom_image' ] == "1";
128
 
129
  $width = $use_custom_image ? $options['custom_image_width'] : JPIBFI_IMAGE_WIDTH;
130
  $height = $use_custom_image ? $options['custom_image_height'] : JPIBFI_IMAGE_HEIGHT;
131
  $url = $use_custom_image ? $options['custom_image_url'] : JPIBFI_IMAGE_URL;
132
 
 
 
133
  ?>
134
  <!--[if lt IE 9]>
135
  <style type="text/css">
136
  .pinit-overlay {
137
+ background-image: url( '<?php echo plugins_url( '/images/transparency_0.png', __FILE__ ); ?>' ) !important;
 
 
 
138
  }
139
  </style>
140
  <![endif]-->
141
 
142
  <style type="text/css">
143
+ a.pinit-button {
144
+ width: <?php echo $width; ?>px !important;
145
+ height: <?php echo $height; ?>px !important;
146
+ background: transparent url('<?php echo $url; ?>') no-repeat 0 0 !important;
147
+ }
148
+
149
+ a.pinit-button.pinit-top-left {
150
+ margin: <?php echo $options['button_margin_top']; ?>px 0 0 <?php echo $options['button_margin_left']; ?>px;
151
+ }
152
+
153
+ a.pinit-button.pinit-top-right {
154
+ margin: <?php echo $options['button_margin_top']; ?>px <?php echo $options['button_margin_right']; ?>px 0 0;
155
  }
156
+
157
+ a.pinit-button.pinit-bottom-left {
158
+ margin: 0 0 <?php echo $options['button_margin_bottom']; ?>px <?php echo $options['button_margin_left']; ?>px;
159
+ }
160
+
161
+ a.pinit-button.pinit-bottom-right {
162
+ margin: 0 <?php echo $options['button_margin_right']; ?>px <?php echo $options['button_margin_bottom']; ?>px 0;
163
+ }
164
+
165
+ img.pinit-hover {
166
+ opacity: <?php echo (1 - $options['transparency_value']); ?> !important;
167
+ filter:alpha(opacity=<?php echo (1 - $options['transparency_value']) * 100; ?>) !important; /* For IE8 and earlier */
168
  }
169
  </style>
170
  <?php
282
  //delete all added options
283
  delete_option( JPIBFI_SELECTION_OPTIONS );
284
  delete_option( JPIBFI_VISUAL_OPTIONS );
285
+ delete_option( JPIBFI_ADVANCED_OPTIONS );
286
  delete_option( JPIBFI_VERSION_OPTION );
287
 
288
  //delete added metadata from all posts
302
  */
303
  function jpibfi_update_plugin() {
304
 
 
305
  $version = get_option( JPIBFI_VERSION_OPTION );
306
 
307
  //if the plugin isn't installed at all or the version is below 1.00
316
  if( false == get_option( JPIBFI_SELECTION_OPTIONS ) )
317
  add_option( JPIBFI_SELECTION_OPTIONS, jpibfi_default_selection_options() );
318
 
319
+ if( false == get_option( JPIBFI_ADVANCED_OPTIONS ) )
320
+ add_option( JPIBFI_ADVANCED_OPTIONS, jpibfi_default_advanced_options() );
321
+
322
  } else if ( (float)$version < (float)JPIBFI_VERSION ) { //if the plugins version is older than current, we need to update options with new defaults
323
 
324
  $option = get_option( JPIBFI_VISUAL_OPTIONS );
325
+ $option['button_position'] = '5' == $option['button_position'] ? '0' : $option['button_position'];
326
  jpibfi_update_option_fields( $option, jpibfi_default_visual_options(), JPIBFI_VISUAL_OPTIONS );
327
 
328
  $option = get_option( JPIBFI_SELECTION_OPTIONS );
329
  jpibfi_update_option_fields( $option, jpibfi_default_selection_options(), JPIBFI_SELECTION_OPTIONS );
330
+
331
+ $option = get_option( JPIBFI_ADVANCED_OPTIONS );
332
+ jpibfi_update_option_fields( $option, jpibfi_default_advanced_options(), JPIBFI_ADVANCED_OPTIONS );
333
  }
334
 
335
  //update the version of the plugin stored in option
346
  //get all old options
347
  $basic_option = get_option( "jptbfi_options" );
348
  $advanced_options = get_option( 'jptbfi_advanced_options' );
 
349
 
350
  //if options don't exist, there's nothing to convert so the function ends
351
  if ( false == $basic_option || false == $advanced_options )
382
  $visual_options[ 'custom_image_height' ] = isset ( $basic_option[ 'custom_image_height' ] ) ? $basic_option[ 'custom_image_height' ] : $default_visual_options[ 'custom_image_height' ];
383
  $visual_options[ 'custom_image_width' ] = isset ( $basic_option[ 'custom_image_width' ] ) ? $basic_option[ 'custom_image_width' ] : $default_visual_options[ 'custom_image_width' ];
384
  $visual_options[ 'use_post_url' ] = isset ( $basic_option[ 'use_post_url' ] ) && '1' == $basic_option[ 'use_post_url' ] ? '1' : '0';
385
+ $visual_options[ 'button_position' ] = isset ( $basic_option[ 'button_position' ] )
386
+ ? ( '5' == $basic_option[ 'button_position' ] ? '0' : $basic_option[ 'button_position' ] )
387
+ : $default_visual_options[ 'button_position' ];
388
 
389
  update_option( JPIBFI_VISUAL_OPTIONS, $visual_options );
390
  //just in case any new fields are added to the option in the future
415
  * adds admin scripts
416
  */
417
  function jpibfi_add_admin_site_scripts() {
 
418
 
419
  wp_register_style( 'jquery-pin-it-button-admin-style', plugins_url( '/css/admin.css', __FILE__ ), array(), JPIBFI_VERSION, 'all' );
420
  wp_enqueue_style( 'jquery-pin-it-button-admin-style' );
421
 
422
  wp_enqueue_script( 'jquery-pin-it-button-admin-script', plugins_url( '/js/admin.js', __FILE__ ), array( 'jquery' ), JPIBFI_VERSION, false );
423
+
424
+ wp_register_script( 'angular', plugins_url( '/js/angular.min.js', __FILE__ ) , '', '1.0.7', false );
425
+ wp_enqueue_script( 'jquery-pin-it-button-admin-angular-script', plugins_url( '/js/admin-angular.js', __FILE__ ), array( 'angular' ), JPIBFI_VERSION, false );
426
 
427
  if ( function_exists( "wp_enqueue_media") ) {
428
  wp_enqueue_media();
451
 
452
  <?php
453
  $tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'selection_options';
454
+ if ( 'selection_options' != $tab && 'visual_options' != $tab && 'advanced_options' != $tab )
455
  $tab = 'selection_options';
456
  ?>
457
  <div id="icon-plugins" class="icon32"></div>
458
  <h2 class="nav-tab-wrapper">
459
+ <a href="?page=jpibfi_settings&tab=selection_options" class="nav-tab <?php echo 'selection_options' == $tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Selection Options', 'jpibfi' ); ?></a>
460
+ <a href="?page=jpibfi_settings&tab=visual_options" class="nav-tab <?php echo 'visual_options' == $tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Visual Options', 'jpibfi' ); ?></a>
461
+ <a href="?page=jpibfi_settings&tab=advanced_options" class="nav-tab <?php echo 'advanced_options' == $tab ? 'nav-tab-active' : ''; ?>"><?php _e( 'Advanced Options', 'jpibfi' ); ?></a>
462
  </h2>
463
 
464
  <p>
465
  If you like the plugin and would like to support its development, please <a href="http://bit.ly/Uw2mEP" target="_blank" rel="nofollow"><b>donate</b></a>.
466
  </p>
467
+ <form method="post" action="options.php" ng-app="jpibfiApp" ng-controller="jpibfiController">
468
  <?php
469
 
470
  if ( 'selection_options' == $tab ) {
473
  } else if ( 'visual_options' == $tab) {
474
  settings_fields( 'jpibfi_visual_options' );
475
  do_settings_sections( 'jpibfi_visual_options' );
476
+ } else if ( 'advanced_options' == $tab) {
477
+ settings_fields( 'jpibfi_advanced_options' );
478
+ do_settings_sections( 'jpibfi_advanced_options' );
479
  }
480
 
481
  submit_button();
482
  ?>
483
  </form>
484
+ <p>
485
+ The Silk Icon Set is provided by Mark James and is availble from <a href="http://famfamfam.com/lab/icons/silk/">FamFamFam</a> under the <a href="http://creativecommons.org/licenses/by/2.5/">Creative Commons Attribution 2.5 License</a>.
486
+ </p>
487
  </div>
488
  <?php
489
 
551
  add_settings_field(
552
  'disabled_classes',
553
  __( 'Disabled classes', 'jpibfi' ),
554
+ 'jpibfi_disabled_classes_callback',
555
  'jpibfi_selection_options',
556
  'selection_options_section',
557
  array(
 
558
  __( 'Pictures with these CSS classes won\'t show the "Pin it" button. Please separate multiple classes with semicolons. Spaces are not accepted.', 'jpibfi' ),
559
  )
560
  );
562
  add_settings_field(
563
  'enabled_classes',
564
  __( 'Enabled classes', 'jpibfi' ),
565
+ 'jpibfi_enabled_classes_callback',
566
  'jpibfi_selection_options',
567
  'selection_options_section',
568
  array(
 
569
  __( 'Only pictures with these CSS classes will show the "Pin it" button. Please
570
  separate multiple classes with semicolons. If this field is empty, images with any (besides
571
  disabled ones) classes will show the Pin It button.', 'jpibfi' ),
617
  echo jpibfi_create_description( $args[0] );
618
  }
619
 
620
+ function jpibfi_disabled_classes_callback( $args ){
621
+
622
+ $options = jpibfi_get_selection_options();
623
+ $value = esc_attr( $options[ 'disabled_classes' ] );
624
+
625
+ ?>
626
+ <input type="hidden" name="jpibfi_selection_options[disabled_classes]" value="{{ disabledClassesFormatted }}" ng-init="initDisabledClasses('<?php echo $value; ?>')">
627
+ <span ng-hide="disabledClasses.length > 0">
628
+ <?php echo jpibfi_create_description( __( 'No classes added.', 'jpibfi' ) ); ?>
629
+ </span>
630
+ <ul class="jpibfi-classes-list" ng-hide="disabledClasses.length == 0">
631
+ <li ng-repeat="class in disabledClasses">
632
+ <a ng-click="deleteDisabledClass(class)">X</a><span>{{ class }}</span>
633
+ </li>
634
+ </ul>
635
+ <div>
636
+ <div>
637
+ <label for="disabledClass" ><?php _e( 'Class name', 'jpibfi' ); ?></label>
638
+ <input id="disabledClass" type="text" ng-model="disabledClass">
639
+ <button type="button" ng-click="addDisabledClass(disabledClass)"><?php _e( 'Add to list', 'jpibfi' ); ?></button>
640
+ </div>
641
+ </div>
642
+
643
+ <?php
644
+
645
+ echo jpibfi_create_description( $args[0] );
646
+ echo jpibfi_create_errors( 'disabled_classes' );
647
+ }
648
+
649
+ function jpibfi_enabled_classes_callback( $args ){
650
 
651
  $options = jpibfi_get_selection_options();
652
+ $value = esc_attr( $options[ 'enabled_classes' ] );
653
+
654
+ ?>
655
+ <input type="hidden" name="jpibfi_selection_options[enabled_classes]" value="{{ enabledClassesFormatted }}" ng-init="initEnabledClasses('<?php echo $value; ?>')">
656
+ <span ng-hide="enabledClasses.length > 0">
657
+ <?php echo jpibfi_create_description( __( 'No classes added.', 'jpibfi' ) ); ?>
658
+ </span>
659
+ <ul class="jpibfi-classes-list" ng-hide="enabledClasses.length == 0">
660
+ <li ng-repeat="class in enabledClasses">
661
+ <a ng-click="deleteEnabledClass(class)">X</a><span>{{ class }}</span>
662
+ </li>
663
+ </ul>
664
+ <div>
665
+ <div>
666
+ <label for="enabledClass" ><?php _e( 'Class name', 'jpibfi' ); ?></label>
667
+ <input id="enabledClass" type="text" ng-model="enabledClass">
668
+ <button type="button" ng-click="addEnabledClass(enabledClass)"><?php _e( 'Add to list', 'jpibfi' ); ?></button>
669
+ </div>
670
+ </div>
671
 
672
+ <?php
673
 
674
+ echo jpibfi_create_description( $args[0] );
675
+ echo jpibfi_create_errors( 'enabled_classes' );
 
676
  }
677
 
678
  function jpibfi_show_on_field_callback( $args ) {
797
  * Default values for visual options section
798
  */
799
  function jpibfi_default_visual_options() {
 
800
 
801
  $defaults = array(
802
  'transparency_value' => '0.5',
807
  'custom_image_width' => '0',
808
  'use_post_url' => '0',
809
  'button_position' => '0',
810
+ 'mode' => 'static',
811
+ 'button_margin_top' => '20',
812
+ 'button_margin_right' => '20',
813
+ 'button_margin_bottom'=> '20',
814
+ 'button_margin_left' => '20'
815
  );
816
 
817
  return $defaults;
831
  );
832
 
833
  //Then add all necessary fields to the section
834
+ add_settings_field(
835
+ 'mode',
836
+ __( 'Mode', 'jpibfi' ),
837
+ 'jpibfi_mode_option_callback',
838
+ 'jpibfi_visual_options',
839
+ 'visual_options_section',
840
+ array(
841
+ __( 'Static mode adds a layer on the top of the image that restricts image download, but works on websites that protect images download. Dynamic mode doesn\'t add that layer and allows image download. If you\'re experiencing issues with static mode, try using dynamic mode. Static mode works similarly to version 1.00 of the plugin, while dynamic mode is quite similar to version 0.99.', 'jpibfi' ),
842
+ )
843
+ );
844
+
845
  add_settings_field(
846
  'description_option',
847
  __( 'Description source', 'jpibfi' ),
871
  'jpibfi_visual_options',
872
  'visual_options_section',
873
  array(
874
+ __( 'This setting sets the transparency of the image.', 'jpibfi' ),
875
  )
876
  );
877
 
897
  )
898
  );
899
 
900
+ add_settings_field(
901
+ 'pin_it_button_margins',
902
+ __( '"Pin it" button margins', 'jpibfi' ),
903
+ 'jpibfi_pin_it_button_margins_callback',
904
+ 'jpibfi_visual_options',
905
+ 'visual_options_section',
906
+ array(
907
+ __( 'Margins are used to adjust the position of the "Pin it" button, but not all margins are used on all button positions. Here is an example. If you\'re using the "Top left" position, the button\'s position will be affected only by top and left margins. Bottom and right margins affect "Bottom right" position, etc. The "Middle" position does not use any margins at all.', 'jpibfi' ),
908
+ )
909
+ );
910
+
911
  register_setting(
912
  'jpibfi_visual_options',
913
  'jpibfi_visual_options',
922
  echo '<p>' . __('How it should look like', 'jpibfi') . '</p>';
923
  }
924
 
925
+ function jpibfi_mode_option_callback( $args ) {
926
+ $options = jpibfi_get_visual_options();
927
+ $mode = $options[ 'mode' ];
928
+
929
+ ?>
930
+
931
+ <select id="mode" name="jpibfi_visual_options[mode]">
932
+ <option value="static" <?php selected ( "static", $mode ); ?>><?php _e( 'Static', 'jpibfi' ); ?></option>
933
+ <option value="dynamic" <?php selected ( "dynamic", $mode ); ?>><?php _e( 'Dynamic', 'jpibfi' ); ?></option>
934
+ </select>
935
+
936
+ <?php
937
+ echo jpibfi_create_description( $args[0] );
938
+ }
939
+
940
  function jpibfi_description_option_callback( $args ) {
941
  $options = jpibfi_get_visual_options();
942
 
1034
  __( 'Top right', 'jpibfi' ),
1035
  __( 'Bottom left', 'jpibfi' ),
1036
  __( 'Bottom right', 'jpibfi' ),
1037
+ __( 'Middle', 'jpibfi' )
 
1038
  );
1039
 
1040
  $button_position = $options[ 'button_position' ];
 
1041
 
1042
  ?>
1043
 
1046
  <option value="<?php echo $i; ?>" <?php selected( $i, $button_position ); ?>><?php echo $jpibfi_button_dropdown[ $i ]; ?></option>
1047
  <?php } ?>
1048
  </select><br/>
1049
+
1050
+ <?php
1051
+ echo jpibfi_create_description( $args[0] );
1052
+ }
1053
+
1054
+ function jpibfi_pin_it_button_margins_callback( $args ) {
1055
+ $options = jpibfi_get_visual_options();
1056
+ ?>
1057
+ <label for="button_margin_top"><?php _e('Top', 'jpibfi'); ?></label>
1058
+ <input type="number" min="-1000" max="1000" step="1" id="button_margin_top" name="jpibfi_visual_options[button_margin_top]" value="<?php echo $options[ 'button_margin_top' ]; ?>" class="small-text" >px<br/>
1059
+ <label for="button_margin_bottom"><?php _e('Bottom', 'jpibfi'); ?></label>
1060
+ <input type="number" min="-1000" max="1000" step="1" id="button_margin_bottom" name="jpibfi_visual_options[button_margin_bottom]" value="<?php echo $options[ 'button_margin_bottom' ]; ?>" class="small-text" >px<br/>
1061
+ <label for="button_margin_left"><?php _e('Left', 'jpibfi'); ?></label>
1062
+ <input type="number" min="-1000" max="1000" step="1" id="button_margin_left" name="jpibfi_visual_options[button_margin_left]" value="<?php echo $options[ 'button_margin_left' ]; ?>" class="small-text" >px<br/>
1063
+ <label for="button_margin_right"><?php _e('Right', 'jpibfi'); ?></label>
1064
+ <input type="number" min="-1000" max="1000" step="1" id="button_margin_right" name="jpibfi_visual_options[button_margin_right]" value="<?php echo $options[ 'button_margin_right' ]; ?>" class="small-text" >px<br/>
1065
 
1066
  <?php
1067
  echo jpibfi_create_description( $args[0] );
1068
  }
1069
 
1070
  function jpibfi_sanitize_visual_options( $input ) {
 
1071
 
1072
  foreach( $input as $key => $value ) {
1073
 
1101
  }
1102
  }
1103
 
 
 
 
 
1104
  $errors = get_settings_errors();
1105
 
1106
  if ( count( $errors ) > 0 ) {
1120
  return jpibfi_get_options( JPIBFI_VISUAL_OPTIONS );
1121
  }
1122
 
1123
+ /*
1124
+ *
1125
+ * ADVANCED OPTIONS
1126
+ *
1127
+ */
1128
+ function jpibfi_default_advanced_options() {
1129
+ $defaults = array(
1130
+ 'debug' => '0'
1131
+ );
1132
+
1133
+ return $defaults;
1134
+ }
1135
+
1136
+ /*
1137
+ * Defines selection options section and adds all required fields
1138
+ */
1139
+ function jpibfi_initialize_advanced_options() {
1140
+
1141
+ // First, we register a section.
1142
+ add_settings_section(
1143
+ 'advanced_options_section',
1144
+ __( 'Advanced options', 'jpibfi' ),
1145
+ 'jpibfi_advanced_options_callback',
1146
+ 'jpibfi_advanced_options'
1147
+ );
1148
+
1149
+ //lThen add all necessary fields to the section
1150
+ add_settings_field(
1151
+ 'debug',
1152
+ __( 'Debug', 'jpibfi' ),
1153
+ 'jpibfi_debug_callback',
1154
+ 'jpibfi_advanced_options',
1155
+ 'advanced_options_section',
1156
+ array(
1157
+ __( 'Use debug mode only if you are experiencing some issues with the plugin and you are reporting them to the developer of the plugin', 'jpibfi' ),
1158
+ )
1159
+ );
1160
+
1161
+ register_setting(
1162
+ 'jpibfi_advanced_options',
1163
+ 'jpibfi_advanced_options' //no sanitization needed for now
1164
+ );
1165
+ }
1166
+
1167
+ add_action( 'admin_init', 'jpibfi_initialize_advanced_options' );
1168
+
1169
+ function jpibfi_advanced_options_callback() {
1170
+ echo '<p>' . __('Advanced settings', 'jpibfi') . '</p>';
1171
+ }
1172
+
1173
+ function jpibfi_get_advanced_options() {
1174
+ return jpibfi_get_options( JPIBFI_ADVANCED_OPTIONS );
1175
+ }
1176
+
1177
+ function jpibfi_debug_callback( $args ){
1178
+ $options = jpibfi_get_advanced_options();
1179
+ $debug = jpibfi_exists_and_equal_to( $options, 'debug', '1' );
1180
+
1181
+ echo '<input type="checkbox" id="debug" name="jpibfi_advanced_options[debug]" value="1" ' . checked( "1", $debug, false ) . '>';
1182
+ echo '<label for="debug">' . __( 'Enable debug mode', 'jpibfi' ) . '</label>';
1183
+
1184
+ echo jpibfi_create_description( $args[0] );
1185
+ }
1186
+
1187
  /*
1188
  *
1189
  * UTILITIES
1263
  */
1264
  function jpibfi_update_option_fields( $option, $default_option, $option_name ) {
1265
 
1266
+ $new_option = array();
 
 
 
 
 
 
 
 
 
 
1267
 
1268
+ if ( false == $option )
1269
+ $option = array();
1270
 
1271
+ foreach ($default_option as $key => $value ) {
1272
+ if ( false == array_key_exists( $key, $option ) )
1273
+ $new_option [ $key ] = $value;
1274
+ else
1275
+ $new_option [ $key ] = $option [ $key ];
1276
+ }
1277
 
1278
+ update_option( $option_name, $new_option );
 
 
 
 
1279
 
 
1280
  }
1281
 
1282
  function jpibfi_is_string_css_class_name( $class_name ) {
1295
  $only_class_names = jpibfi_is_string_css_class_name( $names [ $i ] );
1296
 
1297
  return $only_class_names;
 
 
 
 
 
 
 
 
 
 
1298
  }
js/admin-angular.js ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var jpibfiApp = angular.module('jpibfiApp', []);
2
+
3
+ jpibfiApp.controller('jpibfiController', function( $scope ) {
4
+
5
+ $scope.disabledClasses = [];
6
+ $scope.disabledClassesFormatted = '';
7
+ $scope.enabledClasses = [];
8
+ $scope.enabledClassesFormatted = '';
9
+
10
+ /*
11
+ * Utility functions
12
+ */
13
+
14
+ function addClass( listName, classes ) {
15
+ var classNames = [];
16
+
17
+ if ( classes.indexOf( ';' ) >= 0 ){
18
+ classNames = classes.split( ';' );
19
+ for(var i = 0; i < classNames.length; i++) {
20
+ if ( 0 == classNames[i].length ) {
21
+ classNames.splice(i, 1);
22
+ i--;
23
+ }
24
+ }
25
+ } else {
26
+ classNames.push( classes );
27
+ }
28
+
29
+ var list = null;
30
+
31
+ if ( listName == 'disabledClasses' )
32
+ list = $scope.disabledClasses;
33
+ else if ( listName == 'enabledClasses' )
34
+ list = $scope.enabledClasses;
35
+
36
+
37
+ for(var i = 0; i < classNames.length; i++ ) {
38
+ if ( list.indexOf( classNames[i] ) < 0 )
39
+ list.push( classNames[i]);
40
+ }
41
+
42
+ refreshFormattedValue( listName );
43
+ }
44
+
45
+ function deleteClass( listName, className ) {
46
+ if ( listName == 'disabledClasses' ) {
47
+ var index = $scope.disabledClasses.indexOf(className);
48
+ $scope.disabledClasses.splice(index, 1);
49
+ }
50
+ else if ( listName == 'enabledClasses' ) {
51
+ var index = $scope.enabledClasses.indexOf(className);
52
+ $scope.enabledClasses.splice(index, 1);
53
+ }
54
+ refreshFormattedValue( listName );
55
+ }
56
+
57
+ function initClass( listName, formatted ) {
58
+ var listRef = null;
59
+
60
+ if ( listName == 'disabledClasses' ) {
61
+ $scope.disabledClasses = formatted.split( ';' );
62
+ listRef = $scope.disabledClasses;
63
+ } else if ( listName == 'enabledClasses' ) {
64
+ $scope.enabledClasses = formatted.split( ';' );
65
+ listRef = $scope.enabledClasses;
66
+ }
67
+
68
+ for( var i = 0; i < listRef.length; i++ ){
69
+ if ( 0 == listRef[i].length ) {
70
+ listRef.splice(i, 1);
71
+ i--;
72
+ }
73
+ }
74
+
75
+ if ( listName == 'disabledClasses' )
76
+ $scope.disabledClassesFormatted = listRef.join( ';' );
77
+ else if ( listName == 'enabledClasses' )
78
+ $scope.enabledClassesFormatted = listRef.join( ';' );
79
+ }
80
+
81
+ function refreshFormattedValue( listName ){
82
+ if ( listName == 'disabledClasses' )
83
+ $scope.disabledClassesFormatted = $scope.disabledClasses.join( ';' );
84
+ else if ( listName == 'enabledClasses' )
85
+ $scope.enabledClassesFormatted = $scope.enabledClasses.join( ';' );
86
+ }
87
+
88
+ /*
89
+ * Disabled classes
90
+ */
91
+
92
+ $scope.initDisabledClasses = function( disClassesFormatted ){
93
+ initClass( 'disabledClasses', disClassesFormatted );
94
+ }
95
+
96
+ $scope.addDisabledClass = function( className ) {
97
+ addClass( 'disabledClasses', className );
98
+ this.disabledClass = '';
99
+ };
100
+
101
+ $scope.deleteDisabledClass = function( disabledClass ) {
102
+ deleteClass( 'disabledClasses', disabledClass );
103
+ };
104
+
105
+ /*
106
+ * Enabled classes
107
+ */
108
+
109
+ $scope.initEnabledClasses = function( enClassesFormatted ){
110
+ initClass( 'enabledClasses', enClassesFormatted );
111
+ }
112
+
113
+ $scope.addEnabledClass = function(className) {
114
+ addClass( 'enabledClasses', className );
115
+ this.enabledClass = '';
116
+ };
117
+
118
+ $scope.deleteEnabledClass = function( enabledClass ) {
119
+ deleteClass( 'enabledClasses', enabledClass );
120
+ };
121
+
122
+ });
js/admin.js CHANGED
@@ -20,13 +20,5 @@ jQuery(document).ready(function($) {
20
  );
21
  return false;
22
  });
23
-
24
- $("#button_css").prop('disabled', $('#button_position').val() != "5");
25
 
26
- $('#button_position').change( function() {
27
- var buttonPos = $(this).val()
28
- $("#button_css").prop('disabled', buttonPos != "5");
29
- if ( buttonPos >= 0 && buttonPos <= 4 )
30
- $('#button_css').html( jpibfi_button_css[buttonPos] );
31
- });
32
  });
20
  );
21
  return false;
22
  });
 
 
23
 
 
 
 
 
 
 
24
  });
js/angular.min.js ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ AngularJS v1.0.7
3
+ (c) 2010-2012 Google, Inc. http://angularjs.org
4
+ License: MIT
5
+ */
6
+ (function(P,T,q){'use strict';function m(b,a,c){var d;if(b)if(H(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==m)b.forEach(a,c);else if(!b||typeof b.length!=="number"?0:typeof b.hasOwnProperty!="function"&&typeof b.constructor!="function"||b instanceof K||ca&&b instanceof ca||wa.call(b)!=="[object Object]"||typeof b.callee==="function")for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],
7
+ d);return b}function mb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function fc(b,a,c){for(var d=mb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function nb(b){return function(a,c){b(c,a)}}function xa(){for(var b=aa.length,a;b;){b--;a=aa[b].charCodeAt(0);if(a==57)return aa[b]="A",aa.join("");if(a==90)aa[b]="0";else return aa[b]=String.fromCharCode(a+1),aa.join("")}aa.unshift("0");return aa.join("")}function ob(b,a){a?b.$$hashKey=a:delete b.$$hashKey}function v(b){var a=
8
+ b.$$hashKey;m(arguments,function(a){a!==b&&m(a,function(a,c){b[c]=a})});ob(b,a);return b}function G(b){return parseInt(b,10)}function ya(b,a){return v(new (v(function(){},{prototype:b})),a)}function C(){}function ma(b){return b}function I(b){return function(){return b}}function w(b){return typeof b=="undefined"}function y(b){return typeof b!="undefined"}function L(b){return b!=null&&typeof b=="object"}function B(b){return typeof b=="string"}function Qa(b){return typeof b=="number"}function na(b){return wa.apply(b)==
9
+ "[object Date]"}function E(b){return wa.apply(b)=="[object Array]"}function H(b){return typeof b=="function"}function oa(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function Q(b){return B(b)?b.replace(/^\s*/,"").replace(/\s*$/,""):b}function gc(b){return b&&(b.nodeName||b.bind&&b.find)}function Ra(b,a,c){var d=[];m(b,function(b,g,h){d.push(a.call(c,b,g,h))});return d}function za(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Sa(b,
10
+ a){var c=za(b,a);c>=0&&b.splice(c,1);return a}function U(b,a){if(oa(b)||b&&b.$evalAsync&&b.$watch)throw Error("Can't copy Window or Scope");if(a){if(b===a)throw Error("Can't copy equivalent objects or arrays");if(E(b))for(var c=a.length=0;c<b.length;c++)a.push(U(b[c]));else{c=a.$$hashKey;m(a,function(b,c){delete a[c]});for(var d in b)a[d]=U(b[d]);ob(a,c)}}else(a=b)&&(E(b)?a=U(b,[]):na(b)?a=new Date(b.getTime()):L(b)&&(a=U(b,{})));return a}function hc(b,a){var a=a||{},c;for(c in b)b.hasOwnProperty(c)&&
11
+ c.substr(0,2)!=="$$"&&(a[c]=b[c]);return a}function fa(b,a){if(b===a)return!0;if(b===null||a===null)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&c=="object")if(E(b)){if((c=b.length)==a.length){for(d=0;d<c;d++)if(!fa(b[d],a[d]))return!1;return!0}}else if(na(b))return na(a)&&b.getTime()==a.getTime();else{if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||oa(b)||oa(a))return!1;c={};for(d in b)if(!(d.charAt(0)==="$"||H(b[d]))){if(!fa(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c[d]&&
12
+ d.charAt(0)!=="$"&&a[d]!==q&&!H(a[d]))return!1;return!0}return!1}function Ta(b,a){var c=arguments.length>2?ha.call(arguments,2):[];return H(a)&&!(a instanceof RegExp)?c.length?function(){return arguments.length?a.apply(b,c.concat(ha.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}:a}function ic(b,a){var c=a;/^\$+/.test(b)?c=q:oa(a)?c="$WINDOW":a&&T===a?c="$DOCUMENT":a&&a.$evalAsync&&a.$watch&&(c="$SCOPE");return c}function da(b,a){return JSON.stringify(b,
13
+ ic,a?" ":null)}function pb(b){return B(b)?JSON.parse(b):b}function Ua(b){b&&b.length!==0?(b=z(""+b),b=!(b=="f"||b=="0"||b=="false"||b=="no"||b=="n"||b=="[]")):b=!1;return b}function pa(b){b=u(b).clone();try{b.html("")}catch(a){}var c=u("<div>").append(b).html();try{return b[0].nodeType===3?z(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+z(b)})}catch(d){return z(c)}}function Va(b){var a={},c,d;m((b||"").split("&"),function(b){b&&(c=b.split("="),d=decodeURIComponent(c[0]),
14
+ a[d]=y(c[1])?decodeURIComponent(c[1]):!0)});return a}function qb(b){var a=[];m(b,function(b,d){a.push(Wa(d,!0)+(b===!0?"":"="+Wa(b,!0)))});return a.length?a.join("&"):""}function Xa(b){return Wa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Wa(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,a?"%20":"+")}function jc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,h=["ng:app","ng-app","x-ng-app",
15
+ "data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;m(h,function(a){h[a]=!0;c(T.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(m(b.querySelectorAll("."+a),c),m(b.querySelectorAll("."+a+"\\:"),c),m(b.querySelectorAll("["+a+"]"),c))});m(d,function(a){if(!e){var b=f.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):m(a.attributes,function(b){if(!e&&h[b.name])e=a,g=b.value})}});e&&a(e,g?[g]:[])}function rb(b,a){var c=function(){b=u(b);a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",
16
+ b)}]);a.unshift("ng");var c=sb(a);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;if(P&&!d.test(P.name))return c();P.name=P.name.replace(d,"");Ya.resumeBootstrap=function(b){m(b,function(b){a.push(b)});c()}}function Za(b,a){a=a||"_";return b.replace(kc,function(b,d){return(d?a:"")+b.toLowerCase()})}function $a(b,a,c){if(!b)throw Error("Argument '"+(a||"?")+"' is "+(c||"required"));
17
+ return b}function qa(b,a,c){c&&E(b)&&(b=b[b.length-1]);$a(H(b),a,"not a function, got "+(b&&typeof b=="object"?b.constructor.name||"Object":typeof b));return b}function lc(b){function a(a,b,e){return a[b]||(a[b]=e())}return a(a(b,"angular",Object),"module",function(){var b={};return function(d,e,g){e&&b.hasOwnProperty(d)&&(b[d]=null);return a(b,d,function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return k}}if(!e)throw Error("No module: "+d);var b=[],c=[],j=a("$injector",
18
+ "invoke"),k={_invokeQueue:b,_runBlocks:c,requires:e,name:d,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:j,run:function(a){c.push(a);return this}};g&&j(g);return k})}})}function tb(b){return b.replace(mc,function(a,b,d,e){return e?d.toUpperCase():
19
+ d}).replace(nc,"Moz$1")}function ab(b,a){function c(){var e;for(var b=[this],c=a,h,f,i,j,k,l;b.length;){h=b.shift();f=0;for(i=h.length;f<i;f++){j=u(h[f]);c?j.triggerHandler("$destroy"):c=!c;k=0;for(e=(l=j.children()).length,j=e;k<j;k++)b.push(ca(l[k]))}}return d.apply(this,arguments)}var d=ca.fn[b],d=d.$original||d;c.$original=d;ca.fn[b]=c}function K(b){if(b instanceof K)return b;if(!(this instanceof K)){if(B(b)&&b.charAt(0)!="<")throw Error("selectors not implemented");return new K(b)}if(B(b)){var a=
20
+ T.createElement("div");a.innerHTML="<div>&#160;</div>"+b;a.removeChild(a.firstChild);bb(this,a.childNodes);this.remove()}else bb(this,b)}function cb(b){return b.cloneNode(!0)}function ra(b){ub(b);for(var a=0,b=b.childNodes||[];a<b.length;a++)ra(b[a])}function vb(b,a,c){var d=ba(b,"events");ba(b,"handle")&&(w(a)?m(d,function(a,c){db(b,c,a);delete d[c]}):w(c)?(db(b,a,d[a]),delete d[a]):Sa(d[a],c))}function ub(b){var a=b[Aa],c=Ba[a];c&&(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),vb(b)),delete Ba[a],
21
+ b[Aa]=q)}function ba(b,a,c){var d=b[Aa],d=Ba[d||-1];if(y(c))d||(b[Aa]=d=++oc,d=Ba[d]={}),d[a]=c;else return d&&d[a]}function wb(b,a,c){var d=ba(b,"data"),e=y(c),g=!e&&y(a),h=g&&!L(a);!d&&!h&&ba(b,"data",d={});if(e)d[a]=c;else if(g)if(h)return d&&d[a];else v(d,a);else return d}function Ca(b,a){return(" "+b.className+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" ")>-1}function xb(b,a){a&&m(a.split(" "),function(a){b.className=Q((" "+b.className+" ").replace(/[\n\t]/g," ").replace(" "+Q(a)+" "," "))})}
22
+ function yb(b,a){a&&m(a.split(" "),function(a){if(!Ca(b,a))b.className=Q(b.className+" "+Q(a))})}function bb(b,a){if(a)for(var a=!a.nodeName&&y(a.length)&&!oa(a)?a:[a],c=0;c<a.length;c++)b.push(a[c])}function zb(b,a){return Da(b,"$"+(a||"ngController")+"Controller")}function Da(b,a,c){b=u(b);for(b[0].nodeType==9&&(b=b.find("html"));b.length;){if(c=b.data(a))return c;b=b.parent()}}function Ab(b,a){var c=Ea[a.toLowerCase()];return c&&Bb[b.nodeName]&&c}function pc(b,a){var c=function(c,e){if(!c.preventDefault)c.preventDefault=
23
+ function(){c.returnValue=!1};if(!c.stopPropagation)c.stopPropagation=function(){c.cancelBubble=!0};if(!c.target)c.target=c.srcElement||T;if(w(c.defaultPrevented)){var g=c.preventDefault;c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};c.defaultPrevented=!1}c.isDefaultPrevented=function(){return c.defaultPrevented};m(a[e||c.type],function(a){a.call(b,c)});Z<=8?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};
24
+ c.elem=b;return c}function ga(b){var a=typeof b,c;if(a=="object"&&b!==null)if(typeof(c=b.$$hashKey)=="function")c=b.$$hashKey();else{if(c===q)c=b.$$hashKey=xa()}else c=b;return a+":"+c}function Fa(b){m(b,this.put,this)}function eb(){}function Cb(b){var a,c;if(typeof b=="function"){if(!(a=b.$inject))a=[],c=b.toString().replace(qc,""),c=c.match(rc),m(c[1].split(sc),function(b){b.replace(tc,function(b,c,d){a.push(d)})}),b.$inject=a}else E(b)?(c=b.length-1,qa(b[c],"fn"),a=b.slice(0,c)):qa(b,"fn",!0);
25
+ return a}function sb(b){function a(a){return function(b,c){if(L(b))m(b,nb(a));else return a(b,c)}}function c(a,b){if(H(b)||E(b))b=l.instantiate(b);if(!b.$get)throw Error("Provider "+a+" must define $get factory method.");return k[a+f]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[];m(a,function(a){if(!j.get(a))if(j.put(a,!0),B(a)){var c=sa(a);b=b.concat(e(c.requires)).concat(c._runBlocks);try{for(var d=c._invokeQueue,c=0,f=d.length;c<f;c++){var g=d[c],h=g[0]=="$injector"?l:l.get(g[0]);
26
+ h[g[1]].apply(h,g[2])}}catch(p){throw p.message&&(p.message+=" from "+a),p;}}else if(H(a))try{b.push(l.invoke(a))}catch(i){throw i.message&&(i.message+=" from "+a),i;}else if(E(a))try{b.push(l.invoke(a))}catch(o){throw o.message&&(o.message+=" from "+String(a[a.length-1])),o;}else qa(a,"module")});return b}function g(a,b){function c(d){if(typeof d!=="string")throw Error("Service name expected");if(a.hasOwnProperty(d)){if(a[d]===h)throw Error("Circular dependency: "+i.join(" <- "));return a[d]}else try{return i.unshift(d),
27
+ a[d]=h,a[d]=b(d)}finally{i.shift()}}function d(a,b,e){var f=[],j=Cb(a),g,h,i;h=0;for(g=j.length;h<g;h++)i=j[h],f.push(e&&e.hasOwnProperty(i)?e[i]:c(i));a.$inject||(a=a[g]);switch(b?-1:f.length){case 0:return a();case 1:return a(f[0]);case 2:return a(f[0],f[1]);case 3:return a(f[0],f[1],f[2]);case 4:return a(f[0],f[1],f[2],f[3]);case 5:return a(f[0],f[1],f[2],f[3],f[4]);case 6:return a(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6]);case 8:return a(f[0],f[1],f[2],
28
+ f[3],f[4],f[5],f[6],f[7]);case 9:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8]);case 10:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9]);default:return a.apply(b,f)}}return{invoke:d,instantiate:function(a,b){var c=function(){},e;c.prototype=(E(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return L(e)?e:c},get:c,annotate:Cb}}var h={},f="Provider",i=[],j=new Fa,k={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),
29
+ value:a(function(a,b){return d(a,I(b))}),constant:a(function(a,b){k[a]=b;n[a]=b}),decorator:function(a,b){var c=l.get(a+f),d=c.$get;c.$get=function(){var a=o.invoke(d,c);return o.invoke(b,null,{$delegate:a})}}}},l=g(k,function(){throw Error("Unknown provider: "+i.join(" <- "));}),n={},o=n.$injector=g(n,function(a){a=l.get(a+f);return o.invoke(a.$get,a)});m(e(b),function(a){o.invoke(a||C)});return o}function uc(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location",
30
+ "$rootScope",function(a,c,d){function e(a){var b=null;m(a,function(a){!b&&z(a.nodeName)==="a"&&(b=a)});return b}function g(){var b=c.hash(),d;b?(d=h.getElementById(b))?d.scrollIntoView():(d=e(h.getElementsByName(b)))?d.scrollIntoView():b==="top"&&a.scrollTo(0,0):a.scrollTo(0,0)}var h=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(g)});return g}]}function vc(b,a,c,d){function e(a){try{a.apply(null,ha.call(arguments,1))}finally{if(p--,p===0)for(;s.length;)try{s.pop()()}catch(b){c.error(b)}}}
31
+ function g(a,b){(function V(){m(t,function(a){a()});x=b(V,a)})()}function h(){M!=f.url()&&(M=f.url(),m(N,function(a){a(f.url())}))}var f=this,i=a[0],j=b.location,k=b.history,l=b.setTimeout,n=b.clearTimeout,o={};f.isMock=!1;var p=0,s=[];f.$$completeOutstandingRequest=e;f.$$incOutstandingRequestCount=function(){p++};f.notifyWhenNoOutstandingRequests=function(a){m(t,function(a){a()});p===0?a():s.push(a)};var t=[],x;f.addPollFn=function(a){w(x)&&g(100,l);t.push(a);return a};var M=j.href,A=a.find("base");
32
+ f.url=function(a,b){if(a){if(M!=a)return M=a,d.history?b?k.replaceState(null,"",a):(k.pushState(null,"",a),A.attr("href",A.attr("href"))):b?j.replace(a):j.href=a,f}else return j.href.replace(/%27/g,"'")};var N=[],J=!1;f.onUrlChange=function(a){J||(d.history&&u(b).bind("popstate",h),d.hashchange?u(b).bind("hashchange",h):f.addPollFn(h),J=!0);N.push(a);return a};f.baseHref=function(){var a=A.attr("href");return a?a.replace(/^https?\:\/\/[^\/]*/,""):""};var r={},$="",R=f.baseHref();f.cookies=function(a,
33
+ b){var d,e,f,j;if(a)if(b===q)i.cookie=escape(a)+"=;path="+R+";expires=Thu, 01 Jan 1970 00:00:00 GMT";else{if(B(b))d=(i.cookie=escape(a)+"="+escape(b)+";path="+R).length+1,d>4096&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!")}else{if(i.cookie!==$){$=i.cookie;d=$.split("; ");r={};for(f=0;f<d.length;f++)e=d[f],j=e.indexOf("="),j>0&&(a=unescape(e.substring(0,j)),r[a]===q&&(r[a]=unescape(e.substring(j+1))))}return r}};f.defer=function(a,b){var c;
34
+ p++;c=l(function(){delete o[c];e(a)},b||0);o[c]=!0;return c};f.defer.cancel=function(a){return o[a]?(delete o[a],n(a),e(C),!0):!1}}function wc(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new vc(b,d,a,c)}]}function xc(){this.$get=function(){function b(b,d){function e(a){if(a!=l){if(n){if(n==a)n=a.n}else n=a;g(a.n,a.p);g(a,l);l=a;l.n=null}}function g(a,b){if(a!=b){if(a)a.p=b;if(b)b.n=a}}if(b in a)throw Error("cacheId "+b+" taken");var h=0,f=v({},d,{id:b}),i={},j=d&&
35
+ d.capacity||Number.MAX_VALUE,k={},l=null,n=null;return a[b]={put:function(a,b){var c=k[a]||(k[a]={key:a});e(c);w(b)||(a in i||h++,i[a]=b,h>j&&this.remove(n.key))},get:function(a){var b=k[a];if(b)return e(b),i[a]},remove:function(a){var b=k[a];if(b){if(b==l)l=b.p;if(b==n)n=b.n;g(b.n,b.p);delete k[a];delete i[a];h--}},removeAll:function(){i={};h=0;k={};l=n=null},destroy:function(){k=f=i=null;delete a[b]},info:function(){return v({},f,{size:h})}}}var a={};b.info=function(){var b={};m(a,function(a,e){b[e]=
36
+ a.info()});return b};b.get=function(b){return a[b]};return b}}function yc(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function Db(b){var a={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g="Template must have exactly one root element. was: ",h=/^\s*(https?|ftp|mailto|file):/;this.directive=function i(d,e){B(d)?($a(e,"directive"),a.hasOwnProperty(d)||(a[d]=[],b.factory(d+c,["$injector","$exceptionHandler",function(b,c){var e=[];m(a[d],
37
+ function(a){try{var g=b.invoke(a);if(H(g))g={compile:I(g)};else if(!g.compile&&g.link)g.compile=I(g.link);g.priority=g.priority||0;g.name=g.name||d;g.require=g.require||g.controller&&g.name;g.restrict=g.restrict||"A";e.push(g)}catch(h){c(h)}});return e}])),a[d].push(e)):m(d,nb(i));return this};this.urlSanitizationWhitelist=function(a){return y(a)?(h=a,this):h};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function(b,
38
+ j,k,l,n,o,p,s,t){function x(a,b,c){a instanceof u||(a=u(a));m(a,function(b,c){b.nodeType==3&&b.nodeValue.match(/\S+/)&&(a[c]=u(b).wrap("<span></span>").parent()[0])});var d=A(a,b,a,c);return function(b,c){$a(b,"scope");for(var e=c?ua.clone.call(a):a,j=0,g=e.length;j<g;j++){var h=e[j];(h.nodeType==1||h.nodeType==9)&&e.eq(j).data("$scope",b)}M(e,"ng-scope");c&&c(e,b);d&&d(b,e,e);return e}}function M(a,b){try{a.addClass(b)}catch(c){}}function A(a,b,c,d){function e(a,c,d,g){var h,i,k,p,o,l,n,t=[];o=0;
39
+ for(l=c.length;o<l;o++)t.push(c[o]);n=o=0;for(l=j.length;o<l;n++)i=t[n],c=j[o++],h=j[o++],c?(c.scope?(k=a.$new(L(c.scope)),u(i).data("$scope",k)):k=a,(p=c.transclude)||!g&&b?c(h,k,i,d,function(b){return function(c){var d=a.$new();d.$$transcluded=!0;return b(d,c).bind("$destroy",Ta(d,d.$destroy))}}(p||b)):c(h,k,i,q,g)):h&&h(a,i.childNodes,q,g)}for(var j=[],g,h,i,k=0;k<a.length;k++)h=new ia,g=N(a[k],[],h,d),h=(g=g.length?J(g,a[k],h,b,c):null)&&g.terminal||!a[k].childNodes||!a[k].childNodes.length?null:
40
+ A(a[k].childNodes,g?g.transclude:b),j.push(g),j.push(h),i=i||g||h;return i?e:null}function N(a,b,c,g){var j=c.$attr,h;switch(a.nodeType){case 1:r(b,ea(fb(a).toLowerCase()),"E",g);var i,k,o;h=a.attributes;for(var p=0,l=h&&h.length;p<l;p++)if(i=h[p],i.specified)k=i.name,o=ea(k.toLowerCase()),j[o]=k,c[o]=i=Q(Z&&k=="href"?decodeURIComponent(a.getAttribute(k,2)):i.value),Ab(a,o)&&(c[o]=!0),V(a,b,i,o),r(b,o,"A",g);a=a.className;if(B(a)&&a!=="")for(;h=e.exec(a);)o=ea(h[2]),r(b,o,"C",g)&&(c[o]=Q(h[3])),a=
41
+ a.substr(h.index+h[0].length);break;case 3:y(b,a.nodeValue);break;case 8:try{if(h=d.exec(a.nodeValue))o=ea(h[1]),r(b,o,"M",g)&&(c[o]=Q(h[2]))}catch(n){}}b.sort(F);return b}function J(a,b,c,d,e){function j(a,b){if(a)a.require=r.require,n.push(a);if(b)b.require=r.require,t.push(b)}function h(a,b){var c,d="data",e=!1;if(B(a)){for(;(c=a.charAt(0))=="^"||c=="?";)a=a.substr(1),c=="^"&&(d="inheritedData"),e=e||c=="?";c=b[d]("$"+a+"Controller");if(!c&&!e)throw Error("No controller: "+a);}else E(a)&&(c=[],
42
+ m(a,function(a){c.push(h(a,b))}));return c}function i(a,d,e,g,j){var l,s,r,D,M;l=b===e?c:hc(c,new ia(u(e),c.$attr));s=l.$$element;if(J){var zc=/^\s*([@=&])\s*(\w*)\s*$/,x=d.$parent||d;m(J.scope,function(a,b){var c=a.match(zc)||[],e=c[2]||b,c=c[1],g,j,h;d.$$isolateBindings[b]=c+e;switch(c){case "@":l.$observe(e,function(a){d[b]=a});l.$$observers[e].$$scope=x;break;case "=":j=o(l[e]);h=j.assign||function(){g=d[b]=j(x);throw Error(Eb+l[e]+" (directive: "+J.name+")");};g=d[b]=j(x);d.$watch(function(){var a=
43
+ j(x);a!==d[b]&&(a!==g?g=d[b]=a:h(x,a=g=d[b]));return a});break;case "&":j=o(l[e]);d[b]=function(a){return j(x,a)};break;default:throw Error("Invalid isolate scope definition for directive "+J.name+": "+a);}})}y&&m(y,function(a){var b={$scope:d,$element:s,$attrs:l,$transclude:j};M=a.controller;M=="@"&&(M=l[a.name]);s.data("$"+a.name+"Controller",p(M,b))});g=0;for(r=n.length;g<r;g++)try{D=n[g],D(d,s,l,D.require&&h(D.require,s))}catch(A){k(A,pa(s))}a&&a(d,e.childNodes,q,j);g=0;for(r=t.length;g<r;g++)try{D=
44
+ t[g],D(d,s,l,D.require&&h(D.require,s))}catch(Ac){k(Ac,pa(s))}}for(var l=-Number.MAX_VALUE,n=[],t=[],s=null,J=null,A=null,D=c.$$element=u(b),r,F,W,ja,V=d,y,w,Y,v=0,z=a.length;v<z;v++){r=a[v];W=q;if(l>r.priority)break;if(Y=r.scope)ta("isolated scope",J,r,D),L(Y)&&(M(D,"ng-isolate-scope"),J=r),M(D,"ng-scope"),s=s||r;F=r.name;if(Y=r.controller)y=y||{},ta("'"+F+"' controller",y[F],r,D),y[F]=r;if(Y=r.transclude)ta("transclusion",ja,r,D),ja=r,l=r.priority,Y=="element"?(W=u(b),D=c.$$element=u(T.createComment(" "+
45
+ F+": "+c[F]+" ")),b=D[0],C(e,u(W[0]),b),V=x(W,d,l)):(W=u(cb(b)).contents(),D.html(""),V=x(W,d));if(Y=r.template)if(ta("template",A,r,D),A=r,Y=Fb(Y),r.replace){W=u("<div>"+Q(Y)+"</div>").contents();b=W[0];if(W.length!=1||b.nodeType!==1)throw Error(g+Y);C(e,D,b);F={$attr:{}};a=a.concat(N(b,a.splice(v+1,a.length-(v+1)),F));$(c,F);z=a.length}else D.html(Y);if(r.templateUrl)ta("template",A,r,D),A=r,i=R(a.splice(v,a.length-v),i,D,c,e,r.replace,V),z=a.length;else if(r.compile)try{w=r.compile(D,c,V),H(w)?
46
+ j(null,w):w&&j(w.pre,w.post)}catch(G){k(G,pa(D))}if(r.terminal)i.terminal=!0,l=Math.max(l,r.priority)}i.scope=s&&s.scope;i.transclude=ja&&V;return i}function r(d,e,g,j){var h=!1;if(a.hasOwnProperty(e))for(var o,e=b.get(e+c),l=0,p=e.length;l<p;l++)try{if(o=e[l],(j===q||j>o.priority)&&o.restrict.indexOf(g)!=-1)d.push(o),h=!0}catch(n){k(n)}return h}function $(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;m(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});m(b,
47
+ function(b,g){g=="class"?(M(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):g=="style"?e.attr("style",e.attr("style")+";"+b):g.charAt(0)!="$"&&!a.hasOwnProperty(g)&&(a[g]=b,d[g]=c[g])})}function R(a,b,c,d,e,j,h){var i=[],k,o,p=c[0],t=a.shift(),s=v({},t,{controller:null,templateUrl:null,transclude:null,scope:null});c.html("");l.get(t.templateUrl,{cache:n}).success(function(l){var n,t,l=Fb(l);if(j){t=u("<div>"+Q(l)+"</div>").contents();n=t[0];if(t.length!=1||n.nodeType!==1)throw Error(g+l);l={$attr:{}};
48
+ C(e,c,n);N(n,a,l);$(d,l)}else n=p,c.html(l);a.unshift(s);k=J(a,n,d,h);for(o=A(c[0].childNodes,h);i.length;){var r=i.pop(),l=i.pop();t=i.pop();var ia=i.pop(),D=n;t!==p&&(D=cb(n),C(l,u(t),D));k(function(){b(o,ia,D,e,r)},ia,D,e,r)}i=null}).error(function(a,b,c,d){throw Error("Failed to load template: "+d.url);});return function(a,c,d,e,g){i?(i.push(c),i.push(d),i.push(e),i.push(g)):k(function(){b(o,c,d,e,g)},c,d,e,g)}}function F(a,b){return b.priority-a.priority}function ta(a,b,c,d){if(b)throw Error("Multiple directives ["+
49
+ b.name+", "+c.name+"] asking for "+a+" on: "+pa(d));}function y(a,b){var c=j(b,!0);c&&a.push({priority:0,compile:I(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);M(d.data("$binding",e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue=a})})})}function V(a,b,c,d){var e=j(c,!0);e&&b.push({priority:100,compile:I(function(a,b,c){b=c.$$observers||(c.$$observers={});d==="class"&&(e=j(c[d],!0));c[d]=q;(b[d]||(b[d]=[])).$$inter=!0;(c.$$observers&&c.$$observers[d].$$scope||a).$watch(e,
50
+ function(a){c.$set(d,a)})})})}function C(a,b,c){var d=b[0],e=d.parentNode,g,j;if(a){g=0;for(j=a.length;g<j;g++)if(a[g]==d){a[g]=c;break}}e&&e.replaceChild(c,d);c[u.expando]=d[u.expando];b[0]=c}var ia=function(a,b){this.$$element=a;this.$attr=b||{}};ia.prototype={$normalize:ea,$set:function(a,b,c,d){var e=Ab(this.$$element[0],a),g=this.$$observers;e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=Za(a,"-"));if(fb(this.$$element[0])==="A"&&a==="href")D.setAttribute("href",
51
+ b),e=D.href,e.match(h)||(this[a]=b="unsafe:"+e);c!==!1&&(b===null||b===q?this.$$element.removeAttr(d):this.$$element.attr(d,b));g&&m(g[a],function(a){try{a(b)}catch(c){k(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);s.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var D=t[0].createElement("a"),W=j.startSymbol(),ja=j.endSymbol(),Fb=W=="{{"||ja=="}}"?ma:function(a){return a.replace(/\{\{/g,W).replace(/}}/g,ja)};return x}]}function ea(b){return tb(b.replace(Bc,
52
+ ""))}function Cc(){var b={};this.register=function(a,c){L(a)?v(b,a):b[a]=c};this.$get=["$injector","$window",function(a,c){return function(d,e){if(B(d)){var g=d,d=b.hasOwnProperty(g)?b[g]:gb(e.$scope,g,!0)||gb(c,g,!0);qa(d,g,!0)}return a.instantiate(d,e)}}]}function Dc(){this.$get=["$window",function(b){return u(b.document)}]}function Ec(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function Fc(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):
53
+ b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse",function(c){function d(d,f){for(var i,j,k=0,l=[],n=d.length,o=!1,p=[];k<n;)(i=d.indexOf(b,k))!=-1&&(j=d.indexOf(a,i+e))!=-1?(k!=i&&l.push(d.substring(k,i)),l.push(k=c(o=d.substring(i+e,j))),k.exp=o,k=j+g,o=!0):(k!=n&&l.push(d.substring(k)),k=n);if(!(n=l.length))l.push(""),n=1;if(!f||o)return p.length=n,k=function(a){for(var b=0,c=n,d;b<c;b++){if(typeof(d=l[b])=="function")d=d(a),d==null||d==q?d="":typeof d!="string"&&(d=da(d));
54
+ p[b]=d}return p.join("")},k.exp=d,k.parts=l,k}var e=b.length,g=a.length;d.startSymbol=function(){return b};d.endSymbol=function(){return a};return d}]}function Gb(b){for(var b=b.split("/"),a=b.length;a--;)b[a]=Xa(b[a]);return b.join("/")}function va(b,a){var c=Hb.exec(b),c={protocol:c[1],host:c[3],port:G(c[5])||Ib[c[1]]||null,path:c[6]||"/",search:c[8],hash:c[10]};if(a)a.$$protocol=c.protocol,a.$$host=c.host,a.$$port=c.port;return c}function ka(b,a,c){return b+"://"+a+(c==Ib[b]?"":":"+c)}function Gc(b,
55
+ a,c){var d=va(b);return decodeURIComponent(d.path)!=a||w(d.hash)||d.hash.indexOf(c)!==0?b:ka(d.protocol,d.host,d.port)+a.substr(0,a.lastIndexOf("/"))+d.hash.substr(c.length)}function Hc(b,a,c){var d=va(b);if(decodeURIComponent(d.path)==a&&!w(d.hash)&&d.hash.indexOf(c)===0)return b;else{var e=d.search&&"?"+d.search||"",g=d.hash&&"#"+d.hash||"",h=a.substr(0,a.lastIndexOf("/")),f=d.path.substr(h.length);if(d.path.indexOf(h)!==0)throw Error('Invalid url "'+b+'", missing path prefix "'+h+'" !');return ka(d.protocol,
56
+ d.host,d.port)+a+"#"+c+f+e+g}}function hb(b,a,c){a=a||"";this.$$parse=function(b){var c=va(b,this);if(c.path.indexOf(a)!==0)throw Error('Invalid url "'+b+'", missing path prefix "'+a+'" !');this.$$path=decodeURIComponent(c.path.substr(a.length));this.$$search=Va(c.search);this.$$hash=c.hash&&decodeURIComponent(c.hash)||"";this.$$compose()};this.$$compose=function(){var b=qb(this.$$search),c=this.$$hash?"#"+Xa(this.$$hash):"";this.$$url=Gb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=ka(this.$$protocol,
57
+ this.$$host,this.$$port)+a+this.$$url};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Ga(b,a,c){var d;this.$$parse=function(b){var c=va(b,this);if(c.hash&&c.hash.indexOf(a)!==0)throw Error('Invalid url "'+b+'", missing hash prefix "'+a+'" !');d=c.path+(c.search?"?"+c.search:"");c=Ic.exec((c.hash||"").substr(a.length));this.$$path=c[1]?(c[1].charAt(0)=="/"?"":"/")+decodeURIComponent(c[1]):"";this.$$search=Va(c[3]);this.$$hash=c[5]&&decodeURIComponent(c[5])||
58
+ "";this.$$compose()};this.$$compose=function(){var b=qb(this.$$search),c=this.$$hash?"#"+Xa(this.$$hash):"";this.$$url=Gb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=ka(this.$$protocol,this.$$host,this.$$port)+d+(this.$$url?"#"+a+this.$$url:"")};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Jb(b,a,c,d){Ga.apply(this,arguments);this.$$rewriteAppUrl=function(b){if(b.indexOf(c)==0)return c+d+"#"+a+b.substr(c.length)}}function Ha(b){return function(){return this[b]}}
59
+ function Kb(b,a){return function(c){if(w(c))return this[b];this[b]=a(c);this.$$compose();return this}}function Jc(){var b="",a=!1;this.hashPrefix=function(a){return y(a)?(b=a,this):b};this.html5Mode=function(b){return y(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function h(a){c.$broadcast("$locationChangeSuccess",f.absUrl(),a)}var f,i,j,k=d.url(),l=va(k);a?(i=d.baseHref()||"/",j=i.substr(0,i.lastIndexOf("/")),l=ka(l.protocol,l.host,l.port)+j+"/",
60
+ f=e.history?new hb(Gc(k,i,b),j,l):new Jb(Hc(k,i,b),b,l,i.substr(j.length+1))):(l=ka(l.protocol,l.host,l.port)+(l.path||"")+(l.search?"?"+l.search:"")+"#"+b+"/",f=new Ga(k,b,l));g.bind("click",function(a){if(!a.ctrlKey&&!(a.metaKey||a.which==2)){for(var b=u(a.target);z(b[0].nodeName)!=="a";)if(b[0]===g[0]||!(b=b.parent())[0])return;var d=b.prop("href"),e=f.$$rewriteAppUrl(d);d&&!b.attr("target")&&e&&(f.$$parse(e),c.$apply(),a.preventDefault(),P.angular["ff-684208-preventDefault"]=!0)}});f.absUrl()!=
61
+ k&&d.url(f.absUrl(),!0);d.onUrlChange(function(a){f.absUrl()!=a&&(c.$broadcast("$locationChangeStart",a,f.absUrl()).defaultPrevented?d.url(f.absUrl()):(c.$evalAsync(function(){var b=f.absUrl();f.$$parse(a);h(b)}),c.$$phase||c.$digest()))});var n=0;c.$watch(function(){var a=d.url(),b=f.$$replace;if(!n||a!=f.absUrl())n++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",f.absUrl(),a).defaultPrevented?f.$$parse(a):(d.url(f.absUrl(),b),h(a))});f.$$replace=!1;return n});return f}]}function Kc(){this.$get=
62
+ ["$window",function(b){function a(a){a instanceof Error&&(a.stack?a=a.message&&a.stack.indexOf(a.message)===-1?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function c(c){var e=b.console||{},g=e[c]||e.log||C;return g.apply?function(){var b=[];m(arguments,function(c){b.push(a(c))});return g.apply(e,b)}:function(a,b){g(a,b)}}return{log:c("log"),warn:c("warn"),info:c("info"),error:c("error")}}]}function Lc(b,a){function c(a){return a.indexOf(t)!=
63
+ -1}function d(){return p+1<b.length?b.charAt(p+1):!1}function e(a){return"0"<=a&&a<="9"}function g(a){return a==" "||a=="\r"||a=="\t"||a=="\n"||a=="\u000b"||a=="\u00a0"}function h(a){return"a"<=a&&a<="z"||"A"<=a&&a<="Z"||"_"==a||a=="$"}function f(a){return a=="-"||a=="+"||e(a)}function i(a,c,d){d=d||p;throw Error("Lexer Error: "+a+" at column"+(y(c)?"s "+c+"-"+p+" ["+b.substring(c,d)+"]":" "+d)+" in expression ["+b+"].");}function j(){for(var a="",c=p;p<b.length;){var g=z(b.charAt(p));if(g=="."||
64
+ e(g))a+=g;else{var j=d();if(g=="e"&&f(j))a+=g;else if(f(g)&&j&&e(j)&&a.charAt(a.length-1)=="e")a+=g;else if(f(g)&&(!j||!e(j))&&a.charAt(a.length-1)=="e")i("Invalid exponent");else break}p++}a*=1;n.push({index:c,text:a,json:!0,fn:function(){return a}})}function k(){for(var c="",d=p,f,j,i,k;p<b.length;){k=b.charAt(p);if(k=="."||h(k)||e(k))k=="."&&(f=p),c+=k;else break;p++}if(f)for(j=p;j<b.length;){k=b.charAt(j);if(k=="("){i=c.substr(f-d+1);c=c.substr(0,f-d);p=j;break}if(g(k))j++;else break}d={index:d,
65
+ text:c};if(Ia.hasOwnProperty(c))d.fn=d.json=Ia[c];else{var l=Lb(c,a);d.fn=v(function(a,b){return l(a,b)},{assign:function(a,b){return Mb(a,c,b)}})}n.push(d);i&&(n.push({index:f,text:".",json:!1}),n.push({index:f+1,text:i,json:!1}))}function l(a){var c=p;p++;for(var d="",e=a,f=!1;p<b.length;){var g=b.charAt(p);e+=g;if(f)g=="u"?(g=b.substring(p+1,p+5),g.match(/[\da-f]{4}/i)||i("Invalid unicode escape [\\u"+g+"]"),p+=4,d+=String.fromCharCode(parseInt(g,16))):(f=Mc[g],d+=f?f:g),f=!1;else if(g=="\\")f=
66
+ !0;else if(g==a){p++;n.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});return}else d+=g;p++}i("Unterminated quote",c)}for(var n=[],o,p=0,s=[],t,x=":";p<b.length;){t=b.charAt(p);if(c("\"'"))l(t);else if(e(t)||c(".")&&e(d()))j();else if(h(t)){if(k(),"{,".indexOf(x)!=-1&&s[0]=="{"&&(o=n[n.length-1]))o.json=o.text.indexOf(".")==-1}else if(c("(){}[].,;:"))n.push({index:p,text:t,json:":[,".indexOf(x)!=-1&&c("{[")||c("}]:,")}),c("{[")&&s.unshift(t),c("}]")&&s.shift(),p++;else if(g(t)){p++;
67
+ continue}else{var m=t+d(),A=Ia[t],N=Ia[m];N?(n.push({index:p,text:m,fn:N}),p+=2):A?(n.push({index:p,text:t,fn:A,json:"[,:".indexOf(x)!=-1&&c("+-")}),p+=1):i("Unexpected next character ",p,p+1)}x=t}return n}function Nc(b,a,c,d){function e(a,c){throw Error("Syntax Error: Token '"+c.text+"' "+a+" at column "+(c.index+1)+" of the expression ["+b+"] starting at ["+b.substring(c.index)+"].");}function g(){if(R.length===0)throw Error("Unexpected end of expression: "+b);return R[0]}function h(a,b,c,d){if(R.length>
68
+ 0){var e=R[0],f=e.text;if(f==a||f==b||f==c||f==d||!a&&!b&&!c&&!d)return e}return!1}function f(b,c,d,f){return(b=h(b,c,d,f))?(a&&!b.json&&e("is not valid json",b),R.shift(),b):!1}function i(a){f(a)||e("is unexpected, expecting ["+a+"]",h())}function j(a,b){return function(c,d){return a(c,d,b)}}function k(a,b,c){return function(d,e){return b(d,e,a,c)}}function l(){for(var a=[];;)if(R.length>0&&!h("}",")",";","]")&&a.push(w()),!f(";"))return a.length==1?a[0]:function(b,c){for(var d,e=0;e<a.length;e++){var f=
69
+ a[e];f&&(d=f(b,c))}return d}}function n(){for(var a=f(),b=c(a.text),d=[];;)if(a=f(":"))d.push(F());else{var e=function(a,c,e){for(var e=[e],f=0;f<d.length;f++)e.push(d[f](a,c));return b.apply(a,e)};return function(){return e}}}function o(){for(var a=p(),b;;)if(b=f("||"))a=k(a,b.fn,p());else return a}function p(){var a=s(),b;if(b=f("&&"))a=k(a,b.fn,p());return a}function s(){var a=t(),b;if(b=f("==","!="))a=k(a,b.fn,s());return a}function t(){var a;a=x();for(var b;b=f("+","-");)a=k(a,b.fn,x());if(b=
70
+ f("<",">","<=",">="))a=k(a,b.fn,t());return a}function x(){for(var a=m(),b;b=f("*","/","%");)a=k(a,b.fn,m());return a}function m(){var a;return f("+")?A():(a=f("-"))?k(r,a.fn,m()):(a=f("!"))?j(a.fn,m()):A()}function A(){var a;if(f("("))a=w(),i(")");else if(f("["))a=N();else if(f("{"))a=J();else{var b=f();(a=b.fn)||e("not a primary expression",b)}for(var c;b=f("(","[",".");)b.text==="("?(a=y(a,c),c=null):b.text==="["?(c=a,a=V(a)):b.text==="."?(c=a,a=u(a)):e("IMPOSSIBLE");return a}function N(){var a=
71
+ [];if(g().text!="]"){do a.push(F());while(f(","))}i("]");return function(b,c){for(var d=[],e=0;e<a.length;e++)d.push(a[e](b,c));return d}}function J(){var a=[];if(g().text!="}"){do{var b=f(),b=b.string||b.text;i(":");var c=F();a.push({key:b,value:c})}while(f(","))}i("}");return function(b,c){for(var d={},e=0;e<a.length;e++){var f=a[e];d[f.key]=f.value(b,c)}return d}}var r=I(0),$,R=Lc(b,d),F=function(){var a=o(),c,d;return(d=f("="))?(a.assign||e("implies assignment but ["+b.substring(0,d.index)+"] can not be assigned to",
72
+ d),c=o(),function(b,d){return a.assign(b,c(b,d),d)}):a},y=function(a,b){var c=[];if(g().text!=")"){do c.push(F());while(f(","))}i(")");return function(d,e){for(var f=[],g=b?b(d,e):d,j=0;j<c.length;j++)f.push(c[j](d,e));j=a(d,e,g)||C;return j.apply?j.apply(g,f):j(f[0],f[1],f[2],f[3],f[4])}},u=function(a){var b=f().text,c=Lb(b,d);return v(function(b,d,e){return c(e||a(b,d),d)},{assign:function(c,d,e){return Mb(a(c,e),b,d)}})},V=function(a){var b=F();i("]");return v(function(c,d){var e=a(c,d),f=b(c,
73
+ d),g;if(!e)return q;if((e=e[f])&&e.then){g=e;if(!("$$v"in e))g.$$v=q,g.then(function(a){g.$$v=a});e=e.$$v}return e},{assign:function(c,d,e){return a(c,e)[b(c,e)]=d}})},w=function(){for(var a=F(),b;;)if(b=f("|"))a=k(a,b.fn,n());else return a};a?(F=o,y=u=V=w=function(){e("is not valid json",{text:b,index:0})},$=A()):$=l();R.length!==0&&e("is an unexpected token",R[0]);return $}function Mb(b,a,c){for(var a=a.split("."),d=0;a.length>1;d++){var e=a.shift(),g=b[e];g||(g={},b[e]=g);b=g}return b[a.shift()]=
74
+ c}function gb(b,a,c){if(!a)return b;for(var a=a.split("."),d,e=b,g=a.length,h=0;h<g;h++)d=a[h],b&&(b=(e=b)[d]);return!c&&H(b)?Ta(e,b):b}function Nb(b,a,c,d,e){return function(g,h){var f=h&&h.hasOwnProperty(b)?h:g,i;if(f===null||f===q)return f;if((f=f[b])&&f.then){if(!("$$v"in f))i=f,i.$$v=q,i.then(function(a){i.$$v=a});f=f.$$v}if(!a||f===null||f===q)return f;if((f=f[a])&&f.then){if(!("$$v"in f))i=f,i.$$v=q,i.then(function(a){i.$$v=a});f=f.$$v}if(!c||f===null||f===q)return f;if((f=f[c])&&f.then){if(!("$$v"in
75
+ f))i=f,i.$$v=q,i.then(function(a){i.$$v=a});f=f.$$v}if(!d||f===null||f===q)return f;if((f=f[d])&&f.then){if(!("$$v"in f))i=f,i.$$v=q,i.then(function(a){i.$$v=a});f=f.$$v}if(!e||f===null||f===q)return f;if((f=f[e])&&f.then){if(!("$$v"in f))i=f,i.$$v=q,i.then(function(a){i.$$v=a});f=f.$$v}return f}}function Lb(b,a){if(ib.hasOwnProperty(b))return ib[b];var c=b.split("."),d=c.length,e;if(a)e=d<6?Nb(c[0],c[1],c[2],c[3],c[4]):function(a,b){var e=0,g;do g=Nb(c[e++],c[e++],c[e++],c[e++],c[e++])(a,b),b=q,
76
+ a=g;while(e<d);return g};else{var g="var l, fn, p;\n";m(c,function(a,b){g+="if(s === null || s === undefined) return s;\nl=s;\ns="+(b?"s":'((k&&k.hasOwnProperty("'+a+'"))?k:s)')+'["'+a+'"];\nif (s && s.then) {\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n'});g+="return s;";e=Function("s","k",g);e.toString=function(){return g}}return ib[b]=e}function Oc(){var b={};this.$get=["$filter","$sniffer",function(a,c){return function(d){switch(typeof d){case "string":return b.hasOwnProperty(d)?
77
+ b[d]:b[d]=Nc(d,!1,a,c.csp);case "function":return d;default:return C}}}]}function Pc(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return Qc(function(a){b.$evalAsync(a)},a)}]}function Qc(b,a){function c(a){return a}function d(a){return h(a)}var e=function(){var f=[],i,j;return j={resolve:function(a){if(f){var c=f;f=q;i=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],i.then(a[0],a[1])})}},reject:function(a){j.resolve(h(a))},promise:{then:function(b,g){var j=e(),h=
78
+ function(d){try{j.resolve((b||c)(d))}catch(e){a(e),j.reject(e)}},p=function(b){try{j.resolve((g||d)(b))}catch(c){a(c),j.reject(c)}};f?f.push([h,p]):i.then(h,p);return j.promise}}}},g=function(a){return a&&a.then?a:{then:function(c){var d=e();b(function(){d.resolve(c(a))});return d.promise}}},h=function(a){return{then:function(c,g){var h=e();b(function(){h.resolve((g||d)(a))});return h.promise}}};return{defer:e,reject:h,when:function(f,i,j){var k=e(),l,n=function(b){try{return(i||c)(b)}catch(d){return a(d),
79
+ h(d)}},o=function(b){try{return(j||d)(b)}catch(c){return a(c),h(c)}};b(function(){g(f).then(function(a){l||(l=!0,k.resolve(g(a).then(n,o)))},function(a){l||(l=!0,k.resolve(o(a)))})});return k.promise},all:function(a){var b=e(),c=a.length,d=[];c?m(a,function(a,e){g(a).then(function(a){e in d||(d[e]=a,--c||b.resolve(d))},function(a){e in d||b.reject(a)})}):b.resolve(d);return b.promise}}}function Rc(){var b={};this.when=function(a,c){b[a]=v({reloadOnSearch:!0},c);if(a){var d=a[a.length-1]=="/"?a.substr(0,
80
+ a.length-1):a+"/";b[d]={redirectTo:a}}return this};this.otherwise=function(a){this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache",function(a,c,d,e,g,h,f){function i(a,b){for(var b="^"+b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"$",c="",d=[],e={},f=/:(\w+)/g,g,j=0;(g=f.exec(b))!==null;)c+=b.slice(j,g.index),c+="([^\\/]*)",d.push(g[1]),j=f.lastIndex;c+=b.substr(j);var h=a.match(RegExp(c));h&&m(d,function(a,b){e[a]=h[b+1]});return h?
81
+ e:null}function j(){var b=k(),j=o.current;if(b&&j&&b.$$route===j.$$route&&fa(b.pathParams,j.pathParams)&&!b.reloadOnSearch&&!n)j.params=b.params,U(j.params,d),a.$broadcast("$routeUpdate",j);else if(b||j)n=!1,a.$broadcast("$routeChangeStart",b,j),(o.current=b)&&b.redirectTo&&(B(b.redirectTo)?c.path(l(b.redirectTo,b.params)).search(b.params).replace():c.url(b.redirectTo(b.pathParams,c.path(),c.search())).replace()),e.when(b).then(function(){if(b){var a=[],c=[],d;m(b.resolve||{},function(b,d){a.push(d);
82
+ c.push(B(b)?g.get(b):g.invoke(b))});if(!y(d=b.template))if(y(d=b.templateUrl))d=h.get(d,{cache:f}).then(function(a){return a.data});y(d)&&(a.push("$template"),c.push(d));return e.all(c).then(function(b){var c={};m(b,function(b,d){c[a[d]]=b});return c})}}).then(function(c){if(b==o.current){if(b)b.locals=c,U(b.params,d);a.$broadcast("$routeChangeSuccess",b,j)}},function(c){b==o.current&&a.$broadcast("$routeChangeError",b,j,c)})}function k(){var a,d;m(b,function(b,e){if(!d&&(a=i(c.path(),e)))d=ya(b,
83
+ {params:v({},c.search(),a),pathParams:a}),d.$$route=b});return d||b[null]&&ya(b[null],{params:{},pathParams:{}})}function l(a,b){var c=[];m((a||"").split(":"),function(a,d){if(d==0)c.push(a);else{var e=a.match(/(\w+)(.*)/),f=e[1];c.push(b[f]);c.push(e[2]||"");delete b[f]}});return c.join("")}var n=!1,o={routes:b,reload:function(){n=!0;a.$evalAsync(j)}};a.$on("$locationChangeSuccess",j);return o}]}function Sc(){this.$get=I({})}function Tc(){var b=10;this.digestTtl=function(a){arguments.length&&(b=
84
+ a);return b};this.$get=["$injector","$exceptionHandler","$parse",function(a,c,d){function e(){this.$id=xa();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$listeners={};this.$$isolateBindings={}}function g(a){if(i.$$phase)throw Error(i.$$phase+" already in progress");i.$$phase=a}function h(a,b){var c=d(a);qa(c,b);return c}function f(){}e.prototype={$new:function(a){if(H(a))throw Error("API-CHANGE: Use $controller to instantiate controllers.");
85
+ a?(a=new e,a.$root=this.$root):(a=function(){},a.prototype=this,a=new a,a.$id=xa());a["this"]=a;a.$$listeners={};a.$parent=this;a.$$asyncQueue=[];a.$$watchers=a.$$nextSibling=a.$$childHead=a.$$childTail=null;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=this.$$childTail=a;return a},$watch:function(a,b,c){var d=h(a,"watch"),e=this.$$watchers,g={fn:b,last:f,get:d,exp:a,eq:!!c};if(!H(b)){var i=h(b||C,"listener");g.fn=function(a,b,
86
+ c){i(c)}}if(!e)e=this.$$watchers=[];e.unshift(g);return function(){Sa(e,g)}},$digest:function(){var a,d,e,h,o,p,m,t=b,x,q=[],A,N;g("$digest");do{m=!1;x=this;do{for(o=x.$$asyncQueue;o.length;)try{x.$eval(o.shift())}catch(J){c(J)}if(h=x.$$watchers)for(p=h.length;p--;)try{if(a=h[p],(d=a.get(x))!==(e=a.last)&&!(a.eq?fa(d,e):typeof d=="number"&&typeof e=="number"&&isNaN(d)&&isNaN(e)))m=!0,a.last=a.eq?U(d):d,a.fn(d,e===f?d:e,x),t<5&&(A=4-t,q[A]||(q[A]=[]),N=H(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):
87
+ a.exp,N+="; newVal: "+da(d)+"; oldVal: "+da(e),q[A].push(N))}catch(r){c(r)}if(!(h=x.$$childHead||x!==this&&x.$$nextSibling))for(;x!==this&&!(h=x.$$nextSibling);)x=x.$parent}while(x=h);if(m&&!t--)throw i.$$phase=null,Error(b+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+da(q));}while(m||o.length);i.$$phase=null},$destroy:function(){if(!(i==this||this.$$destroyed)){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;if(a.$$childHead==this)a.$$childHead=
88
+ this.$$nextSibling;if(a.$$childTail==this)a.$$childTail=this.$$prevSibling;if(this.$$prevSibling)this.$$prevSibling.$$nextSibling=this.$$nextSibling;if(this.$$nextSibling)this.$$nextSibling.$$prevSibling=this.$$prevSibling;this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(a,b){return d(a)(this,b)},$evalAsync:function(a){this.$$asyncQueue.push(a)},$apply:function(a){try{return g("$apply"),this.$eval(a)}catch(b){c(b)}finally{i.$$phase=null;try{i.$digest()}catch(d){throw c(d),
89
+ d;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);return function(){c[za(c,b)]=null}},$emit:function(a,b){var d=[],e,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},i=[h].concat(ha.call(arguments,1)),m,q;do{e=f.$$listeners[a]||d;h.currentScope=f;m=0;for(q=e.length;m<q;m++)if(e[m])try{if(e[m].apply(null,i),g)return h}catch(A){c(A)}else e.splice(m,1),m--,q--;f=f.$parent}while(f);
90
+ return h},$broadcast:function(a,b){var d=this,e=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1},g=[f].concat(ha.call(arguments,1)),h,i;do{d=e;f.currentScope=d;e=d.$$listeners[a]||[];h=0;for(i=e.length;h<i;h++)if(e[h])try{e[h].apply(null,g)}catch(m){c(m)}else e.splice(h,1),h--,i--;if(!(e=d.$$childHead||d!==this&&d.$$nextSibling))for(;d!==this&&!(e=d.$$nextSibling);)d=d.$parent}while(d=e);return f}};var i=new e;return i}]}function Uc(){this.$get=
91
+ ["$window",function(b){var a={},c=G((/android (\d+)/.exec(z(b.navigator.userAgent))||[])[1]);return{history:!(!b.history||!b.history.pushState||c<4),hashchange:"onhashchange"in b&&(!b.document.documentMode||b.document.documentMode>7),hasEvent:function(c){if(c=="input"&&Z==9)return!1;if(w(a[c])){var e=b.document.createElement("div");a[c]="on"+c in e}return a[c]},csp:!1}}]}function Vc(){this.$get=I(P)}function Ob(b){var a={},c,d,e;if(!b)return a;m(b.split("\n"),function(b){e=b.indexOf(":");c=z(Q(b.substr(0,
92
+ e)));d=Q(b.substr(e+1));c&&(a[c]?a[c]+=", "+d:a[c]=d)});return a}function Pb(b){var a=L(b)?b:q;return function(c){a||(a=Ob(b));return c?a[z(c)]||null:a}}function Qb(b,a,c){if(H(c))return c(b,a);m(c,function(c){b=c(b,a)});return b}function Wc(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d=this.defaults={transformResponse:[function(d){B(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=pb(d,!0)));return d}],transformRequest:[function(a){return L(a)&&wa.apply(a)!=="[object File]"?da(a):a}],
93
+ headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},e=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,i,j,k){function l(a){function c(a){var b=v({},a,{data:Qb(a.data,a.headers,f)});return 200<=a.status&&a.status<300?b:j.reject(b)}a.method=la(a.method);var e=a.transformRequest||
94
+ d.transformRequest,f=a.transformResponse||d.transformResponse,g=d.headers,g=v({"X-XSRF-TOKEN":b.cookies()["XSRF-TOKEN"]},g.common,g[z(a.method)],a.headers),e=Qb(a.data,Pb(g),e),i;w(a.data)&&delete g["Content-Type"];i=n(a,e,g);i=i.then(c,c);m(s,function(a){i=a(i)});i.success=function(b){i.then(function(c){b(c.data,c.status,c.headers,a)});return i};i.error=function(b){i.then(null,function(c){b(c.data,c.status,c.headers,a)});return i};return i}function n(b,c,d){function e(a,b,c){m&&(200<=a&&a<300?m.put(q,
95
+ [a,b,Ob(c)]):m.remove(q));f(b,a,c);i.$apply()}function f(a,c,d){c=Math.max(c,0);(200<=c&&c<300?k.resolve:k.reject)({data:a,status:c,headers:Pb(d),config:b})}function h(){var a=za(l.pendingRequests,b);a!==-1&&l.pendingRequests.splice(a,1)}var k=j.defer(),n=k.promise,m,s,q=o(b.url,b.params);l.pendingRequests.push(b);n.then(h,h);b.cache&&b.method=="GET"&&(m=L(b.cache)?b.cache:p);if(m)if(s=m.get(q))if(s.then)return s.then(h,h),s;else E(s)?f(s[1],s[0],U(s[2])):f(s,200,{});else m.put(q,n);s||a(b.method,
96
+ q,c,e,d,b.timeout,b.withCredentials);return n}function o(a,b){if(!b)return a;var c=[];fc(b,function(a,b){a==null||a==q||(L(a)&&(a=da(a)),c.push(encodeURIComponent(b)+"="+encodeURIComponent(a)))});return a+(a.indexOf("?")==-1?"?":"&")+c.join("&")}var p=c("$http"),s=[];m(e,function(a){s.push(B(a)?k.get(a):k.invoke(a))});l.pendingRequests=[];(function(a){m(arguments,function(a){l[a]=function(b,c){return l(v(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){m(arguments,function(a){l[a]=
97
+ function(b,c,d){return l(v(d||{},{method:a,url:b,data:c}))}})})("post","put");l.defaults=d;return l}]}function Xc(){this.$get=["$browser","$window","$document",function(b,a,c){return Yc(b,Zc,b.defer,a.angular.callbacks,c[0],a.location.protocol.replace(":",""))}]}function Yc(b,a,c,d,e,g){function h(a,b){var c=e.createElement("script"),d=function(){e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;Z?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=
98
+ d;e.body.appendChild(c)}return function(e,i,j,k,l,n,o){function p(a,c,d,e){c=(i.match(Hb)||["",g])[1]=="file"?d?200:404:c;a(c==1223?204:c,d,e);b.$$completeOutstandingRequest(C)}b.$$incOutstandingRequestCount();i=i||b.url();if(z(e)=="jsonp"){var s="_"+(d.counter++).toString(36);d[s]=function(a){d[s].data=a};h(i.replace("JSON_CALLBACK","angular.callbacks."+s),function(){d[s].data?p(k,200,d[s].data):p(k,-2);delete d[s]})}else{var t=new a;t.open(e,i,!0);m(l,function(a,b){a&&t.setRequestHeader(b,a)});
99
+ var q;t.onreadystatechange=function(){if(t.readyState==4){var a=t.getAllResponseHeaders(),b=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"];a||(a="",m(b,function(b){var c=t.getResponseHeader(b);c&&(a+=b+": "+c+"\n")}));p(k,q||t.status,t.responseText,a)}};if(o)t.withCredentials=!0;t.send(j||"");n>0&&c(function(){q=-1;t.abort()},n)}}}function $c(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,
100
+ maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),
101
+ AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return b===1?"one":"other"}}}}function ad(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,f,i){var j=c.defer(),k=j.promise,l=y(i)&&!i,f=a.defer(function(){try{j.resolve(e())}catch(a){j.reject(a),d(a)}l||b.$apply()},f),i=function(){delete g[k.$$timeoutId]};
102
+ k.$$timeoutId=f;g[f]=j;k.then(i,i);return k}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),a.defer.cancel(b.$$timeoutId)):!1};return e}]}function Rb(b){function a(a,e){return b.factory(a+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",Sb);a("date",Tb);a("filter",bd);a("json",cd);a("limitTo",dd);a("lowercase",ed);a("number",Ub);a("orderBy",Vb);a("uppercase",fd)}function bd(){return function(b,
103
+ a){if(!E(b))return b;var c=[];c.check=function(a){for(var b=0;b<c.length;b++)if(!c[b](a))return!1;return!0};var d=function(a,b){if(b.charAt(0)==="!")return!d(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return(""+a).toLowerCase().indexOf(b)>-1;case "object":for(var c in a)if(c.charAt(0)!=="$"&&d(a[c],b))return!0;return!1;case "array":for(c=0;c<a.length;c++)if(d(a[c],b))return!0;return!1;default:return!1}};switch(typeof a){case "boolean":case "number":case "string":a=
104
+ {$:a};case "object":for(var e in a)e=="$"?function(){var b=(""+a[e]).toLowerCase();b&&c.push(function(a){return d(a,b)})}():function(){var b=e,f=(""+a[e]).toLowerCase();f&&c.push(function(a){return d(gb(a,b),f)})}();break;case "function":c.push(a);break;default:return b}for(var g=[],h=0;h<b.length;h++){var f=b[h];c.check(f)&&g.push(f)}return g}}function Sb(b){var a=b.NUMBER_FORMATS;return function(b,d){if(w(d))d=a.CURRENCY_SYM;return Wb(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,
105
+ d)}}function Ub(b){var a=b.NUMBER_FORMATS;return function(b,d){return Wb(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Wb(b,a,c,d,e){if(isNaN(b)||!isFinite(b))return"";var g=b<0,b=Math.abs(b),h=b+"",f="",i=[],j=!1;if(h.indexOf("e")!==-1){var k=h.match(/([\d\.]+)e(-?)(\d+)/);k&&k[2]=="-"&&k[3]>e+1?h="0":(f=h,j=!0)}if(!j){h=(h.split(Xb)[1]||"").length;w(e)&&(e=Math.min(Math.max(a.minFrac,h),a.maxFrac));var h=Math.pow(10,e),b=Math.round(b*h)/h,b=(""+b).split(Xb),h=b[0],b=b[1]||"",j=0,k=a.lgSize,
106
+ l=a.gSize;if(h.length>=k+l)for(var j=h.length-k,n=0;n<j;n++)(j-n)%l===0&&n!==0&&(f+=c),f+=h.charAt(n);for(n=j;n<h.length;n++)(h.length-n)%k===0&&n!==0&&(f+=c),f+=h.charAt(n);for(;b.length<e;)b+="0";e&&e!=="0"&&(f+=d+b.substr(0,e))}i.push(g?a.negPre:a.posPre);i.push(f);i.push(g?a.negSuf:a.posSuf);return i.join("")}function jb(b,a,c){var d="";b<0&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function O(b,a,c,d){c=c||0;return function(e){e=e["get"+b]();if(c>0||e>
107
+ -c)e+=c;e===0&&c==-12&&(e=12);return jb(e,a,d)}}function Ja(b,a){return function(c,d){var e=c["get"+b](),g=la(a?"SHORT"+b:b);return d[g][e]}}function Tb(b){function a(a){var b;if(b=a.match(c)){var a=new Date(0),g=0,h=0;b[9]&&(g=G(b[9]+b[10]),h=G(b[9]+b[11]));a.setUTCFullYear(G(b[1]),G(b[2])-1,G(b[3]));a.setUTCHours(G(b[4]||0)-g,G(b[5]||0)-h,G(b[6]||0),G(b[7]||0))}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,
108
+ e){var g="",h=[],f,i,e=e||"mediumDate",e=b.DATETIME_FORMATS[e]||e;B(c)&&(c=gd.test(c)?G(c):a(c));Qa(c)&&(c=new Date(c));if(!na(c))return c;for(;e;)(i=hd.exec(e))?(h=h.concat(ha.call(i,1)),e=h.pop()):(h.push(e),e=null);m(h,function(a){f=id[a];g+=f?f(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function cd(){return function(b){return da(b,!0)}}function dd(){return function(b,a){if(!(b instanceof Array))return b;var a=G(a),c=[],d,e;if(!b||!(b instanceof Array))return c;
109
+ a>b.length?a=b.length:a<-b.length&&(a=-b.length);a>0?(d=0,e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Vb(b){return function(a,c,d){function e(a,b){return Ua(b)?function(b,c){return a(c,b)}:a}if(!E(a))return a;if(!c)return a;for(var c=E(c)?c:[c],c=Ra(c,function(a){var c=!1,d=a||ma;if(B(a)){if(a.charAt(0)=="+"||a.charAt(0)=="-")c=a.charAt(0)=="-",a=a.substring(1);d=b(a)}return e(function(a,b){var c;c=d(a);var e=d(b),f=typeof c,g=typeof e;f==g?(f=="string"&&(c=c.toLowerCase()),
110
+ f=="string"&&(e=e.toLowerCase()),c=c===e?0:c<e?-1:1):c=f<g?-1:1;return c},c)}),g=[],h=0;h<a.length;h++)g.push(a[h]);return g.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(e!==0)return e}return 0},d))}}function S(b){H(b)&&(b={link:b});b.restrict=b.restrict||"AC";return I(b)}function Yb(b,a){function c(a,c){c=c?"-"+Za(c,"-"):"";b.removeClass((a?Ka:La)+c).addClass((a?La:Ka)+c)}var d=this,e=b.parent().controller("form")||Ma,g=0,h=d.$error={};d.$name=a.name;d.$dirty=!1;d.$pristine=
111
+ !0;d.$valid=!0;d.$invalid=!1;e.$addControl(d);b.addClass(Na);c(!0);d.$addControl=function(a){a.$name&&!d.hasOwnProperty(a.$name)&&(d[a.$name]=a)};d.$removeControl=function(a){a.$name&&d[a.$name]===a&&delete d[a.$name];m(h,function(b,c){d.$setValidity(c,!0,a)})};d.$setValidity=function(a,b,j){var k=h[a];if(b){if(k&&(Sa(k,j),!k.length)){g--;if(!g)c(b),d.$valid=!0,d.$invalid=!1;h[a]=!1;c(!0,a);e.$setValidity(a,!0,d)}}else{g||c(b);if(k){if(za(k,j)!=-1)return}else h[a]=k=[],g++,c(!1,a),e.$setValidity(a,
112
+ !1,d);k.push(j);d.$valid=!1;d.$invalid=!0}};d.$setDirty=function(){b.removeClass(Na).addClass(Zb);d.$dirty=!0;d.$pristine=!1;e.$setDirty()}}function X(b){return w(b)||b===""||b===null||b!==b}function Oa(b,a,c,d,e,g){var h=function(){var c=Q(a.val());d.$viewValue!==c&&b.$apply(function(){d.$setViewValue(c)})};if(e.hasEvent("input"))a.bind("input",h);else{var f,i=function(){f||(f=g.defer(function(){h();f=null}))};a.bind("keydown",function(a){a=a.keyCode;a===91||15<a&&a<19||37<=a&&a<=40||i()});a.bind("change",
113
+ h);e.hasEvent("paste")&&a.bind("paste cut",i)}d.$render=function(){a.val(X(d.$viewValue)?"":d.$viewValue)};var j=c.ngPattern,k=function(a,b){return X(b)||a.test(b)?(d.$setValidity("pattern",!0),b):(d.$setValidity("pattern",!1),q)};j&&(j.match(/^\/(.*)\/$/)?(j=RegExp(j.substr(1,j.length-2)),e=function(a){return k(j,a)}):e=function(a){var c=b.$eval(j);if(!c||!c.test)throw Error("Expected "+j+" to be a RegExp but was "+c);return k(c,a)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var l=
114
+ G(c.ngMinlength),e=function(a){return!X(a)&&a.length<l?(d.$setValidity("minlength",!1),q):(d.$setValidity("minlength",!0),a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var n=G(c.ngMaxlength),c=function(a){return!X(a)&&a.length>n?(d.$setValidity("maxlength",!1),q):(d.$setValidity("maxlength",!0),a)};d.$parsers.push(c);d.$formatters.push(c)}}function kb(b,a){b="ngClass"+b;return S(function(c,d,e){function g(b){if(a===!0||c.$index%2===a)i&&!fa(b,i)&&h(i),f(b);i=U(b)}function h(a){L(a)&&
115
+ !E(a)&&(a=Ra(a,function(a,b){if(a)return b}));d.removeClass(E(a)?a.join(" "):a)}function f(a){L(a)&&!E(a)&&(a=Ra(a,function(a,b){if(a)return b}));a&&d.addClass(E(a)?a.join(" "):a)}var i=q;c.$watch(e[b],g,!0);e.$observe("class",function(){var a=c.$eval(e[b]);g(a,a)});b!=="ngClass"&&c.$watch("$index",function(d,g){var i=d&1;i!==g&1&&(i===a?f(c.$eval(e[b])):h(c.$eval(e[b])))})})}var z=function(b){return B(b)?b.toLowerCase():b},la=function(b){return B(b)?b.toUpperCase():b},Z=G((/msie (\d+)/.exec(z(navigator.userAgent))||
116
+ [])[1]),u,ca,ha=[].slice,Pa=[].push,wa=Object.prototype.toString,Ya=P.angular||(P.angular={}),sa,fb,aa=["0","0","0"];C.$inject=[];ma.$inject=[];fb=Z<9?function(b){b=b.nodeName?b:b[0];return b.scopeName&&b.scopeName!="HTML"?la(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var kc=/[A-Z]/g,jd={full:"1.0.7",major:1,minor:0,dot:7,codeName:"monochromatic-rainbow"},Ba=K.cache={},Aa=K.expando="ng-"+(new Date).getTime(),oc=1,$b=P.document.addEventListener?
117
+ function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},db=P.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)},mc=/([\:\-\_]+(.))/g,nc=/^moz([A-Z])/,ua=K.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;this.bind("DOMContentLoaded",a);K(P).bind("load",a)},toString:function(){var b=[];m(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return b>=0?u(this[b]):u(this[this.length+
118
+ b])},length:0,push:Pa,sort:[].sort,splice:[].splice},Ea={};m("multiple,selected,checked,disabled,readOnly,required".split(","),function(b){Ea[z(b)]=b});var Bb={};m("input,select,option,textarea,button,form".split(","),function(b){Bb[la(b)]=!0});m({data:wb,inheritedData:Da,scope:function(b){return Da(b,"$scope")},controller:zb,injector:function(b){return Da(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Ca,css:function(b,a,c){a=tb(a);if(y(c))b.style[a]=c;else{var d;Z<=8&&(d=
119
+ b.currentStyle&&b.currentStyle[a],d===""&&(d="auto"));d=d||b.style[a];Z<=8&&(d=d===""?q:d);return d}},attr:function(b,a,c){var d=z(a);if(Ea[d])if(y(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||C).specified?d:q;else if(y(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),b===null?q:b},prop:function(b,a,c){if(y(c))b[a]=c;else return b[a]},text:v(Z<9?function(b,a){if(b.nodeType==1){if(w(a))return b.innerText;
120
+ b.innerText=a}else{if(w(a))return b.nodeValue;b.nodeValue=a}}:function(b,a){if(w(a))return b.textContent;b.textContent=a},{$dv:""}),val:function(b,a){if(w(a))return b.value;b.value=a},html:function(b,a){if(w(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)ra(d[c]);b.innerHTML=a}},function(b,a){K.prototype[a]=function(a,d){var e,g;if((b.length==2&&b!==Ca&&b!==zb?a:d)===q)if(L(a)){for(e=0;e<this.length;e++)if(b===wb)b(this[e],a);else for(g in a)b(this[e],g,a[g]);return this}else{if(this.length)return b(this[0],
121
+ a,d)}else{for(e=0;e<this.length;e++)b(this[e],a,d);return this}return b.$dv}});m({removeData:ub,dealoc:ra,bind:function a(c,d,e){var g=ba(c,"events"),h=ba(c,"handle");g||ba(c,"events",g={});h||ba(c,"handle",h=pc(c,g));m(d.split(" "),function(d){var i=g[d];if(!i){if(d=="mouseenter"||d=="mouseleave"){var j=T.body.contains||T.body.compareDocumentPosition?function(a,c){var d=a.nodeType===9?a.documentElement:a,e=c&&c.parentNode;return a===e||!(!e||!(e.nodeType===1&&(d.contains?d.contains(e):a.compareDocumentPosition&&
122
+ a.compareDocumentPosition(e)&16)))}:function(a,c){if(c)for(;c=c.parentNode;)if(c===a)return!0;return!1};g[d]=[];a(c,{mouseleave:"mouseout",mouseenter:"mouseover"}[d],function(a){var c=a.relatedTarget;(!c||c!==this&&!j(this,c))&&h(a,d)})}else $b(c,d,h),g[d]=[];i=g[d]}i.push(e)})},unbind:vb,replaceWith:function(a,c){var d,e=a.parentNode;ra(a);m(new K(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];m(a.childNodes,function(a){a.nodeType===1&&c.push(a)});
123
+ return c},contents:function(a){return a.childNodes||[]},append:function(a,c){m(new K(c),function(c){a.nodeType===1&&a.appendChild(c)})},prepend:function(a,c){if(a.nodeType===1){var d=a.firstChild;m(new K(c),function(c){d?a.insertBefore(c,d):(a.appendChild(c),d=c)})}},wrap:function(a,c){var c=u(c)[0],d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){ra(a);var c=a.parentNode;c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;m(new K(c),function(a){e.insertBefore(a,
124
+ d.nextSibling);d=a})},addClass:yb,removeClass:xb,toggleClass:function(a,c,d){w(d)&&(d=!Ca(a,c));(d?yb:xb)(a,c)},parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;for(a=a.nextSibling;a!=null&&a.nodeType!==1;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName(c)},clone:cb,triggerHandler:function(a,c){var d=(ba(a,"events")||{})[c];m(d,function(c){c.call(a,null)})}},function(a,c){K.prototype[c]=
125
+ function(c,e){for(var g,h=0;h<this.length;h++)g==q?(g=a(this[h],c,e),g!==q&&(g=u(g))):bb(g,a(this[h],c,e));return g==q?this:g}});Fa.prototype={put:function(a,c){this[ga(a)]=c},get:function(a){return this[ga(a)]},remove:function(a){var c=this[a=ga(a)];delete this[a];return c}};eb.prototype={push:function(a,c){var d=this[a=ga(a)];d?d.push(c):this[a]=[c]},shift:function(a){var c=this[a=ga(a)];if(c)return c.length==1?(delete this[a],c[0]):c.shift()},peek:function(a){if(a=this[ga(a)])return a[0]}};var rc=
126
+ /^function\s*[^\(]*\(\s*([^\)]*)\)/m,sc=/,/,tc=/^\s*(_?)(\S+?)\1\s*$/,qc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Eb="Non-assignable model expression: ";Db.$inject=["$provide"];var Bc=/^(x[\:\-_]|data[\:\-_])/i,Hb=/^([^:]+):\/\/(\w+:{0,1}\w*@)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,ac=/^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,Ic=ac,Ib={http:80,https:443,ftp:21};hb.prototype={$$replace:!1,absUrl:Ha("$$absUrl"),url:function(a,c){if(w(a))return this.$$url;var d=ac.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));
127
+ if(d[2]||d[1])this.search(d[3]||"");this.hash(d[5]||"",c);return this},protocol:Ha("$$protocol"),host:Ha("$$host"),port:Ha("$$port"),path:Kb("$$path",function(a){return a.charAt(0)=="/"?a:"/"+a}),search:function(a,c){if(w(a))return this.$$search;y(c)?c===null?delete this.$$search[a]:this.$$search[a]=c:this.$$search=B(a)?Va(a):a;this.$$compose();return this},hash:Kb("$$hash",ma),replace:function(){this.$$replace=!0;return this}};Ga.prototype=ya(hb.prototype);Jb.prototype=ya(Ga.prototype);var Ia={"null":function(){return null},
128
+ "true":function(){return!0},"false":function(){return!1},undefined:C,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return y(d)?y(e)?d+e:d:y(e)?e:q},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(y(d)?d:0)-(y(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"^":function(a,c,d,e){return d(a,c)^e(a,c)},"=":C,"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,
129
+ d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Mc={n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'},ib={},Zc=P.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");
130
+ };Rb.$inject=["$provide"];Sb.$inject=["$locale"];Ub.$inject=["$locale"];var Xb=".",id={yyyy:O("FullYear",4),yy:O("FullYear",2,0,!0),y:O("FullYear",1),MMMM:Ja("Month"),MMM:Ja("Month",!0),MM:O("Month",2,1),M:O("Month",1,1),dd:O("Date",2),d:O("Date",1),HH:O("Hours",2),H:O("Hours",1),hh:O("Hours",2,-12),h:O("Hours",1,-12),mm:O("Minutes",2),m:O("Minutes",1),ss:O("Seconds",2),s:O("Seconds",1),EEEE:Ja("Day"),EEE:Ja("Day",!0),a:function(a,c){return a.getHours()<12?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){var a=
131
+ -1*a.getTimezoneOffset(),c=a>=0?"+":"";c+=jb(Math[a>0?"floor":"ceil"](a/60),2)+jb(Math.abs(a%60),2);return c}},hd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,gd=/^\d+$/;Tb.$inject=["$locale"];var ed=I(z),fd=I(la);Vb.$inject=["$parse"];var kd=I({restrict:"E",compile:function(a,c){Z<=8&&(!c.href&&!c.name&&c.$set("href",""),a.append(T.createComment("IE fix")));return function(a,c){c.bind("click",function(a){c.attr("href")||a.preventDefault()})}}}),lb={};m(Ea,function(a,
132
+ c){var d=ea("ng-"+c);lb[d]=function(){return{priority:100,compile:function(){return function(a,g,h){a.$watch(h[d],function(a){h.$set(c,!!a)})}}}}});m(["src","href"],function(a){var c=ea("ng-"+a);lb[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(a,c),Z&&e.prop(a,g[a]))})}}}});var Ma={$addControl:C,$removeControl:C,$setValidity:C,$setDirty:C};Yb.$inject=["$element","$attrs","$scope"];var Pa=function(a){return["$timeout",function(c){var d={name:"form",restrict:"E",
133
+ controller:Yb,compile:function(){return{pre:function(a,d,h,f){if(!h.action){var i=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};$b(d[0],"submit",i);d.bind("$destroy",function(){c(function(){db(d[0],"submit",i)},0,!1)})}var j=d.parent().controller("form"),k=h.name||h.ngForm;k&&(a[k]=f);j&&d.bind("$destroy",function(){j.$removeControl(f);k&&(a[k]=q);v(f,Ma)})}}}};return a?v(U(d),{restrict:"EAC"}):d}]},ld=Pa(),md=Pa(!0),nd=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,
134
+ od=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,pd=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,bc={text:Oa,number:function(a,c,d,e,g,h){Oa(a,c,d,e,g,h);e.$parsers.push(function(a){var c=X(a);return c||pd.test(a)?(e.$setValidity("number",!0),a===""?null:c?a:parseFloat(a)):(e.$setValidity("number",!1),q)});e.$formatters.push(function(a){return X(a)?"":""+a});if(d.min){var f=parseFloat(d.min),a=function(a){return!X(a)&&a<f?(e.$setValidity("min",!1),q):(e.$setValidity("min",!0),a)};e.$parsers.push(a);
135
+ e.$formatters.push(a)}if(d.max){var i=parseFloat(d.max),d=function(a){return!X(a)&&a>i?(e.$setValidity("max",!1),q):(e.$setValidity("max",!0),a)};e.$parsers.push(d);e.$formatters.push(d)}e.$formatters.push(function(a){return X(a)||Qa(a)?(e.$setValidity("number",!0),a):(e.$setValidity("number",!1),q)})},url:function(a,c,d,e,g,h){Oa(a,c,d,e,g,h);a=function(a){return X(a)||nd.test(a)?(e.$setValidity("url",!0),a):(e.$setValidity("url",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,
136
+ c,d,e,g,h){Oa(a,c,d,e,g,h);a=function(a){return X(a)||od.test(a)?(e.$setValidity("email",!0),a):(e.$setValidity("email",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){w(d.name)&&c.attr("name",xa());c.bind("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,h=d.ngFalseValue;B(g)||(g=!0);B(h)||(h=!1);c.bind("click",
137
+ function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$formatters.push(function(a){return a===g});e.$parsers.push(function(a){return a?g:h})},hidden:C,button:C,submit:C,reset:C},cc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,h){h&&(bc[z(g.type)]||bc.text)(d,e,g,h,c,a)}}}],La="ng-valid",Ka="ng-invalid",Na="ng-pristine",Zb="ng-dirty",qd=["$scope","$exceptionHandler","$attrs","$element","$parse",
138
+ function(a,c,d,e,g){function h(a,c){c=c?"-"+Za(c,"-"):"";e.removeClass((a?Ka:La)+c).addClass((a?La:Ka)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var f=g(d.ngModel),i=f.assign;if(!i)throw Error(Eb+d.ngModel+" ("+pa(e)+")");this.$render=C;var j=e.inheritedData("$formController")||Ma,k=0,l=this.$error={};e.addClass(Na);h(!0);this.$setValidity=function(a,
139
+ c){if(l[a]!==!c){if(c){if(l[a]&&k--,!k)h(!0),this.$valid=!0,this.$invalid=!1}else h(!1),this.$invalid=!0,this.$valid=!1,k++;l[a]=!c;h(c,a);j.$setValidity(a,c,this)}};this.$setViewValue=function(d){this.$viewValue=d;if(this.$pristine)this.$dirty=!0,this.$pristine=!1,e.removeClass(Na).addClass(Zb),j.$setDirty();m(this.$parsers,function(a){d=a(d)});if(this.$modelValue!==d)this.$modelValue=d,i(a,d),m(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};var n=this;a.$watch(function(){var c=
140
+ f(a);if(n.$modelValue!==c){var d=n.$formatters,e=d.length;for(n.$modelValue=c;e--;)c=d[e](c);if(n.$viewValue!==c)n.$viewValue=c,n.$render()}})}],rd=function(){return{require:["ngModel","^?form"],controller:qd,link:function(a,c,d,e){var g=e[0],h=e[1]||Ma;h.$addControl(g);c.bind("$destroy",function(){h.$removeControl(g)})}}},sd=I({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),dc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=
141
+ !0;var g=function(a){if(d.required&&(X(a)||a===!1))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",function(){g(e.$viewValue)})}}}},td=function(){return{require:"ngModel",link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){var c=[];a&&m(a.split(g),function(a){a&&c.push(Q(a))});return c});e.$formatters.push(function(a){return E(a)?a.join(", "):
142
+ q})}}},ud=/^(true|false|\d+)$/,vd=function(){return{priority:100,compile:function(a,c){return ud.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,c,g){a.$watch(g.ngValue,function(a){g.$set("value",a,!1)})}}}},wd=S(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==q?"":a)})}),xd=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",
143
+ function(a){d.text(a)})}}],yd=[function(){return function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtmlUnsafe);a.$watch(d.ngBindHtmlUnsafe,function(a){c.html(a||"")})}}],zd=kb("",!0),Ad=kb("Odd",0),Bd=kb("Even",1),Cd=S({compile:function(a,c){c.$set("ngCloak",q);a.removeClass("ng-cloak")}}),Dd=[function(){return{scope:!0,controller:"@"}}],Ed=["$sniffer",function(a){return{priority:1E3,compile:function(){a.csp=!0}}}],ec={};m("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),
144
+ function(a){var c=ea("ng-"+a);ec[c]=["$parse",function(d){return function(e,g,h){var f=d(h[c]);g.bind(z(a),function(a){e.$apply(function(){f(e,{$event:a})})})}}]});var Fd=S(function(a,c,d){c.bind("submit",function(){a.$apply(d.ngSubmit)})}),Gd=["$http","$templateCache","$anchorScroll","$compile",function(a,c,d,e){return{restrict:"ECA",terminal:!0,compile:function(g,h){var f=h.ngInclude||h.src,i=h.onload||"",j=h.autoscroll;return function(g,h){var n=0,o,p=function(){o&&(o.$destroy(),o=null);h.html("")};
145
+ g.$watch(f,function(f){var m=++n;f?a.get(f,{cache:c}).success(function(a){m===n&&(o&&o.$destroy(),o=g.$new(),h.html(a),e(h.contents())(o),y(j)&&(!j||g.$eval(j))&&d(),o.$emit("$includeContentLoaded"),g.$eval(i))}).error(function(){m===n&&p()}):p()})}}}}],Hd=S({compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),Id=S({terminal:!0,priority:1E3}),Jd=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,h){var f=h.count,i=g.attr(h.$attr.when),j=h.offset||
146
+ 0,k=e.$eval(i),l={},n=c.startSymbol(),o=c.endSymbol();m(k,function(a,e){l[e]=c(a.replace(d,n+f+"-"+j+o))});e.$watch(function(){var c=parseFloat(e.$eval(f));return isNaN(c)?"":(c in k||(c=a.pluralCat(c-j)),l[c](e,g,!0))},function(a){g.text(a)})}}}],Kd=S({transclude:"element",priority:1E3,terminal:!0,compile:function(a,c,d){return function(a,c,h){var f=h.ngRepeat,h=f.match(/^\s*(.+)\s+in\s+(.*)\s*$/),i,j,k;if(!h)throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '"+f+"'.");f=
147
+ h[1];i=h[2];h=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!h)throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '"+f+"'.");j=h[3]||h[1];k=h[2];var l=new eb;a.$watch(function(a){var e,f,h=a.$eval(i),m=c,q=new eb,y,A,u,w,r,v;if(E(h))r=h||[];else{r=[];for(u in h)h.hasOwnProperty(u)&&u.charAt(0)!="$"&&r.push(u);r.sort()}y=r.length-1;e=0;for(f=r.length;e<f;e++){u=h===r?e:r[e];w=h[u];if(v=l.shift(w)){A=v.scope;q.push(w,v);if(e!==v.index)v.index=e,m.after(v.element);
148
+ m=v.element}else A=a.$new();A[j]=w;k&&(A[k]=u);A.$index=e;A.$first=e===0;A.$last=e===y;A.$middle=!(A.$first||A.$last);v||d(A,function(a){m.after(a);v={scope:A,element:m=a,index:e};q.push(w,v)})}for(u in l)if(l.hasOwnProperty(u))for(r=l[u];r.length;)w=r.pop(),w.element.remove(),w.scope.$destroy();l=q})}}}),Ld=S(function(a,c,d){a.$watch(d.ngShow,function(a){c.css("display",Ua(a)?"":"none")})}),Md=S(function(a,c,d){a.$watch(d.ngHide,function(a){c.css("display",Ua(a)?"none":"")})}),Nd=S(function(a,c,
149
+ d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&m(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Od=I({restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(a,c,d,e){var g,h,f;a.$watch(d.ngSwitch||d.on,function(i){h&&(f.$destroy(),h.remove(),h=f=null);if(g=e.cases["!"+i]||e.cases["?"])a.$eval(d.change),f=a.$new(),g(f,function(a){h=a;c.append(a)})})}}),Pd=S({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,g,h,
150
+ f){f.cases["!"+c.ngSwitchWhen]=d}}}),Qd=S({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,c,h,f){f.cases["?"]=d}}}),Rd=S({controller:["$transclude","$element",function(a,c){a(function(a){c.append(a)})}]}),Sd=["$http","$templateCache","$route","$anchorScroll","$compile","$controller",function(a,c,d,e,g,h){return{restrict:"ECA",terminal:!0,link:function(a,c,j){function k(){var j=d.current&&d.current.locals,k=j&&j.$template;if(k){c.html(k);l&&(l.$destroy(),
151
+ l=null);var k=g(c.contents()),m=d.current;l=m.scope=a.$new();if(m.controller)j.$scope=l,j=h(m.controller,j),c.children().data("$ngControllerController",j);k(l);l.$emit("$viewContentLoaded");l.$eval(n);e()}else c.html(""),l&&(l.$destroy(),l=null)}var l,n=j.onload||"";a.$on("$routeChangeSuccess",k);k()}}}],Td=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){d.type=="text/ng-template"&&a.put(d.id,c[0].text)}}}],Ud=I({terminal:!0}),Vd=["$compile","$parse",function(a,
152
+ c){var d=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,e={$setViewValue:C};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(a,c,d){var i=this,j={},k=e,l;i.databound=d.ngModel;i.init=function(a,c,d){k=a;l=d};i.addOption=function(c){j[c]=!0;k.$viewValue==c&&(a.val(c),l.parent()&&l.remove())};i.removeOption=function(a){this.hasOption(a)&&(delete j[a],
153
+ k.$viewValue==a&&this.renderUnknownOption(a))};i.renderUnknownOption=function(c){c="? "+ga(c)+" ?";l.val(c);a.prepend(l);a.val(c);l.prop("selected",!0)};i.hasOption=function(a){return j.hasOwnProperty(a)};c.$on("$destroy",function(){i.renderUnknownOption=C})}],link:function(e,h,f,i){function j(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(z.parent()&&z.remove(),c.val(a),a===""&&v.prop("selected",!0)):w(a)&&v?c.val(""):e.renderUnknownOption(a)};c.bind("change",function(){a.$apply(function(){z.parent()&&
154
+ z.remove();d.$setViewValue(c.val())})})}function k(a,c,d){var e;d.$render=function(){var a=new Fa(d.$viewValue);m(c.find("option"),function(c){c.selected=y(a.get(c.value))})};a.$watch(function(){fa(e,d.$viewValue)||(e=U(d.$viewValue),d.$render())});c.bind("change",function(){a.$apply(function(){var a=[];m(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function l(e,f,g){function h(){var a={"":[]},c=[""],d,i,s,u,v;s=g.$modelValue;u=o(e)||[];var w=l?mb(u):u,y,x,z;x=
155
+ {};v=!1;var B,E;p&&(v=new Fa(s));for(z=0;y=w.length,z<y;z++){x[k]=u[l?x[l]=w[z]:z];d=m(e,x)||"";if(!(i=a[d]))i=a[d]=[],c.push(d);p?d=v.remove(n(e,x))!=q:(d=s===n(e,x),v=v||d);B=j(e,x);B=B===q?"":B;i.push({id:l?w[z]:z,label:B,selected:d})}p||(t||s===null?a[""].unshift({id:"",label:"",selected:!v}):v||a[""].unshift({id:"?",label:"",selected:!0}));x=0;for(w=c.length;x<w;x++){d=c[x];i=a[d];if(r.length<=x)s={element:A.clone().attr("label",d),label:i.label},u=[s],r.push(u),f.append(s.element);else if(u=
156
+ r[x],s=u[0],s.label!=d)s.element.attr("label",s.label=d);B=null;z=0;for(y=i.length;z<y;z++)if(d=i[z],v=u[z+1]){B=v.element;if(v.label!==d.label)B.text(v.label=d.label);if(v.id!==d.id)B.val(v.id=d.id);if(B[0].selected!==d.selected)B.prop("selected",v.selected=d.selected)}else d.id===""&&t?E=t:(E=C.clone()).val(d.id).attr("selected",d.selected).text(d.label),u.push({element:E,label:d.label,id:d.id,selected:d.selected}),B?B.after(E):s.element.append(E),B=E;for(z++;u.length>z;)u.pop().element.remove()}for(;r.length>
157
+ x;)r.pop()[0].element.remove()}var i;if(!(i=s.match(d)))throw Error("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+s+"'.");var j=c(i[2]||i[1]),k=i[4]||i[6],l=i[5],m=c(i[3]||""),n=c(i[2]?i[1]:k),o=c(i[7]),r=[[{element:f,label:""}]];t&&(a(t)(e),t.removeClass("ng-scope"),t.remove());f.html("");f.bind("change",function(){e.$apply(function(){var a,c=o(e)||[],d={},h,i,j,m,s,t;if(p){i=[];m=0;for(t=r.length;m<t;m++){a=r[m];j=1;for(s=a.length;j<s;j++)if((h=
158
+ a[j].element)[0].selected)h=h.val(),l&&(d[l]=h),d[k]=c[h],i.push(n(e,d))}}else h=f.val(),h=="?"?i=q:h==""?i=null:(d[k]=c[h],l&&(d[l]=h),i=n(e,d));g.$setViewValue(i)})});g.$render=h;e.$watch(h)}if(i[1]){for(var n=i[0],o=i[1],p=f.multiple,s=f.ngOptions,t=!1,v,C=u(T.createElement("option")),A=u(T.createElement("optgroup")),z=C.clone(),i=0,B=h.children(),r=B.length;i<r;i++)if(B[i].value==""){v=t=B.eq(i);break}n.init(o,t,z);if(p&&(f.required||f.ngRequired)){var E=function(a){o.$setValidity("required",
159
+ !f.required||a&&a.length);return a};o.$parsers.push(E);o.$formatters.unshift(E);f.$observe("required",function(){E(o.$viewValue)})}s?l(e,h,o):p?k(e,h,o):j(e,h,o,n)}}}}],Wd=["$interpolate",function(a){var c={addOption:C,removeOption:C};return{restrict:"E",priority:100,compile:function(d,e){if(w(e.value)){var g=a(d.text(),!0);g||e.$set("value",d.text())}return function(a,d,e){var j=d.parent(),k=j.data("$selectController")||j.parent().data("$selectController");k&&k.databound?d.prop("selected",!1):k=
160
+ c;g?a.$watch(g,function(a,c){e.$set("value",a);a!==c&&k.removeOption(c);k.addOption(a)}):k.addOption(e.value);d.bind("$destroy",function(){k.removeOption(e.value)})}}}}],Xd=I({restrict:"E",terminal:!0});(ca=P.jQuery)?(u=ca,v(ca.fn,{scope:ua.scope,controller:ua.controller,injector:ua.injector,inheritedData:ua.inheritedData}),ab("remove",!0),ab("empty"),ab("html")):u=K;Ya.element=u;(function(a){v(a,{bootstrap:rb,copy:U,extend:v,equals:fa,element:u,forEach:m,injector:sb,noop:C,bind:Ta,toJson:da,fromJson:pb,
161
+ identity:ma,isUndefined:w,isDefined:y,isString:B,isFunction:H,isObject:L,isNumber:Qa,isElement:gc,isArray:E,version:jd,isDate:na,lowercase:z,uppercase:la,callbacks:{counter:0}});sa=lc(P);try{sa("ngLocale")}catch(c){sa("ngLocale",[]).provider("$locale",$c)}sa("ng",["ngLocale"],["$provide",function(a){a.provider("$compile",Db).directive({a:kd,input:cc,textarea:cc,form:ld,script:Td,select:Vd,style:Xd,option:Wd,ngBind:wd,ngBindHtmlUnsafe:yd,ngBindTemplate:xd,ngClass:zd,ngClassEven:Bd,ngClassOdd:Ad,ngCsp:Ed,
162
+ ngCloak:Cd,ngController:Dd,ngForm:md,ngHide:Md,ngInclude:Gd,ngInit:Hd,ngNonBindable:Id,ngPluralize:Jd,ngRepeat:Kd,ngShow:Ld,ngSubmit:Fd,ngStyle:Nd,ngSwitch:Od,ngSwitchWhen:Pd,ngSwitchDefault:Qd,ngOptions:Ud,ngView:Sd,ngTransclude:Rd,ngModel:rd,ngList:td,ngChange:sd,required:dc,ngRequired:dc,ngValue:vd}).directive(lb).directive(ec);a.provider({$anchorScroll:uc,$browser:wc,$cacheFactory:xc,$controller:Cc,$document:Dc,$exceptionHandler:Ec,$filter:Rb,$interpolate:Fc,$http:Wc,$httpBackend:Xc,$location:Jc,
163
+ $log:Kc,$parse:Oc,$route:Rc,$routeParams:Sc,$rootScope:Tc,$q:Pc,$sniffer:Uc,$templateCache:yc,$timeout:ad,$window:Vc})}])})(Ya);u(T).ready(function(){jc(T,rb)})})(window,document);angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>');
js/script.js CHANGED
@@ -1,11 +1,13 @@
1
- (function($){
 
 
2
 
3
  $(document).ready( function() {
4
 
5
- var o = {
6
  pageUrl : document.URL,
7
  pageTitle : document.title,
8
- pageDescription : $('meta[name="description"]').attr('content'),
9
  siteTitle : jpibfi_options.site_title,
10
  imageSelector : jpibfi_options.image_selector,
11
  disabledClasses : jpibfi_options.disabled_classes,
@@ -13,93 +15,200 @@
13
  descriptionOption : jpibfi_options.description_option,
14
  usePostUrl : jpibfi_options.use_post_url == "1",
15
  minImageHeight : jpibfi_options.min_image_height,
16
- minImageWidth : jpibfi_options.min_image_width
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  }
18
 
19
- $('.jpibfi').closest('div').addClass('jpibfi_container');
 
 
 
 
 
 
20
 
21
- var notSelector = createSelectorFromList( o.disabledClasses );
 
 
 
 
22
  //in case of no enabled classes, we need a selector that takes all elements
23
- var filterSelector = createSelectorFromList( o.enabledClasses ) || "*";
24
 
25
- $( o.imageSelector )
 
 
 
 
 
26
  .not( notSelector )
27
  .filter( filterSelector )
28
- .each( function (i) { $( this ).attr('data-indexer', i); } );
 
29
 
30
- function jpibfiAddElements() {
31
 
32
- $("img[data-indexer]").each(function () {
33
- var $image = $(this);
 
 
 
34
 
35
- if ( this.clientWidth < o.minImageWidth || this.clientHeight < o.minImageHeight ) {
36
- $image.removeAttr( 'data-indexer' );
37
- return;
 
 
 
 
 
 
 
38
  }
 
 
39
 
40
- var indexer = $image.attr("data-indexer"),
41
- bookmark = 'http://pinterest.com/pin/create/bookmarklet/?is_video=' + encodeURI('false');
 
 
 
 
42
 
43
- $image.after('<div class="pinit-overlay" data-indexer= "' + indexer + '"><a class="pinit-button" href="' + bookmark + '" data-indexer= "' + indexer + '">Pin It</a></div>');
44
 
45
- var position = $image.offset();
 
46
 
47
- $('.pinit-overlay[data-indexer="' + indexer + '"]')
48
- .css({
49
- height: this.clientHeight + 'px',
50
- width: this.clientWidth + 'px'
51
- })
52
- .show()
53
- .offset({ left: position.left, top: position.top });
 
 
 
 
54
  });
55
 
56
- $('.pinit-button').click( function () {
57
- var index = $(this).attr("data-indexer");
58
- var $image = $('img[data-indexer="' + index+ '"]');
59
 
60
- //Bookmark description is created on click because sometimes it's lazy loaded
61
- var bookmarkDescription = "", descriptionForUrl = "", bookmarkUrl = "";
62
 
63
- //if usePostUrl feature is active, we need to get the data
64
- if ( o.usePostUrl ) {
65
- var $inputWithData = $image.closest("div.jpibfi_container").children("input.jpibfi").first();
 
66
 
67
- if ( $inputWithData.length ) {
68
- descriptionForUrl = $inputWithData.attr("data-jpibfi-description")
69
- bookmarkUrl = $inputWithData.attr("data-jpibfi-url");
70
- }
71
- }
72
- bookmarkUrl = bookmarkUrl || o.pageUrl;
 
 
73
 
74
- if ( o.descriptionOption == 3 )
75
- bookmarkDescription = $image.attr('title') || $image.attr('alt');
76
- else if ( o.descriptionOption == 2 )
77
- bookmarkDescription = descriptionForUrl || o.pageDescription;
78
- else if ( o.descriptionOption == 4 )
79
- bookmarkDescription = o.siteTitle;
80
 
81
- bookmarkDescription = bookmarkDescription || ( descriptionForUrl || o.pageTitle );
82
 
83
- var imageUrl = $(this).attr('href') + "&url=" + encodeURI(bookmarkUrl) + "&media=" + encodeURI ( $image.data('media') || $image[0].src )
84
- + '&description=' + encodeURIComponent(bookmarkDescription);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
- window.open(imageUrl, 'Pinterest', 'width=632,height=253,status=0,toolbar=0,menubar=0,location=1,scrollbars=1');
87
- return false;
 
 
 
 
 
 
 
 
88
  });
89
 
 
 
 
90
 
91
- $('div.pinit-overlay').hover( function() {
92
- var indexer = $(this).attr("data-indexer");
93
- $('.pinit-button[data-indexer="' + indexer + '"]').show();
94
- }, function() {
95
- var indexer = $(this).attr("data-indexer");
96
- $('.pinit-button[data-indexer="' + indexer + '"]').hide();
97
  });
98
 
99
  }
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  function jpibfiRemoveElements() {
102
- $("div.pinit-overlay").remove();
 
103
  }
104
 
105
  $(window).load( jpibfiAddElements );
@@ -109,26 +218,94 @@
109
  jpibfiAddElements();
110
  });
111
 
112
- //UTILITY FUNCTIONS
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
 
114
- //function creates a selector from a list of semicolon separated classes
115
- function createSelectorFromList(classes) {
116
-
117
- var arrayOfClasses = classes.split(';');
118
 
119
- var selector = "";
120
 
121
- for (var index in arrayOfClasses) {
122
- if (arrayOfClasses[index])
123
- selector += '.' + arrayOfClasses[index] + ',';
124
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
125
 
126
- if (selector)
127
- selector = selector.substr(0, selector.length - 1);
 
 
 
 
 
128
 
129
- return selector;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
 
132
- })
 
133
 
134
  })(jQuery);
1
+ ;(function($){
2
+
3
+ var jpibfi_debug = false;
4
 
5
  $(document).ready( function() {
6
 
7
+ var settings = {
8
  pageUrl : document.URL,
9
  pageTitle : document.title,
10
+ pageDescription : $('meta[name="description"]').attr('content') || "",
11
  siteTitle : jpibfi_options.site_title,
12
  imageSelector : jpibfi_options.image_selector,
13
  disabledClasses : jpibfi_options.disabled_classes,
15
  descriptionOption : jpibfi_options.description_option,
16
  usePostUrl : jpibfi_options.use_post_url == "1",
17
  minImageHeight : jpibfi_options.min_image_height,
18
+ minImageWidth : jpibfi_options.min_image_width,
19
+ mode : jpibfi_options.mode,
20
+ buttonPosition : jpibfi_options.button_position
21
+ }
22
+
23
+ var pinButtonDimensions = {
24
+ height: parseInt( jpibfi_options.pin_image_height ),
25
+ width: parseInt( jpibfi_options.pin_image_width )
26
+ }
27
+
28
+ var pinButtonMargins = {
29
+ top: parseInt( jpibfi_options.button_margin_top ),
30
+ right: parseInt( jpibfi_options.button_margin_right ),
31
+ bottom: parseInt( jpibfi_options.button_margin_bottom ),
32
+ left: parseInt( jpibfi_options.button_margin_left )
33
  }
34
 
35
+ jpibfi_debug = '1' == jpibfi_options.debug;
36
+
37
+ jpibfiLog( settings );
38
+ jpibfiLog( pinButtonDimensions );
39
+ jpibfiLog( pinButtonMargins );
40
+
41
+
42
 
43
+ var $containers = $('.jpibfi').closest('div').addClass('jpibfi_container');
44
+
45
+ jpibfiLog( 'Number of containers added: ' + $containers.length );
46
+
47
+ var notSelector = createSelectorFromList( settings.disabledClasses );
48
  //in case of no enabled classes, we need a selector that takes all elements
49
+ var filterSelector = createSelectorFromList( settings.enabledClasses ) || "*";
50
 
51
+ jpibfiLog( 'Image selector: ' + settings.imageSelector );
52
+ jpibfiLog( 'Filter selector: ' + filterSelector );
53
+ jpibfiLog( 'Not selector: ' + notSelector );
54
+
55
+ var imageCount = 0;
56
+ $( settings.imageSelector )
57
  .not( notSelector )
58
  .filter( filterSelector )
59
+ .each( function (i) { $( this ).attr('data-jpibfi-indexer', i); imageCount++; } );
60
+ jpibfiLog( 'Images caught by selectors: ' + imageCount );
61
 
62
+ //EVENT HANDLING
63
 
64
+ //handles all click on the pin it button
65
+ $( document ).delegate( 'a.pinit-button', 'click', function() {
66
+ jpibfiLog( 'Pin In button clicked' );
67
+ var index = $(this).attr("data-jpibfi-indexer");
68
+ var $image = $('img[data-jpibfi-indexer="' + index+ '"]');
69
 
70
+ //Bookmark description is created on click because sometimes it's lazy loaded
71
+ var bookmarkDescription = "", descriptionForUrl = "", bookmarkUrl = "";
72
+
73
+ //if usePostUrl feature is active, we need to get the data
74
+ if ( settings.usePostUrl ) {
75
+ var $inputWithData = $image.closest("div.jpibfi_container").children("input.jpibfi").first();
76
+
77
+ if ( $inputWithData.length ) {
78
+ descriptionForUrl = $inputWithData.attr("data-jpibfi-description")
79
+ bookmarkUrl = $inputWithData.attr("data-jpibfi-url");
80
  }
81
+ }
82
+ bookmarkUrl = bookmarkUrl || settings.pageUrl;
83
 
84
+ if ( settings.descriptionOption == 3 )
85
+ bookmarkDescription = $image.attr('title') || $image.attr('alt');
86
+ else if ( settings.descriptionOption == 2 )
87
+ bookmarkDescription = descriptionForUrl || settings.pageDescription;
88
+ else if ( settings.descriptionOption == 4 )
89
+ bookmarkDescription = settings.siteTitle;
90
 
91
+ bookmarkDescription = bookmarkDescription || ( descriptionForUrl || settings.pageTitle );
92
 
93
+ var imageUrl = 'http://pinterest.com/pin/create/bookmarklet/?is_video=' + encodeURI('false') + "&url=" + encodeURI(bookmarkUrl) + "&media=" + encodeURI ( $image.data('media') || $image[0].src )
94
+ + '&description=' + encodeURIComponent(bookmarkDescription);
95
 
96
+ window.open(imageUrl, 'Pinterest', 'width=632,height=253,status=0,toolbar=0,menubar=0,location=1,scrollbars=1');
97
+ return false;
98
+ });
99
+
100
+ if ( 'static' == settings.mode) {
101
+
102
+ jpibfiLog( 'Adding static mode delegates');
103
+ $( document).delegate( 'div.pinit-overlay', 'hover', function() {
104
+ var indexer = $(this).attr("data-jpibfi-indexer");
105
+ $('.pinit-button[data-jpibfi-indexer="' + indexer + '"]').toggle();
106
+ $('img[data-jpibfi-indexer="' + indexer + '"]').toggleClass( 'pinit-hover' );
107
  });
108
 
109
+ } else if ( 'dynamic' == settings.mode ) {
 
 
110
 
111
+ jpibfiLog( 'Adding dynamic mode delegates');
 
112
 
113
+ $( document ).delegate( 'a.pinit-button', 'mouseenter', function() {
114
+ var $button = $( this );
115
+ clearTimeout( $button.data('jpibfi-timeoutId') );
116
+ });
117
 
118
+ $( document ).delegate( 'a.pinit-button', 'mouseleave', function() {
119
+ var $button = $( this );
120
+ var timeoutId = setTimeout( function(){
121
+ $button.remove();
122
+ $('img[data-jpibfi-indexer="' + $button.attr( 'data-jpibfi-indexer' ) + '"]').removeClass( 'pinit-hover' );
123
+ }, 100 );
124
+ $button.data('jpibfi-timeoutId', timeoutId);
125
+ });
126
 
127
+ $( document ).delegate( 'img[data-jpibfi-indexer]', 'mouseenter', function() {
128
+ var $image = $( this );
129
+ var indexer = $image.attr( 'data-jpibfi-indexer' );
 
 
 
130
 
131
+ var $button = $('a.pinit-button[data-jpibfi-indexer="' + indexer + '"]');
132
 
133
+ if ( $button.length == 0 ) {
134
+ //button doesn't exist so we need to create it
135
+ var $button = jpibfiCreatePinitButton( indexer );
136
+ var position = $image.offset();
137
+ var imageDimensions = {
138
+ width: $image.get(0).clientWidth,
139
+ height: $image.get(0).clientHeight
140
+ }
141
+
142
+ switch( settings.buttonPosition ){
143
+ case '0': //top-left
144
+ position.left += pinButtonMargins.left;
145
+ position.top += pinButtonMargins.top;
146
+ break;
147
+ case '1': //top-right
148
+ position.top += pinButtonMargins.top;
149
+ position.left = position.left + imageDimensions.width - pinButtonMargins.right - pinButtonDimensions.width;
150
+ break;
151
+ case '2': //bottom-left;
152
+ position.left += pinButtonMargins.left;
153
+ position.top = position.top + imageDimensions.height - pinButtonMargins.bottom - pinButtonDimensions.height;
154
+ break;
155
+ case '3': //bottom-right
156
+ position.left = position.left + imageDimensions.width - pinButtonMargins.right - pinButtonDimensions.width;
157
+ position.top = position.top + imageDimensions.height - pinButtonMargins.bottom - pinButtonDimensions.height;
158
+ break;
159
+ case '4': //middle
160
+ position.left = Math.round( position.left + imageDimensions.width / 2 - pinButtonDimensions.width / 2 );
161
+ position.top = Math.round( position.top + imageDimensions.height / 2 - pinButtonDimensions.height / 2 );
162
+ break;
163
+ }
164
 
165
+ $image.after( $button );
166
+ $button
167
+ .show()
168
+ .offset({ left: position.left, top: position.top });
169
+ } else {
170
+ //button exists, we need to clear the timeout that has to remove it
171
+ clearTimeout( $button.data('jpibfi-timeoutId') );
172
+ }
173
+
174
+ $( 'img[data-jpibfi-indexer="' + $button.attr( 'data-jpibfi-indexer' ) + '"]' ).addClass( 'pinit-hover' );
175
  });
176
 
177
+ $( document).delegate( 'img[data-jpibfi-indexer]', 'mouseleave', function() {
178
+ var indexer = $(this).attr("data-jpibfi-indexer");
179
+ var $button = $('a.pinit-button[data-jpibfi-indexer="' + indexer + '"]');
180
 
181
+ var timeoutId = setTimeout(function(){
182
+ $button.remove();
183
+ $('img[data-jpibfi-indexer="' + $button.attr( 'data-jpibfi-indexer' ) + '"]').removeClass( 'pinit-hover' );
184
+ }, 100 );
185
+ $button.data('jpibfi-timeoutId', timeoutId);
 
186
  });
187
 
188
  }
189
 
190
+ function jpibfiAddElements() {
191
+ jpibfiLog( 'Add Elements called' );
192
+
193
+ var imageCount = 0;
194
+ $("img[data-jpibfi-indexer]").each(function () {
195
+ var $image = $(this);
196
+
197
+ if ( this.clientWidth < settings.minImageWidth || this.clientHeight < settings.minImageHeight ) {
198
+ $image.removeAttr( 'data-jpibfi-indexer' );
199
+ return;
200
+ }
201
+ if ( settings.mode == 'static' )
202
+ jpibfiCreateAndShowOverlayDiv( $image, settings.buttonPosition );
203
+
204
+ imageCount++;
205
+ });
206
+ jpibfiLog( 'Images caught after filtering: ' + imageCount );
207
+ }
208
+
209
  function jpibfiRemoveElements() {
210
+ jpibfiLog( 'Remove Elements called' );
211
+ $( 'div.pinit-overlay' ).remove();
212
  }
213
 
214
  $(window).load( jpibfiAddElements );
218
  jpibfiAddElements();
219
  });
220
 
221
+ });
222
+
223
+ //UTILITY FUNCTIONS
224
+
225
+ //functions logs a message or object data if plugin runs in debug mode
226
+ function jpibfiLog( o ) {
227
+ if ( jpibfi_debug && console && console.log ) {
228
+ if ( 'string' == typeof o || o instanceof String ) {
229
+ console.log( 'jpibfi debug: ' + o );
230
+ } else if ( 'object' == typeof o && typeof JSON !== 'undefined' && typeof JSON.stringify === 'function' ) {
231
+ console.log( 'jpibfi debug: ' + JSON.stringify( o, null, 4 ) );
232
+ } else if ( 'object' == typeof o ) {
233
+ var out = '';
234
+ for (var p in o)
235
+ out += p + ': ' + o[p] + '\n';
236
+ console.log( 'jpibfi debug: ' + out );
237
+ }
238
+ }
239
+ };
240
 
241
+ function jpibfiCreateAndShowOverlayDiv( $image, buttonPosition ) {
242
+ var position = $image.offset();
 
 
243
 
244
+ var $overlay = jpibfiCreateOverlayDiv( $image, buttonPosition );
245
 
246
+ $image.after( $overlay );
247
+
248
+ $overlay
249
+ .css({
250
+ height: $image.get(0).clientHeight + 'px',
251
+ width: $image.get(0).clientWidth + 'px'
252
+ })
253
+ .show()
254
+ .offset({ left: position.left, top: position.top });
255
+
256
+ return $overlay;
257
+ }
258
+
259
+ //function creates an overlay div that covers the image
260
+ function jpibfiCreateOverlayDiv( $image, buttonPosition ) {
261
+
262
+ var indexer = $image.attr("data-jpibfi-indexer");
263
 
264
+ return jQuery('<div/>', {
265
+ "class": 'pinit-overlay',
266
+ "data-jpibfi-indexer": indexer,
267
+ title: $image.attr( 'title' ) || ( $image.attr( 'alt' ) || '' ),
268
+ html: jpibfiCreatePinitButton( indexer).addClass( jpibfiButtonPositionToClass( buttonPosition ))
269
+ })
270
+ }
271
 
272
+ function jpibfiCreatePinitButton( indexer ){
273
+
274
+ return jQuery('<a/>', {
275
+ href: '#',
276
+ "class": 'pinit-button',
277
+ "data-jpibfi-indexer": indexer,
278
+ text: "Pin It"
279
+ });
280
+ }
281
+
282
+ //returns class name based on given button position
283
+ function jpibfiButtonPositionToClass( buttonPosition ) {
284
+ switch( buttonPosition ){
285
+ case '0': return 'pinit-top-left';
286
+ case '1': return 'pinit-top-right';
287
+ case '2': return 'pinit-bottom-left';
288
+ case '3': return 'pinit-bottom-right';
289
+ case '4': return 'pinit-middle';
290
+ default: return '';
291
  }
292
+ }
293
+
294
+ //function creates a selector from a list of semicolon separated classes
295
+ function createSelectorFromList(classes) {
296
+ var arrayOfClasses = classes.split(';');
297
+
298
+ var selector = "";
299
+
300
+ for (var index in arrayOfClasses) {
301
+ if (arrayOfClasses[index])
302
+ selector += '.' + arrayOfClasses[index] + ',';
303
+ }
304
+
305
+ if (selector)
306
+ selector = selector.substr(0, selector.length - 1);
307
 
308
+ return selector;
309
+ }
310
 
311
  })(jQuery);
js/script.min.js CHANGED
@@ -1 +1 @@
1
- (function(e){e(document).ready(function(){function i(){e("img[data-indexer]").each(function(){var n=e(this);if(this.clientWidth<t.minImageWidth||this.clientHeight<t.minImageHeight){n.removeAttr("data-indexer");return}var r=n.attr("data-indexer"),i="http://pinterest.com/pin/create/bookmarklet/?is_video="+encodeURI("false");n.after('<div class="pinit-overlay" data-indexer= "'+r+'"><a class="pinit-button" href="'+i+'" data-indexer= "'+r+'">Pin It</a></div>');var s=n.offset();e('.pinit-overlay[data-indexer="'+r+'"]').css({height:this.clientHeight+"px",width:this.clientWidth+"px"}).show().offset({left:s.left,top:s.top})});e(".pinit-button").click(function(){var n=e(this).attr("data-indexer");var r=e('img[data-indexer="'+n+'"]');var i="",s="",o="";if(t.usePostUrl){var u=r.closest("div.jpibfi_container").children("input.jpibfi").first();if(u.length){s=u.attr("data-jpibfi-description");o=u.attr("data-jpibfi-url")}}o=o||t.pageUrl;if(t.descriptionOption==3)i=r.attr("title")||r.attr("alt");else if(t.descriptionOption==2)i=s||t.pageDescription;else if(t.descriptionOption==4)i=t.siteTitle;i=i||s||t.pageTitle;var a=e(this).attr("href")+"&url="+encodeURI(o)+"&media="+encodeURI(r.data("media")||r[0].src)+"&description="+encodeURIComponent(i);window.open(a,"Pinterest","width=632,height=253,status=0,toolbar=0,menubar=0,location=1,scrollbars=1");return false});e("div.pinit-overlay").hover(function(){var t=e(this).attr("data-indexer");e('.pinit-button[data-indexer="'+t+'"]').show()},function(){var t=e(this).attr("data-indexer");e('.pinit-button[data-indexer="'+t+'"]').hide()})}function s(){e("div.pinit-overlay").remove()}function o(e){var t=e.split(";");var n="";for(var r in t){if(t[r])n+="."+t[r]+","}if(n)n=n.substr(0,n.length-1);return n}var t={pageUrl:document.URL,pageTitle:document.title,pageDescription:e('meta[name="description"]').attr("content"),siteTitle:jpibfi_options.site_title,imageSelector:jpibfi_options.image_selector,disabledClasses:jpibfi_options.disabled_classes,enabledClasses:jpibfi_options.enabled_classes,descriptionOption:jpibfi_options.description_option,usePostUrl:jpibfi_options.use_post_url=="1",minImageHeight:jpibfi_options.min_image_height,minImageWidth:jpibfi_options.min_image_width};e(".jpibfi").closest("div").addClass("jpibfi_container");var n=o(t.disabledClasses);var r=o(t.enabledClasses)||"*";e(t.imageSelector).not(n).filter(r).each(function(t){e(this).attr("data-indexer",t)});e(window).load(i);e(window).resize(function(){s();i()})})})(jQuery)
1
+ (function(e){function n(e){if(t&&console&&console.log){if("string"==typeof e||e instanceof String){console.log("jpibfi debug: "+e)}else if("object"==typeof e&&typeof JSON!=="undefined"&&typeof JSON.stringify==="function"){console.log("jpibfi debug: "+JSON.stringify(e,null,4))}else if("object"==typeof e){var n="";for(var r in e)n+=r+": "+e[r]+"\n";console.log("jpibfi debug: "+n)}}}function r(e,t){var n=e.offset();var r=i(e,t);e.after(r);r.css({height:e.get(0).clientHeight+"px",width:e.get(0).clientWidth+"px"}).show().offset({left:n.left,top:n.top});return r}function i(e,t){var n=e.attr("data-jpibfi-indexer");return jQuery("<div/>",{"class":"pinit-overlay","data-jpibfi-indexer":n,title:e.attr("title")||e.attr("alt")||"",html:s(n).addClass(o(t))})}function s(e){return jQuery("<a/>",{href:"#","class":"pinit-button","data-jpibfi-indexer":e,text:"Pin It"})}function o(e){switch(e){case"0":return"pinit-top-left";case"1":return"pinit-top-right";case"2":return"pinit-bottom-left";case"3":return"pinit-bottom-right";case"4":return"pinit-middle";default:return""}}function u(e){var t=e.split(";");var n="";for(var r in t){if(t[r])n+="."+t[r]+","}if(n)n=n.substr(0,n.length-1);return n}var t=false;e(document).ready(function(){function p(){n("Add Elements called");var t=0;e("img[data-jpibfi-indexer]").each(function(){var n=e(this);if(this.clientWidth<i.minImageWidth||this.clientHeight<i.minImageHeight){n.removeAttr("data-jpibfi-indexer");return}if(i.mode=="static")r(n,i.buttonPosition);t++});n("Images caught after filtering: "+t)}function d(){n("Remove Elements called");e("div.pinit-overlay").remove()}var i={pageUrl:document.URL,pageTitle:document.title,pageDescription:e('meta[name="description"]').attr("content")||"",siteTitle:jpibfi_options.site_title,imageSelector:jpibfi_options.image_selector,disabledClasses:jpibfi_options.disabled_classes,enabledClasses:jpibfi_options.enabled_classes,descriptionOption:jpibfi_options.description_option,usePostUrl:jpibfi_options.use_post_url=="1",minImageHeight:jpibfi_options.min_image_height,minImageWidth:jpibfi_options.min_image_width,mode:jpibfi_options.mode,buttonPosition:jpibfi_options.button_position};var o={height:parseInt(jpibfi_options.pin_image_height),width:parseInt(jpibfi_options.pin_image_width)};var a={top:parseInt(jpibfi_options.button_margin_top),right:parseInt(jpibfi_options.button_margin_right),bottom:parseInt(jpibfi_options.button_margin_bottom),left:parseInt(jpibfi_options.button_margin_left)};t="1"==jpibfi_options.debug;n(i);n(o);n(a);var f=e(".jpibfi").closest("div").addClass("jpibfi_container");n("Number of containers added: "+f.length);var l=u(i.disabledClasses);var c=u(i.enabledClasses)||"*";n("Image selector: "+i.imageSelector);n("Filter selector: "+c);n("Not selector: "+l);var h=0;e(i.imageSelector).not(l).filter(c).each(function(t){e(this).attr("data-jpibfi-indexer",t);h++});n("Images caught by selectors: "+h);e(document).delegate("a.pinit-button","click",function(){n("Pin In button clicked");var t=e(this).attr("data-jpibfi-indexer");var r=e('img[data-jpibfi-indexer="'+t+'"]');var s="",o="",u="";if(i.usePostUrl){var a=r.closest("div.jpibfi_container").children("input.jpibfi").first();if(a.length){o=a.attr("data-jpibfi-description");u=a.attr("data-jpibfi-url")}}u=u||i.pageUrl;if(i.descriptionOption==3)s=r.attr("title")||r.attr("alt");else if(i.descriptionOption==2)s=o||i.pageDescription;else if(i.descriptionOption==4)s=i.siteTitle;s=s||o||i.pageTitle;var f="http://pinterest.com/pin/create/bookmarklet/?is_video="+encodeURI("false")+"&url="+encodeURI(u)+"&media="+encodeURI(r.data("media")||r[0].src)+"&description="+encodeURIComponent(s);window.open(f,"Pinterest","width=632,height=253,status=0,toolbar=0,menubar=0,location=1,scrollbars=1");return false});if("static"==i.mode){n("Adding static mode delegates");e(document).delegate("div.pinit-overlay","hover",function(){var t=e(this).attr("data-jpibfi-indexer");e('.pinit-button[data-jpibfi-indexer="'+t+'"]').toggle();e('img[data-jpibfi-indexer="'+t+'"]').toggleClass("pinit-hover")})}else if("dynamic"==i.mode){n("Adding dynamic mode delegates");e(document).delegate("a.pinit-button","mouseenter",function(){var t=e(this);clearTimeout(t.data("jpibfi-timeoutId"))});e(document).delegate("a.pinit-button","mouseleave",function(){var t=e(this);var n=setTimeout(function(){t.remove();e('img[data-jpibfi-indexer="'+t.attr("data-jpibfi-indexer")+'"]').removeClass("pinit-hover")},100);t.data("jpibfi-timeoutId",n)});e(document).delegate("img[data-jpibfi-indexer]","mouseenter",function(){var t=e(this);var n=t.attr("data-jpibfi-indexer");var r=e('a.pinit-button[data-jpibfi-indexer="'+n+'"]');if(r.length==0){var r=s(n);var u=t.offset();var f={width:t.get(0).clientWidth,height:t.get(0).clientHeight};switch(i.buttonPosition){case"0":u.left+=a.left;u.top+=a.top;break;case"1":u.top+=a.top;u.left=u.left+f.width-a.right-o.width;break;case"2":u.left+=a.left;u.top=u.top+f.height-a.bottom-o.height;break;case"3":u.left=u.left+f.width-a.right-o.width;u.top=u.top+f.height-a.bottom-o.height;break;case"4":u.left=Math.round(u.left+f.width/2-o.width/2);u.top=Math.round(u.top+f.height/2-o.height/2);break}t.after(r);r.show().offset({left:u.left,top:u.top})}else{clearTimeout(r.data("jpibfi-timeoutId"))}e('img[data-jpibfi-indexer="'+r.attr("data-jpibfi-indexer")+'"]').addClass("pinit-hover")});e(document).delegate("img[data-jpibfi-indexer]","mouseleave",function(){var t=e(this).attr("data-jpibfi-indexer");var n=e('a.pinit-button[data-jpibfi-indexer="'+t+'"]');var r=setTimeout(function(){n.remove();e('img[data-jpibfi-indexer="'+n.attr("data-jpibfi-indexer")+'"]').removeClass("pinit-hover")},100);n.data("jpibfi-timeoutId",r)})}e(window).load(p);e(window).resize(function(){d();p()})});})(jQuery)
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === jQuery Pin It Button For Images ===
2
- Contributors: mrsztuczkens, redearthdesign, brocheafoin, Rob W
3
  Donate link: http://bit.ly/Uw2mEP
4
  Tags: pinterest, pin it, button, image, images, pinit, social media, hover, click, photo, photos
5
  Requires at least: 3.3.0
6
- Tested up to: 3.5.2
7
- Stable tag: 1.00
8
  License: GPLv2 or later
9
 
10
  Highlights images on hover and adds a Pinterest "Pin It" button over them for easy pinning.
@@ -69,6 +69,11 @@ Please report them in the plugin's support forum on Wordpress.org.
69
 
70
  == Changelog ==
71
 
 
 
 
 
 
72
  = 1.00 =
73
  * Released 2013-08-09
74
  * Major source code redesign
@@ -138,6 +143,9 @@ Please report them in the plugin's support forum on Wordpress.org.
138
 
139
  == Upgrade Notice ==
140
 
 
 
 
141
  = 1.00 =
142
  Major source code redesign, new settings panel and fix to a little glitch from previous version of the plugin.
143
 
1
  === jQuery Pin It Button For Images ===
2
+ Contributors: mrsztuczkens, redearthdesign, brocheafoin, robertark
3
  Donate link: http://bit.ly/Uw2mEP
4
  Tags: pinterest, pin it, button, image, images, pinit, social media, hover, click, photo, photos
5
  Requires at least: 3.3.0
6
+ Tested up to: 3.6
7
+ Stable tag: 1.10
8
  License: GPLv2 or later
9
 
10
  Highlights images on hover and adds a Pinterest "Pin It" button over them for easy pinning.
69
 
70
  == Changelog ==
71
 
72
+ = 1.10 =
73
+ * Released 2013-08-21
74
+ * Added dynamic mode that allows users to download the image and fixes many issues with the transparency layer
75
+ * Removed the ability to add custom css to the Pin It button, but added the ability to change margins
76
+
77
  = 1.00 =
78
  * Released 2013-08-09
79
  * Major source code redesign
143
 
144
  == Upgrade Notice ==
145
 
146
+ = 1.10 =
147
+ This update is recommended for people who had issues with version 1.00 but version 0.99 worked flawlessly. It adds a new mode that allows users to download images and fixes those issues related to version 1.00.
148
+
149
  = 1.00 =
150
  Major source code redesign, new settings panel and fix to a little glitch from previous version of the plugin.
151