PHP Classes

File: engine/modules/core/node/js/node.js

Recommend this page to a friend!
  Classes of Aldo Tripiciano   Quanta CMS   engine/modules/core/node/js/node.js   Download  
File: engine/modules/core/node/js/node.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Quanta CMS
Manage content that works without a database
Author: By
Last change:
Date: 5 years ago
Size: 2,613 bytes
 

Contents

Class file image Download
$(document).bind('refresh', function() { // Delete Node link behavior. $('.delete-link').off('click').on('click', function(e) { openShadow({ module: 'node', context: 'node_delete', widget: 'single', components: ['node_delete_form'], node: $(this).attr('data-rel'), redirect: $(this).data('redirect') }); e.preventDefault(); }); // Edit Node link behavior. $('.edit-link').off('click').on('click', function(e) { // TODO: select default components in a hook. var components = (($(this).attr('data-components') != undefined) ? ($(this).attr('data-components').split(',')) : ['node_form', 'file_form', 'manager_form', 'access_form', 'status_form']); var shadow = { module : 'node', context: 'node_edit', widget: $(this).data('widget'), components: components, node: $(this).data('rel'), redirect: $(this).data('redirect') }; if ($(this).data('language') != undefined) { shadow.language = $(this).attr('data-language'); } if ($(this).data('manager') != undefined) { shadow.manager = $(this).attr('data-manager'); } openShadow(shadow); e.preventDefault(); }); // Add Node link behavior. $('.add-link').off('click').on('click', function(e) { var components = (($(this).attr('data-components') != undefined) ? ($(this).attr('data-components').split(',')) : ['node_form', 'file_form']); var shadow = { module: 'node', context: 'node_add', widget: $(this).attr('data-widget'), language: $(this).attr('data-language'), components: components, node: $(this).attr('data-rel') }; if ($(this).data('language') != undefined) { shadow.language = $(this).attr('data-language'); } if ($(this).data('manager') != undefined) { shadow.manager = $(this).attr('data-manager'); } openShadow(shadow); e.preventDefault(); }); $('.node-item-actions').parent() // TO BE COMPLETED .off('mouseenter').on('mouseenter', function() { $(this).parent().css('opacity', '0.8'); $(this).children('.node-item-actions').show(); }) .off('mouseleave').on('mouseleave', function() { $(this).parent().css('opacity', '1'); $(this).children('.node-item-actions').hide(); }); });