Permalink
Browse files

seperating plgjin init for d6 and d7 completly

  • Loading branch information...
EugenMayer committed Dec 1, 2011
1 parent d1d0257 commit 7f173b67917c718d16b1c0b999f9cac226ae4879
Showing with 12 additions and 10 deletions.
  1. +1 −7 js/{tagging.init.js → tagging.init.d6.js}
  2. +5 −0 js/tagging.init.d7.js
  3. +1 −1 tagging.info
  4. +1 −1 tagging_d6.class.inc
  5. +4 −1 tagging_d7.class.inc
@@ -10,12 +10,6 @@
}
};
obj.attach();
- return obj;
- };
-
- Drupal.behaviors.tagging_d7 = {
- attach: function(context, settings) {
- $('input.tagging-widget-input:not(.tagging-processed)').tagging();
- }
+ //return obj;
};
})(jQuery);
View
@@ -0,0 +1,5 @@
+Drupal.behaviors.tagging_d7 = {
+ attach: function(context, settings) {
+ $('input.tagging-widget-input:not(.tagging-processed)').tagging();
+ }
+};
View
@@ -1,6 +1,6 @@
name = Tagging
description = This widget is replacing the default Drupal-Tagging-Interface with a more visual driven one, to make tagging even easier. (by <a href="http://kontextwork.de"KontextWork</a>)
package = "Drupal Wiki"
-core = 7.x
+core = 6.x
dependencies[] = taxonomy
project = "tagging"
View
@@ -193,7 +193,7 @@ class tagging_d6 extends tagging_base {
public function _tagging_widget_javascript($form_element = null, &$form_state = array()) {
drupal_add_css(drupal_get_path('module', 'tagging') . '/css/tagging.css');
drupal_add_js(drupal_get_path('module', 'tagging') . '/js/tagging.plugin.js');
- drupal_add_js(drupal_get_path('module', 'tagging') . '/js/tagging.init.js');
+ drupal_add_js(drupal_get_path('module', 'tagging') . '/js/tagging.init.d6.js');
return $form_element;
}
View
@@ -54,7 +54,10 @@ class tagging_d7 extends tagging_d6 {
}
public function _tagging_widget_javascript($form_element = null, &$form_state = array()) {
- $form_element = parent::_tagging_widget_javascript($form_element, $form_state);
+ drupal_add_css(drupal_get_path('module', 'tagging') . '/css/tagging.css');
+ drupal_add_js(drupal_get_path('module', 'tagging') . '/js/tagging.plugin.js');
+ // WE init the D7 version instead
+ drupal_add_js(drupal_get_path('module', 'tagging') . '/js/tagging.init.d7.js');
return $form_element;
}
}

0 comments on commit 7f173b6

Please sign in to comment.