/dev/adei-asec

To get this branch, use:
bzr branch http://darksoft.org/webbzr/dev/adei-asec

« back to all changes in this revision

Viewing changes to js/popup.js

  • Committer: Suren A. Chilingaryan
  • Date: 2010-08-04 06:30:21 UTC
  • Revision ID: csa@dside.dyndns.org-20100804063021-shdx01q2pg5r3a1k
Initial commit of gestures support for iDevices by Toni Pirhonen, Fix IE support broken by revision r196

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
    this.popup_states = new Array();
3
3
    this.popup_callback = new Array();
4
4
    this.popup_rewidth_callback = new Array();
 
5
    this.popup_reheight_callback = new Array();
5
6
    this.popup_on_callbacks = new Array();
6
7
    this.popup_off_callbacks = new Array();
7
8
    this.current_height = new Array();
128
129
        this.popup_rewidth_callback.push ({ 'cb': cb, 'cbattr': cbattr });
129
130
}
130
131
 
 
132
POPUP.prototype.RegisterReHeightCallback = function(cb, cbattr) {
 
133
        this.popup_reheight_callback.push ({ 'cb': cb, 'cbattr': cbattr });
 
134
}
 
135
 
131
136
POPUP.prototype.GetEncompasingNode = function(node) {
132
137
//    return node.parentNode.parentNode.parentNode.parentNode.parentNode;
133
138
    return node.parentNode.parentNode.parentNode.parentNode;
142
147
    }
143
148
}
144
149
 
 
150
POPUP.prototype.RunReHeightCallbacksFunction = function(self) {
 
151
    return function() {
 
152
        for (var i = 0; i < self.popup_reheight_callback.length; i++) {
 
153
            var cb = self.popup_reheight_callback[i];
 
154
            cb.cb(cb.cbattr);
 
155
        }
 
156
    }
 
157
}
 
158
 
145
159
POPUP.prototype.RunReWidthCallbacks = function() {
146
160
    setTimeout(this.RunReWidthCallbacksFunction(this), adei.cfg.parse_delay);
147
161
}
148
162
 
 
163
POPUP.prototype.RunReHeightCallbacks = function() {
 
164
    setTimeout(this.RunReHeightCallbacksFunction(this), adei.cfg.parse_delay);
 
165
}
 
166
 
149
167
 
150
168
POPUP.prototype.UpdateGeometry = function(module) {
151
169
    this.UpdateGlobalGeometry();
195
213
                if (this.current_height[module] < new_height_value) { 
196
214
                    this.current_height[module] = new_height_value;
197
215
                    domSetMinHeight(a, new_height_value, false, a.parentNode); //td checking
 
216
                    this.RunReHeightCallbacks();
198
217
                }
199
218
            }
200
219
        }