PHP Classes

File: WIAdmin/WICore/WIJ/WIShop.js

Recommend this page to a friend!
  Classes of Jules Warner   WICMS   WIAdmin/WICore/WIJ/WIShop.js   Download  
File: WIAdmin/WICore/WIJ/WIShop.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WICMS
Database driven content management system with PDO
Author: By
Last change:
Date: 6 years ago
Size: 1,888 bytes
 

Contents

Class file image Download
/*********** ** WISITE NAMESPACE **************/ var WIShop = {}; WIShop.ChangeProduct = function(pid) { event.preventDefault(); //alert('click'); jQuery.noConflict(); var username = $("#modal-username"), Category = $("#modal-Category"), brand = $("#modal-brand"), productname = $("#modal-product-name"), desc = $("#modal-product-desc"), price = $("#modal-product-price"), image = $("#modal-product-image"), ajaxLoading = $("#ajax-loading"), detailsBody = $("#details-body"), modal = $("#modal-product-details"); //display modal modal.css("display", "block"); //modal('show'); // set username (title of modal window) to loading... username.text($_lang.loading); //display ajax loading gif ajaxLoading.show(); //hide details body detailsBody.hide(); $.ajax({ url : "WICore/WIClass/WIAjax.php", method : "POST", data : { action : "selectedProduct", addProduct: 1, pid : pid }, success: function (result) { //parse result as JSON var res = JSON.parse(result); //console.log(res); //update modal fields username .text(res.username); Category .attr("value", res.cat) brand.text(res.brand); productname .text(res.title); desc .text(res.desc); price .text(res.price); image.text(res.image); //hide ajax loading ajaxLoading.hide(); //display user info detailsBody.show(); } }); }; WIShop.hide = function () { modal = $("#modal-product-details"); //display modal modal.css("display", "none"); }