Index: trunk/extensions/UsabilityInitiative/ClickTracking/SpecialClickTracking.php |
— | — | @@ -34,8 +34,8 @@ |
35 | 35 | $this->user_defs["intermediate"] = array( |
36 | 36 | "anonymous" => "0", |
37 | 37 | "total_contribs" => array( |
38 | | - array("operation" => "<", "value" => "400"), |
39 | | - array("operation" => ">", "value" => "10"), |
| 38 | + array("operation" => "<", "value" => "10"), |
| 39 | + array("operation" => ">", "value" => "400"), |
40 | 40 | ), |
41 | 41 | ); |
42 | 42 | |
— | — | @@ -202,14 +202,14 @@ |
203 | 203 | $control .= Xml::openElement("form", array("id" => "user_definition_form", "class" => "user_def_form")); |
204 | 204 | $control .= Xml::openElement("fieldset", array("id" => "user_def_alter_fieldset")); |
205 | 205 | $control .= Xml::openElement("legend", array("id" => "user_def_alter_legend")); |
206 | | - $control .= wfMsg( "editing" ); |
| 206 | + $control .= wfMsg( "ct-editing" ); |
207 | 207 | $control .= Xml::closeElement("legend"); |
208 | 208 | |
209 | 209 | //[] anonymous users? |
210 | 210 | $control .= Xml::openElement("div", array("id" => "anon_users_div", "class" => "checkbox_div control_div")); |
211 | 211 | $control .= Xml::openElement("input", array("type" => "checkbox", "id" => "anon_users_checkbox", "class" => "user_def_checkbox")); |
212 | 212 | $control .= Xml::closeElement("input"); |
213 | | - $control .= wfMsg("anon-users"); |
| 213 | + $control .= wfMsg("ct-anon-users"); |
214 | 214 | $control .= Xml::closeElement("div"); |
215 | 215 | |
216 | 216 | // ---------------- |
— | — | @@ -221,7 +221,7 @@ |
222 | 222 | $control .= Xml::openElement("div", array("id" => "total_users_contrib_div", "class" => "checkbox_div control_div")); |
223 | 223 | $control .= Xml::openElement("input", array("type" => "checkbox", "id" => "contrib_checkbox", "class" => "user_def_checkbox")); |
224 | 224 | $control .= Xml::closeElement("input"); |
225 | | - $control .= wfMsg("user-contribs"); |
| 225 | + $control .= wfMsg("ct-user-contribs"); |
226 | 226 | |
227 | 227 | |
228 | 228 | $control .= Xml::closeElement("div"); |
— | — | @@ -232,7 +232,7 @@ |
233 | 233 | $control .= Xml::openElement("div", array("id" => "contrib_span_1_text_div", "class" => "checkbox_div")); |
234 | 234 | $control .= Xml::openElement("input", array("type" => "checkbox", "id" => "contrib_span_1_checkbox", "class" => "user_def_checkbox")); |
235 | 235 | $control .= Xml::closeElement("input"); |
236 | | - $control .= wfMsg("user-span") . " 1"; |
| 236 | + $control .= wfMsg("ct-user-span") . " 1"; |
237 | 237 | $control .= Xml::closeElement("div"); |
238 | 238 | $control .= Xml::closeElement("div"); |
239 | 239 | |
— | — | @@ -242,7 +242,7 @@ |
243 | 243 | $control .= Xml::openElement("div", array("id" => "contrib_span_2_text_div", "class" => "checkbox_div")); |
244 | 244 | $control .= Xml::openElement("input", array("type" => "checkbox", "id" => "contrib_span_2_checkbox", "class" => "user_def_checkbox")); |
245 | 245 | $control .= Xml::closeElement("input"); |
246 | | - $control .= wfMsg("user-span") . " 2"; |
| 246 | + $control .= wfMsg("ct-user-span") . " 2"; |
247 | 247 | $control .= Xml::closeElement("div"); |
248 | 248 | $control .= Xml::closeElement("div"); |
249 | 249 | |
— | — | @@ -252,7 +252,7 @@ |
253 | 253 | $control .= Xml::openElement("div", array("id" => "contrib_span_3_text_div", "class" => "checkbox_div")); |
254 | 254 | $control .= Xml::openElement("input", array("type" => "checkbox", "id" => "contrib_span_3_checkbox", "class" => "user_def_checkbox")); |
255 | 255 | $control .= Xml::closeElement("input"); |
256 | | - $control .= wfMsg("user-span") . " 3"; |
| 256 | + $control .= wfMsg("ct-user-span") . " 3"; |
257 | 257 | $control .= Xml::closeElement("div"); |
258 | 258 | $control .= Xml::closeElement("div"); |
259 | 259 | |
— | — | @@ -419,7 +419,6 @@ |
420 | 420 | $userDefs = json_decode($userDefs, true); |
421 | 421 | } |
422 | 422 | |
423 | | - |
424 | 423 | $events = self::getTopEvents($minTime, $maxTime); |
425 | 424 | |
426 | 425 | $returnArray = array(); |
— | — | @@ -500,7 +499,8 @@ |
501 | 500 | } |
502 | 501 | else { |
503 | 502 | |
504 | | - return "WHERE `action_time` >= '$minTime' AND `action_time` <= '$maxTime'"; |
| 503 | + return "WHERE `action_time` >= '$minTime' AND `action_time` <= '$maxTime'"; |
| 504 | + |
505 | 505 | } |
506 | 506 | |
507 | 507 | } |
— | — | @@ -524,10 +524,9 @@ |
525 | 525 | $normalize = "(select distinct session_id, event_id from click_tracking $time_constraint_statement) as t1"; |
526 | 526 | $time_constraint = ""; |
527 | 527 | } |
528 | | - $join = " "; |
529 | 528 | $sql = "select count(event_id) as totalevtid, event_id,event_name from $normalize" . |
530 | 529 | " LEFT JOIN click_tracking_events ON event_id=click_tracking_events.id". |
531 | | - " $time_constraint group by event_id order by totalevtid desc"; |
| 530 | + " $time_constraint group by event_id order by totalevtid desc"; |
532 | 531 | |
533 | 532 | //returns count(event_id),event_id, event_name, top one first |
534 | 533 | $dbr = wfGetDB( DB_SLAVE ); |
Index: trunk/extensions/UsabilityInitiative/ClickTracking/SpecialClickTracking.js |
— | — | @@ -81,6 +81,7 @@ |
82 | 82 | $("#user_def_alter_legend").text($("#user_def_alter_legend").data("defaultChangeText") + " " + defName); |
83 | 83 | $("#user_def_alter_legend").data("currentlyEditing", defName); |
84 | 84 | |
| 85 | + |
85 | 86 | var setContribs = function( conditionArray, contribName ) { |
86 | 87 | initialDiv = $("<div></div>").attr('id', contribName + '_div'); |
87 | 88 | initialDiv.addClass('checkbox_div'); |
— | — | @@ -106,15 +107,18 @@ |
107 | 108 | conditionDiv.addClass( 'checkbox_div' ); |
108 | 109 | conditionDiv.addClass( 'sub_option_div' ); |
109 | 110 | |
| 111 | + |
110 | 112 | //initialDiv.append(conditionDiv); |
111 | | - cCheckbox = $("<input></input>").attr('id', contribName + '_' + counter + '_checkbox'); |
112 | | - cCheckbox.attr('type', 'checkbox'); |
| 113 | + cCheckbox = $("<input type=\"checkbox\"></input>").attr('id', contribName + '_' + counter + '_checkbox'); |
| 114 | + //cCheckbox.attr('type', 'checkbox'); |
113 | 115 | if( isChecked ) { |
114 | 116 | cCheckbox.attr( 'checked', true ); |
115 | 117 | } |
| 118 | + |
116 | 119 | cCheckbox.addClass( 'number_select_checkbox' ); |
117 | 120 | conditionDiv.append( cCheckbox ); |
118 | | - |
| 121 | + |
| 122 | + |
119 | 123 | cSelect = $("<select></select>").attr('id', contribName + '_' + counter + '_ltgt'); |
120 | 124 | cSelect.addClass( 'number_select_ltgt' ); |
121 | 125 | |
— | — | @@ -126,6 +130,7 @@ |
127 | 131 | cOpt1.attr( 'selected', true ); |
128 | 132 | } |
129 | 133 | |
| 134 | + |
130 | 135 | cOpt2 = $("<option></option>").attr('id', contribName + '_' + counter + '_gt'); |
131 | 136 | cOpt2.addClass( 'number_select_ltgt_opt' ); |
132 | 137 | cOpt2.attr( 'value', 'gt' ); |
— | — | @@ -160,6 +165,7 @@ |
161 | 166 | cTextInput.addClass( 'number_select_text' ); |
162 | 167 | cTextInput.attr( 'value', condition['value'] ); |
163 | 168 | conditionDiv.append( cTextInput ); |
| 169 | + |
164 | 170 | return conditionDiv; |
165 | 171 | }; |
166 | 172 | |
— | — | @@ -169,6 +175,7 @@ |
170 | 176 | var conditionDiv = buildConditionDiv( conditionArray[condition], i, true ); |
171 | 177 | initialDiv.append( conditionDiv ); |
172 | 178 | } // forloop |
| 179 | + |
173 | 180 | initialDiv.data( 'totalConditions', i ); |
174 | 181 | addConditions = $("<div></div>").attr('id', contribName + '_addbutton'); |
175 | 182 | addConditions.data( 'contribName', contribName ); |
Index: trunk/extensions/UsabilityInitiative/ClickTracking/ApiSpecialClickTracking.php |
— | — | @@ -105,10 +105,10 @@ |
106 | 106 | ApiBase::PARAM_MIN => 1 |
107 | 107 | ), |
108 | 108 | 'startdate' => array( |
109 | | - ApiBase::PARAM_TYPE => 'timestamp' |
| 109 | + ApiBase::PARAM_TYPE => 'integer' |
110 | 110 | ), |
111 | 111 | 'enddate' => array( |
112 | | - ApiBase::PARAM_TYPE => 'timestamp' |
| 112 | + ApiBase::PARAM_TYPE => 'integer' |
113 | 113 | ), |
114 | 114 | 'increment' => array( |
115 | 115 | ApiBase::PARAM_TYPE => 'integer', |