mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 09:12:41 +01:00
24 lines
571 B
JavaScript
24 lines
571 B
JavaScript
|
/**
|
||
|
* @provides javelin-behavior-phame-post-blogs
|
||
|
* @requires javelin-behavior
|
||
|
* javelin-dom
|
||
|
*/
|
||
|
|
||
|
JX.behavior('phame-post-blogs', function(config) {
|
||
|
|
||
|
var visibility_select = JX.$(config.visibility.select_id);
|
||
|
var blogs_widget = JX.$(config.blogs.checkbox_id);
|
||
|
|
||
|
var visibilityCallback = function(e) {
|
||
|
if (visibility_select.value == config.visibility.published) {
|
||
|
JX.DOM.show(blogs_widget);
|
||
|
} else {
|
||
|
JX.DOM.hide(blogs_widget);
|
||
|
}
|
||
|
e.kill();
|
||
|
}
|
||
|
|
||
|
JX.DOM.listen(visibility_select, 'change', null, visibilityCallback);
|
||
|
|
||
|
});
|