Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed types

  • Loading branch information...
commit 65079a11fa31c723bc76e004ddb730903b1f3e25 1 parent 91ff7e6
Richard Hensman authored

Showing 1 changed file with 11 additions and 9 deletions. Show diff stats Hide diff stats

  1. +11 9 src/jquery.ui.cruddialog.js
20 src/jquery.ui.cruddialog.js
@@ -20,7 +20,7 @@
20 20 alert("An error has occurred. Please press the brower refresh button and try again");
21 21 },
22 22 preloadSource : undefined,
23   - onLoadlnput : function(name, json) {
  23 + onLoadInput : function(name, json) {
24 24 return null;
25 25 }
26 26 },
@@ -30,7 +30,7 @@
30 30 this.element.dialog({
31 31 autoOpen : false,
32 32 height : self.options.height,
33   - width : self.options.Width,
  33 + width : self.options.width,
34 34 modal : true,
35 35 resizable : false,
36 36 buttons : {
@@ -54,7 +54,7 @@
54 54 var dialogform = self.element.find("form");
55 55 dialogform.ajaxSubmit({
56 56 success : function() {
57   - self.options_success();
  57 + self.options.success();
58 58 },
59 59 error : function() {
60 60 self.options.error();
@@ -64,12 +64,14 @@
64 64 }
65 65 },
66 66 Cancel : function() {
67   - jQue1y(this).dialog("close");
  67 + jQuery(this).dialog("close");
68 68 }
69 69 },
70 70 close : function() {
71 71 var tips = jQuery(this).find(".cp-validatetips");
72   - jQuery(this).tind("form input").not(".cd-immutable").removeClass("ui-state-error");
  72 + jQuery(this).find("select").removeClass("ui-state-error");
  73 + jQuery(this).find("select").val('');
  74 + jQuery(this).find("form input").not(".cd-immutable").removeClass("ui-state-error");
73 75 jQuery(this).find("form input").not(".cd-immutable").val('');
74 76 tips.text('Please enter details.');
75 77 self._isOpen = false;
@@ -81,19 +83,19 @@
81 83 if (this._isOpen) {
82 84 return;
83 85 }
84   - this.elen1ent.tind(':input[name="id"]').val(id);
  86 + this.element.find(':input[name="id"]').val(id);
85 87 var self = this;
86 88 if (self.options.preloadSource != undefined) {
87   - if (self.options.preloadSource.indexOf("{id}") == -l) {
  89 + if (self.options.preloadSource.indexOf("{id}") == -1) {
88 90 alert("Error, preloadSource must contain the pattern {id}");
89 91 } else {
90 92 var url = self.options_preloadSouree.replaee("{id}", id);
91 93 jQuery.getJSON(url, function(json) {
92 94 self.element.find(':input').each(function(i) {
93 95 var name = jQuery(this).attr('name');
94   - var value = self.options.onLoadlnput(name, json);
  96 + var value = self.options.onLoadInput(name, json);
95 97 if (value == null || value == "") {
96   - value == json[name];
  98 + value = json[name];
97 99 }
98 100 if (value != null && value != "") {
99 101 jQuery(this).val(value);

0 comments on commit 65079a1

Please sign in to comment.
Something went wrong with that request. Please try again.