PHP Classes

File: WIMembers/WICore/WIJ/WICore.js

Recommend this page to a friend!
  Classes of Jules Warner   WICMS   WIMembers/WICore/WIJ/WICore.js   Download  
File: WIMembers/WICore/WIJ/WICore.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WICMS
Database driven content management system with PDO
Author: By
Last change: WI CMS

I am in process of building up my own cms system, its not quiet complete
yet.
There are multiple PDO classes, database driven, in process of making an
installer package for it.
The back end is being built UI with drag and drop, for a simple set up
Date: 7 years ago
Size: 2,122 bytes
 

Contents

Class file image Download
/// WICore NAMESPACe var WICore = {}; // put the button into loading state WICore.loadingButton = function(button, LoadingText) { oldText = button.text(); button.attr("rel", oldText) .text(LoadingText) .addClass("disabled") .attr('disabled', "disabled"); }; // this returns the button back to normal state WICore.removeLoadingButton = function (button) { var oldText = button.attr('rel'); button.text(oldText) .removeClass("disabled") .removeAttr("disabled") .removeAttr("rel"); }; // append the success message to provided parent client WICore.displaySuccessMessage = function(parentElement, message) { $(".alert-success").remove(); var div = ("<div class='alert alert-success'>"+message+"</div>"); parentElement.append(div); }; // append error message to an input element WICore.displayErrorMessage = function(element, message) { var controlGroup = element.parents(".control-group"); controlGroup.addClass("error").addClass("has-error"); if(typeof message !== "undefined") { var helpBlock = $("<span class='help-inline text-error'>"+message+"</span>"); controlGroup.find(".controls").append(helpBlock); } }; // remove all error messages from all input fields WICore.removeErrorMessages = function() { $(".control-group").removeClass("error").removeClass("has-error"); $(".help-inline").remove(); }; // validate email format WICore.validateEmail = function (email) { var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; return regex.test(email); }; //get a parameter from the url WICore.urlParam = function(name) { return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null; }; WICore.other = function() { parentElement = $(".other"); var div = ("<div class='topicVote' id='topicVote'><textarea id='textarea' vote='other' class='voting' rows='4' cols='25'></textarea><button id='othervote'>Save</button></div>"); parentElement.append(div); }