root / drupal7 / sites / all / modules / sweaver / plugins / sweaver_plugin_advanced / sweaver_plugin_customcss.js @ fc2c1c7a
1 |
|
---|---|
2 |
(function ($) { |
3 |
|
4 |
/**
|
5 |
* Implements Drupal.Sweaver.invokes.processCSS().
|
6 |
*/
|
7 |
Drupal.Sweaver.invokes.customcss = { |
8 |
execute: function (context, settings) { |
9 |
var fullCss = ''; |
10 |
fullCss = $('#edit-sweaver-plugin-custom-css').val(); |
11 |
return fullCss;
|
12 |
} |
13 |
}; |
14 |
|
15 |
/**
|
16 |
* Preview button onclick behavior.
|
17 |
*/
|
18 |
Drupal.behaviors.SweaverCustomCss = { |
19 |
attach: function (context) { |
20 |
$('#edit-sweaver-plugin-custom-css-button').click(function(){ |
21 |
Drupal.Sweaver.writeCss(); |
22 |
Drupal.Sweaver.setMessage(Drupal.t('Your custom css has been succesfully applied.'), 5000); |
23 |
return false; |
24 |
}); |
25 |
} |
26 |
} |
27 |
|
28 |
})(jQuery); |