author | Dan |
Wed, 09 Jul 2008 17:38:26 -0400 | |
changeset 612 | 3e73e4996d64 |
parent 588 | 20484deb89cd |
child 699 | c7d737202d59 |
permissions | -rw-r--r-- |
1 | 1 |
// The "Dynano" Javascript framework. Similar in syntax to JQuery but only has what Enano needs. |
2 |
||
3 |
var $ = function(id) |
|
4 |
{ |
|
5 |
return new DNobj(id); |
|
6 |
} |
|
7 |
var $dynano = $; |
|
8 |
function DNobj(id) |
|
9 |
{ |
|
582
a38876c0793c
Majorly reworked Javascript runtime stuff to use on-demand loading.
Dan
parents:
493
diff
changeset
|
10 |
if ( id == undefined ) |
a38876c0793c
Majorly reworked Javascript runtime stuff to use on-demand loading.
Dan
parents:
493
diff
changeset
|
11 |
{ |
a38876c0793c
Majorly reworked Javascript runtime stuff to use on-demand loading.
Dan
parents:
493
diff
changeset
|
12 |
return {}; |
a38876c0793c
Majorly reworked Javascript runtime stuff to use on-demand loading.
Dan
parents:
493
diff
changeset
|
13 |
} |
1 | 14 |
this.object = ( typeof(id) == 'object' ) ? id : document.getElementById(id); |
29
e5484a9e0818
Rewrote change theme dialog; a few minor stability fixes here and there; fixed IE + St Patty background image
Dan
parents:
1
diff
changeset
|
15 |
if ( !this.object ) |
e5484a9e0818
Rewrote change theme dialog; a few minor stability fixes here and there; fixed IE + St Patty background image
Dan
parents:
1
diff
changeset
|
16 |
{ |
493 | 17 |
console.warn('Dynano: requested object is bad. id parameter follows.'); |
18 |
console.debug(id); |
|
29
e5484a9e0818
Rewrote change theme dialog; a few minor stability fixes here and there; fixed IE + St Patty background image
Dan
parents:
1
diff
changeset
|
19 |
this.object = false; |
e5484a9e0818
Rewrote change theme dialog; a few minor stability fixes here and there; fixed IE + St Patty background image
Dan
parents:
1
diff
changeset
|
20 |
return this; |
e5484a9e0818
Rewrote change theme dialog; a few minor stability fixes here and there; fixed IE + St Patty background image
Dan
parents:
1
diff
changeset
|
21 |
} |
1 | 22 |
this.height = __DNObjGetHeight(this.object); |
23 |
this.width = __DNObjGetWidth(this.object); |
|
24 |
||
588
20484deb89cd
Upgraded TinyMCE to 3.1.0.1. Ported a couple special pages to the componentized JS system.
Dan
parents:
582
diff
changeset
|
25 |
if ( this.object.tagName == 'TEXTAREA' && ( typeof(tinyMCE) == 'object' || typeof(tinyMCE_GZ) == 'object' ) ) |
1 | 26 |
{ |
27 |
this.object.dnIsMCE = 'no'; |
|
28 |
this.switchToMCE = DN_switchToMCE; |
|
29 |
this.destroyMCE = DN_destroyMCE; |
|
30 |
this.getContent = DN_mceFetchContent; |
|
413
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
31 |
this.setContent = DN_mceSetContent; |
1 | 32 |
} |
33 |
} |
|
34 |
function __DNObjGetHeight(o) { |
|
35 |
return o.offsetHeight; |
|
36 |
} |
|
37 |
||
38 |
function __DNObjGetWidth(o) { |
|
39 |
return o.offsetWidth; |
|
40 |
} |
|
41 |
||
42 |
function addClass(obj, clsname) |
|
43 |
{ |
|
44 |
var cnt = obj.className; |
|
45 |
var space = ( (cnt + '').length > 0 ) ? ' ' : ''; |
|
46 |
var cls = cnt + space + clsname; |
|
47 |
obj.className = cls; |
|
48 |
} |
|
49 |
||
50 |
function rmClass(obj, clsname) |
|
51 |
{ |
|
52 |
var cnt = obj.className; |
|
53 |
if ( cnt == clsname ) |
|
54 |
{ |
|
55 |
obj.className = ''; |
|
56 |
} |
|
57 |
else |
|
58 |
{ |
|
59 |
cnt = cnt.replace(clsname, ''); |
|
60 |
cnt = trim(cnt); |
|
61 |
obj.className = cnt; |
|
62 |
} |
|
63 |
} |
|
64 |
||
65 |
function hasClass(obj, clsname) |
|
66 |
{ |
|
67 |
var cnt = obj.className; |
|
68 |
if ( !cnt ) |
|
69 |
return false; |
|
70 |
if ( cnt == clsname ) |
|
71 |
return true; |
|
72 |
cnt = cnt.split(' '); |
|
73 |
||
74 |
for ( var i in cnt ) |
|
75 |
if ( cnt[i] == clsname ) |
|
76 |
return true; |
|
77 |
||
78 |
return false; |
|
79 |
} |
|
80 |
function __DNObjGetLeft(obj) { |
|
81 |
var left_offset = obj.offsetLeft; |
|
82 |
while ((obj = obj.offsetParent) != null) { |
|
83 |
left_offset += obj.offsetLeft; |
|
84 |
} |
|
85 |
return left_offset; |
|
86 |
} |
|
87 |
||
88 |
function __DNObjGetTop(obj) { |
|
89 |
var left_offset = obj.offsetTop; |
|
90 |
while ((obj = obj.offsetParent) != null) { |
|
91 |
left_offset += obj.offsetTop; |
|
92 |
} |
|
93 |
return left_offset; |
|
94 |
} |
|
95 |
||
335
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
96 |
function DN_switchToMCE(performWikiTransform) |
1 | 97 |
{ |
98 |
if ( !this.object.id ) |
|
99 |
this.object.id = 'textarea_' + Math.floor(Math.random() * 1000000); |
|
100 |
if ( !this.object.name ) |
|
101 |
this.object.name = 'textarea_' + Math.floor(Math.random() * 1000000); |
|
474
3d751a6f2b05
Changed TinyMCE init to run only on demand. Highly experimental.
Dan
parents:
413
diff
changeset
|
102 |
// Updated for TinyMCE 3.x |
335
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
103 |
if ( performWikiTransform ) |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
104 |
{ |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
105 |
this.object.value = DN_WikitextToXHTML(this.object.value); |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
106 |
} |
474
3d751a6f2b05
Changed TinyMCE init to run only on demand. Highly experimental.
Dan
parents:
413
diff
changeset
|
107 |
// If tinyMCE init hasn't been called yet, do it now. |
3d751a6f2b05
Changed TinyMCE init to run only on demand. Highly experimental.
Dan
parents:
413
diff
changeset
|
108 |
if ( !tinymce_initted ) |
3d751a6f2b05
Changed TinyMCE init to run only on demand. Highly experimental.
Dan
parents:
413
diff
changeset
|
109 |
{ |
588
20484deb89cd
Upgraded TinyMCE to 3.1.0.1. Ported a couple special pages to the componentized JS system.
Dan
parents:
582
diff
changeset
|
110 |
console.info('$().switchToMCE(): doing "exact"-type MCE init'); |
474
3d751a6f2b05
Changed TinyMCE init to run only on demand. Highly experimental.
Dan
parents:
413
diff
changeset
|
111 |
enano_tinymce_options.mode = 'exact'; |
493 | 112 |
enano_tinymce_options.elements = this.object.id; |
474
3d751a6f2b05
Changed TinyMCE init to run only on demand. Highly experimental.
Dan
parents:
413
diff
changeset
|
113 |
initTinyMCE(); |
3d751a6f2b05
Changed TinyMCE init to run only on demand. Highly experimental.
Dan
parents:
413
diff
changeset
|
114 |
this.object.dnIsMCE = 'yes'; |
3d751a6f2b05
Changed TinyMCE init to run only on demand. Highly experimental.
Dan
parents:
413
diff
changeset
|
115 |
return true; |
3d751a6f2b05
Changed TinyMCE init to run only on demand. Highly experimental.
Dan
parents:
413
diff
changeset
|
116 |
} |
3d751a6f2b05
Changed TinyMCE init to run only on demand. Highly experimental.
Dan
parents:
413
diff
changeset
|
117 |
else |
3d751a6f2b05
Changed TinyMCE init to run only on demand. Highly experimental.
Dan
parents:
413
diff
changeset
|
118 |
{ |
588
20484deb89cd
Upgraded TinyMCE to 3.1.0.1. Ported a couple special pages to the componentized JS system.
Dan
parents:
582
diff
changeset
|
119 |
console.info('$().switchToMCE(): tinyMCE already loaded, calling mceAddControl'); |
20484deb89cd
Upgraded TinyMCE to 3.1.0.1. Ported a couple special pages to the componentized JS system.
Dan
parents:
582
diff
changeset
|
120 |
tinymce.EditorManager.execCommand("mceAddControl", true, this.object.id); |
474
3d751a6f2b05
Changed TinyMCE init to run only on demand. Highly experimental.
Dan
parents:
413
diff
changeset
|
121 |
this.object.dnIsMCE = 'yes'; |
3d751a6f2b05
Changed TinyMCE init to run only on demand. Highly experimental.
Dan
parents:
413
diff
changeset
|
122 |
} |
1 | 123 |
return this; |
124 |
} |
|
125 |
||
335
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
126 |
function DN_destroyMCE(performWikiTransform) |
1 | 127 |
{ |
128 |
//if ( !this.object.dn_is_mce ) |
|
129 |
// return this; |
|
335
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
130 |
if ( this.object.id ) |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
131 |
{ |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
132 |
// TinyMCE 2.x |
588
20484deb89cd
Upgraded TinyMCE to 3.1.0.1. Ported a couple special pages to the componentized JS system.
Dan
parents:
582
diff
changeset
|
133 |
// tinymce.EditorManager.removeMCEControl(this.object.name); |
335
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
134 |
// TinyMCE 3.x |
588
20484deb89cd
Upgraded TinyMCE to 3.1.0.1. Ported a couple special pages to the componentized JS system.
Dan
parents:
582
diff
changeset
|
135 |
var ed = tinymce.EditorManager.getInstanceById(this.object.id); |
335
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
136 |
if ( ed ) |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
137 |
{ |
588
20484deb89cd
Upgraded TinyMCE to 3.1.0.1. Ported a couple special pages to the componentized JS system.
Dan
parents:
582
diff
changeset
|
138 |
if ( !tinymce.EditorManager.execCommand("mceRemoveEditor", false, this.object.id) ) |
335
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
139 |
alert('could not destroy editor'); |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
140 |
if ( performWikiTransform ) |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
141 |
{ |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
142 |
this.object.value = DN_XHTMLToWikitext(this.object.value); |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
143 |
} |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
144 |
} |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
145 |
} |
1 | 146 |
this.object.dnIsMCE = 'no'; |
147 |
return this; |
|
148 |
} |
|
149 |
||
150 |
function DN_mceFetchContent() |
|
151 |
{ |
|
152 |
if ( this.object.name ) |
|
153 |
{ |
|
154 |
var text = this.object.value; |
|
588
20484deb89cd
Upgraded TinyMCE to 3.1.0.1. Ported a couple special pages to the componentized JS system.
Dan
parents:
582
diff
changeset
|
155 |
if ( tinymce.EditorManager.get(this.object.id) ) |
335
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
156 |
{ |
588
20484deb89cd
Upgraded TinyMCE to 3.1.0.1. Ported a couple special pages to the componentized JS system.
Dan
parents:
582
diff
changeset
|
157 |
var editor = tinymce.EditorManager.get(this.object.id); |
335
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
158 |
text = editor.getContent(); |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
159 |
} |
1 | 160 |
return text; |
161 |
} |
|
162 |
else |
|
163 |
{ |
|
164 |
return this.object.value; |
|
165 |
} |
|
166 |
} |
|
167 |
||
413
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
168 |
function DN_mceSetContent(text) |
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
169 |
{ |
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
170 |
if ( this.object.name ) |
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
171 |
{ |
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
172 |
this.object.value = text; |
588
20484deb89cd
Upgraded TinyMCE to 3.1.0.1. Ported a couple special pages to the componentized JS system.
Dan
parents:
582
diff
changeset
|
173 |
if ( tinymce.EditorManager.get(this.object.id) ) |
413
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
174 |
{ |
588
20484deb89cd
Upgraded TinyMCE to 3.1.0.1. Ported a couple special pages to the componentized JS system.
Dan
parents:
582
diff
changeset
|
175 |
var editor = tinymce.EditorManager.get(this.object.id); |
413
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
176 |
editor.setContent(text); |
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
177 |
} |
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
178 |
} |
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
179 |
else |
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
180 |
{ |
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
181 |
this.object.value = text; |
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
182 |
} |
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
183 |
} |
6607cd646d6d
Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents:
335
diff
changeset
|
184 |
|
335
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
185 |
// A basic Wikitext to XHTML converter |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
186 |
function DN_WikitextToXHTML(text) |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
187 |
{ |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
188 |
text = text.replace(/^===[\s]*(.+?)[\s]*===$/g, '<h3>$1</h3>'); |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
189 |
text = text.replace(/'''(.+?)'''/g, '<b>$1</b>'); |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
190 |
text = text.replace(/''(.+?)''/g, '<i>$1</i>'); |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
191 |
text = text.replace(/\[(http|ftp|irc|mailto):([^ \]])+ ([^\]]+?)\]/g, '<a href="$1:$2">$4</a>'); |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
192 |
return text; |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
193 |
} |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
194 |
|
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
195 |
// Inverse of the previous function |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
196 |
function DN_XHTMLToWikitext(text) |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
197 |
{ |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
198 |
text = text.replace(/<h3>(.+?)<\/h3>/g, '=== $1 ==='); |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
199 |
text = text.replace(/<(b|strong)>(.+?)<\/(b|strong)>/g, "'''$2'''"); |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
200 |
text = text.replace(/<(i|em)>(.+?)<\/(i|em)>/g, "''$2''"); |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
201 |
text = text.replace(/<a href="([^" ]+)">(.+?)<\/a>/g, '[$1 $2]'); |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
202 |
text = text.replace(/<\/?p>/g, ''); |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
203 |
return text; |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
204 |
} |
67bd3121a12e
Replaced TinyMCE 2.x with 3.0 beta 3. Supports everything but IE. Also rewrote the editor interface completely from the ground up.
Dan
parents:
29
diff
changeset
|
205 |
|
1 | 206 |
DNobj.prototype.addClass = function(clsname) { addClass(this.object, clsname); return this; }; |
207 |
DNobj.prototype.rmClass = function(clsname) { rmClass( this.object, clsname); return this; }; |
|
208 |
DNobj.prototype.hasClass = function(clsname) { return hasClass(this.object, clsname); }; |
|
209 |
DNobj.prototype.Height = function() { return __DNObjGetHeight(this.object); } |
|
210 |
DNobj.prototype.Width = function() { return __DNObjGetWidth( this.object); } |
|
211 |
DNobj.prototype.Left = function() { /* return this.object.offsetLeft; */ return __DNObjGetLeft(this.object); } |
|
212 |
DNobj.prototype.Top = function() { /* return this.object.offsetTop; */ return __DNObjGetTop( this.object); } |
|
213 |