Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.hooks.php |
— | — | @@ -1,18 +1,18 @@ |
2 | | -<?php
|
3 | | -/**
|
4 | | - * Hooks for Usability Initiative OptIn extension
|
5 | | - *
|
6 | | - * @file
|
7 | | - * @ingroup Extensions
|
8 | | - */
|
9 | | -
|
10 | | -class OptInHooks {
|
11 | | -
|
12 | | - /* Static Functions */
|
13 | | - public static function schema() {
|
14 | | - global $wgExtNewTables;
|
15 | | - $wgExtNewTables[] = array( 'optin_survey',
|
16 | | - dirname( __FILE__ ) . '/OptIn.sql' );
|
17 | | - return true;
|
18 | | - }
|
19 | | -}
|
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Hooks for Usability Initiative OptIn extension |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + */ |
| 9 | + |
| 10 | +class OptInHooks { |
| 11 | + |
| 12 | + /* Static Functions */ |
| 13 | + public static function schema() { |
| 14 | + global $wgExtNewTables; |
| 15 | + $wgExtNewTables[] = array( 'optin_survey', |
| 16 | + dirname( __FILE__ ) . '/OptIn.sql' ); |
| 17 | + return true; |
| 18 | + } |
| 19 | +} |
Property changes on: trunk/extensions/UsabilityInitiative/OptIn/OptIn.hooks.php |
___________________________________________________________________ |
Name: svn:eol-style |
20 | 20 | + native |
Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.js |
— | — | @@ -1,109 +1,109 @@ |
2 | | -/*
|
3 | | -
|
4 | | -jQuery Browser Plugin
|
5 | | - * Version 2.3
|
6 | | - * 2008-09-17 19:27:05
|
7 | | - * URL: http://jquery.thewikies.com/browser
|
8 | | - * Description: jQuery Browser Plugin extends browser detection capabilities and can assign browser selectors to CSS classes.
|
9 | | - * Author: Nate Cavanaugh, Minhchau Dang, & Jonathan Neal
|
10 | | - * Copyright: Copyright (c) 2008 Jonathan Neal under dual MIT/GPL license.
|
11 | | - * JSLint: This javascript file passes JSLint verification.
|
12 | | -*//*jslint
|
13 | | - bitwise: true,
|
14 | | - browser: true,
|
15 | | - eqeqeq: true,
|
16 | | - forin: true,
|
17 | | - nomen: true,
|
18 | | - plusplus: true,
|
19 | | - undef: true,
|
20 | | - white: true
|
21 | | -*//*global
|
22 | | - jQuery
|
23 | | -*/
|
24 | | -
|
25 | | -(function ($) {
|
26 | | - $.browserTest = function (a, z) {
|
27 | | - var u = 'unknown', x = 'X', m = function (r, h) {
|
28 | | - for (var i = 0; i < h.length; i = i + 1) {
|
29 | | - r = r.replace(h[i][0], h[i][1]);
|
30 | | - }
|
31 | | -
|
32 | | - return r;
|
33 | | - }, c = function (i, a, b, c) {
|
34 | | - var r = {
|
35 | | - name: m((a.exec(i) || [u, u])[1], b)
|
36 | | - };
|
37 | | -
|
38 | | - r[r.name] = true;
|
39 | | -
|
40 | | - r.version = (c.exec(i) || [x, x, x, x])[3];
|
41 | | -
|
42 | | - if (r.name.match(/safari/) && r.version > 400) {
|
43 | | - r.version = '2.0';
|
44 | | - }
|
45 | | -
|
46 | | - if (r.name === 'presto') {
|
47 | | - r.version = ($.browser.version > 9.27) ? 'futhark' : 'linear_b';
|
48 | | - }
|
49 | | - r.versionNumber = parseFloat(r.version, 10) || 0;
|
50 | | - r.versionX = (r.version !== x) ? (r.version + '').substr(0, 1) : x;
|
51 | | - r.className = r.name + r.versionX;
|
52 | | -
|
53 | | - return r;
|
54 | | - };
|
55 | | -
|
56 | | - a = (a.match(/Opera|Navigator|Minefield|KHTML|Chrome/) ? m(a, [
|
57 | | - [/(Firefox|MSIE|KHTML,\slike\sGecko|Konqueror)/, ''],
|
58 | | - ['Chrome Safari', 'Chrome'],
|
59 | | - ['KHTML', 'Konqueror'],
|
60 | | - ['Minefield', 'Firefox'],
|
61 | | - ['Navigator', 'Netscape']
|
62 | | - ]) : a).toLowerCase();
|
63 | | -
|
64 | | - $.browser = $.extend((!z) ? $.browser : {}, c(a, /(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari)/, [], /(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari)(\/|\s)([a-z0-9\.\+]*?)(\;|dev|rel|\s|$)/));
|
65 | | -
|
66 | | - $.layout = c(a, /(gecko|konqueror|msie|opera|webkit)/, [
|
67 | | - ['konqueror', 'khtml'],
|
68 | | - ['msie', 'trident'],
|
69 | | - ['opera', 'presto']
|
70 | | - ], /(applewebkit|rv|konqueror|msie)(\:|\/|\s)([a-z0-9\.]*?)(\;|\)|\s)/);
|
71 | | -
|
72 | | - $.os = {
|
73 | | - name: (/(win|mac|linux|sunos|solaris|iphone)/.exec(navigator.platform.toLowerCase()) || [u])[0].replace('sunos', 'solaris')
|
74 | | - };
|
75 | | -
|
76 | | - if (!z) {
|
77 | | - $('html').addClass([$.os.name, $.browser.name, $.browser.className, $.layout.name, $.layout.className].join(' '));
|
78 | | - }
|
79 | | - };
|
80 | | -
|
81 | | - $.browserTest(navigator.userAgent);
|
82 | | -})(jQuery);
|
83 | | -
|
84 | | -/* JavaScript for OptIn extension */
|
85 | | -
|
86 | | -$( document ).ready( function() {
|
87 | | - $( '.optin-other-select' ).hide();
|
88 | | - $( 'select.optin-need-other' ).change( function() {
|
89 | | - if( $(this).val() == 'other' )
|
90 | | - $( '#' + $(this).attr( 'id' ) + '-other' ).show();
|
91 | | - else
|
92 | | - $( '#' + $(this).attr( 'id' ) + '-other' ).hide();
|
93 | | - });
|
94 | | - $( '.optin-other-radios' ).click( function() {
|
95 | | - $(this).prev().prev().click();
|
96 | | - });
|
97 | | - // Detect screen resolution
|
98 | | - if ( screen.width && screen.height ) {
|
99 | | - $( '.optin-resolution-x' ).val( screen.width );
|
100 | | - $( '.optin-resolution-y' ).val( screen.height );
|
101 | | - // Hide the fields?
|
102 | | - }
|
103 | | - /*
|
104 | | - * We should probably refactor the code above and make it a jquery plugin
|
105 | | - $.browser.name // String like "firefox"
|
106 | | - $.browser.versionNumber // Floating point number like 3.5
|
107 | | - $.os.name // String like "mac"
|
108 | | - // More info about usage: http://jquery.thewikies.com/browser
|
109 | | - */
|
| 2 | +/* |
| 3 | + |
| 4 | +jQuery Browser Plugin |
| 5 | + * Version 2.3 |
| 6 | + * 2008-09-17 19:27:05 |
| 7 | + * URL: http://jquery.thewikies.com/browser |
| 8 | + * Description: jQuery Browser Plugin extends browser detection capabilities and can assign browser selectors to CSS classes. |
| 9 | + * Author: Nate Cavanaugh, Minhchau Dang, & Jonathan Neal |
| 10 | + * Copyright: Copyright (c) 2008 Jonathan Neal under dual MIT/GPL license. |
| 11 | + * JSLint: This javascript file passes JSLint verification. |
| 12 | +*//*jslint |
| 13 | + bitwise: true, |
| 14 | + browser: true, |
| 15 | + eqeqeq: true, |
| 16 | + forin: true, |
| 17 | + nomen: true, |
| 18 | + plusplus: true, |
| 19 | + undef: true, |
| 20 | + white: true |
| 21 | +*//*global |
| 22 | + jQuery |
| 23 | +*/ |
| 24 | + |
| 25 | +(function ($) { |
| 26 | + $.browserTest = function (a, z) { |
| 27 | + var u = 'unknown', x = 'X', m = function (r, h) { |
| 28 | + for (var i = 0; i < h.length; i = i + 1) { |
| 29 | + r = r.replace(h[i][0], h[i][1]); |
| 30 | + } |
| 31 | + |
| 32 | + return r; |
| 33 | + }, c = function (i, a, b, c) { |
| 34 | + var r = { |
| 35 | + name: m((a.exec(i) || [u, u])[1], b) |
| 36 | + }; |
| 37 | + |
| 38 | + r[r.name] = true; |
| 39 | + |
| 40 | + r.version = (c.exec(i) || [x, x, x, x])[3]; |
| 41 | + |
| 42 | + if (r.name.match(/safari/) && r.version > 400) { |
| 43 | + r.version = '2.0'; |
| 44 | + } |
| 45 | + |
| 46 | + if (r.name === 'presto') { |
| 47 | + r.version = ($.browser.version > 9.27) ? 'futhark' : 'linear_b'; |
| 48 | + } |
| 49 | + r.versionNumber = parseFloat(r.version, 10) || 0; |
| 50 | + r.versionX = (r.version !== x) ? (r.version + '').substr(0, 1) : x; |
| 51 | + r.className = r.name + r.versionX; |
| 52 | + |
| 53 | + return r; |
| 54 | + }; |
| 55 | + |
| 56 | + a = (a.match(/Opera|Navigator|Minefield|KHTML|Chrome/) ? m(a, [ |
| 57 | + [/(Firefox|MSIE|KHTML,\slike\sGecko|Konqueror)/, ''], |
| 58 | + ['Chrome Safari', 'Chrome'], |
| 59 | + ['KHTML', 'Konqueror'], |
| 60 | + ['Minefield', 'Firefox'], |
| 61 | + ['Navigator', 'Netscape'] |
| 62 | + ]) : a).toLowerCase(); |
| 63 | + |
| 64 | + $.browser = $.extend((!z) ? $.browser : {}, c(a, /(camino|chrome|firefox|netscape|konqueror|lynx|msie|opera|safari)/, [], /(camino|chrome|firefox|netscape|netscape6|opera|version|konqueror|lynx|msie|safari)(\/|\s)([a-z0-9\.\+]*?)(\;|dev|rel|\s|$)/)); |
| 65 | + |
| 66 | + $.layout = c(a, /(gecko|konqueror|msie|opera|webkit)/, [ |
| 67 | + ['konqueror', 'khtml'], |
| 68 | + ['msie', 'trident'], |
| 69 | + ['opera', 'presto'] |
| 70 | + ], /(applewebkit|rv|konqueror|msie)(\:|\/|\s)([a-z0-9\.]*?)(\;|\)|\s)/); |
| 71 | + |
| 72 | + $.os = { |
| 73 | + name: (/(win|mac|linux|sunos|solaris|iphone)/.exec(navigator.platform.toLowerCase()) || [u])[0].replace('sunos', 'solaris') |
| 74 | + }; |
| 75 | + |
| 76 | + if (!z) { |
| 77 | + $('html').addClass([$.os.name, $.browser.name, $.browser.className, $.layout.name, $.layout.className].join(' ')); |
| 78 | + } |
| 79 | + }; |
| 80 | + |
| 81 | + $.browserTest(navigator.userAgent); |
| 82 | +})(jQuery); |
| 83 | + |
| 84 | +/* JavaScript for OptIn extension */ |
| 85 | + |
| 86 | +$( document ).ready( function() { |
| 87 | + $( '.optin-other-select' ).hide(); |
| 88 | + $( 'select.optin-need-other' ).change( function() { |
| 89 | + if( $(this).val() == 'other' ) |
| 90 | + $( '#' + $(this).attr( 'id' ) + '-other' ).show(); |
| 91 | + else |
| 92 | + $( '#' + $(this).attr( 'id' ) + '-other' ).hide(); |
| 93 | + }); |
| 94 | + $( '.optin-other-radios' ).click( function() { |
| 95 | + $(this).prev().prev().click(); |
| 96 | + }); |
| 97 | + // Detect screen resolution |
| 98 | + if ( screen.width && screen.height ) { |
| 99 | + $( '.optin-resolution-x' ).val( screen.width ); |
| 100 | + $( '.optin-resolution-y' ).val( screen.height ); |
| 101 | + // Hide the fields? |
| 102 | + } |
| 103 | + /* |
| 104 | + * We should probably refactor the code above and make it a jquery plugin |
| 105 | + $.browser.name // String like "firefox" |
| 106 | + $.browser.versionNumber // Floating point number like 3.5 |
| 107 | + $.os.name // String like "mac" |
| 108 | + // More info about usage: http://jquery.thewikies.com/browser |
| 109 | + */ |
110 | 110 | }); |
\ No newline at end of file |
Property changes on: trunk/extensions/UsabilityInitiative/OptIn/OptIn.js |
___________________________________________________________________ |
Name: svn:eol-style |
111 | 111 | + native |
Index: trunk/extensions/UsabilityInitiative/OptIn/OptIn.sql |
— | — | @@ -1,22 +1,22 @@ |
2 | | -
|
3 | | -CREATE TABLE IF NOT EXISTS /*_*/optin_survey (
|
4 | | - -- User ID
|
5 | | - ois_user int NOT NULL,
|
6 | | -
|
7 | | - -- Timestamp
|
8 | | - ois_timestamp binary(14) NOT NULL,
|
9 | | -
|
10 | | - -- Question ID (key in $wgOptInSurvey)
|
11 | | - ois_question int unsigned NOT NULL,
|
12 | | -
|
13 | | - -- Answer ID (key in $wgOptInSurvey[ois_question]['answers'])
|
14 | | - ois_answer int unsigned NULL,
|
15 | | -
|
16 | | - -- Optional text associated with the answer
|
17 | | - ois_answer_data text NULL
|
18 | | -) /*$wgDBTableOptions*/;
|
19 | | -
|
20 | | -CREATE UNIQUE INDEX /*i*/ois_user_timestamp_question ON /*_*/optin_survey (ois_user, ois_timestamp, ois_question);
|
| 2 | +-- |
| 3 | +-- Schema for OptIn |
| 4 | +-- |
| 5 | + |
| 6 | +CREATE TABLE IF NOT EXISTS /*_*/optin_survey ( |
| 7 | + -- User ID |
| 8 | + ois_user int NOT NULL, |
| 9 | + |
| 10 | + -- Timestamp |
| 11 | + ois_timestamp binary(14) NOT NULL, |
| 12 | + |
| 13 | + -- Question ID (key in $wgOptInSurvey) |
| 14 | + ois_question int unsigned NOT NULL, |
| 15 | + |
| 16 | + -- Answer ID (key in $wgOptInSurvey[ois_question]['answers']) |
| 17 | + ois_answer int unsigned NULL, |
| 18 | + |
| 19 | + -- Optional text associated with the answer |
| 20 | + ois_answer_data text NULL |
| 21 | +) /*$wgDBTableOptions*/; |
| 22 | + |
| 23 | +CREATE UNIQUE INDEX /*i*/ois_user_timestamp_question ON /*_*/optin_survey (ois_user, ois_timestamp, ois_question); |
Property changes on: trunk/extensions/UsabilityInitiative/OptIn/OptIn.sql |
___________________________________________________________________ |
Name: svn:eol-style |
21 | 24 | + native |
Property changes on: trunk/extensions/UsabilityInitiative/README |
___________________________________________________________________ |
Name: svn:eol-style |
22 | 25 | + native |
Property changes on: trunk/extensions/LiquidThreads/i18n/LiquidThreads.magic.php |
___________________________________________________________________ |
Name: svn:eol-style |
23 | 26 | + native |
Property changes on: trunk/extensions/MetavidWiki/.project |
___________________________________________________________________ |
Name: svn:eol-style |
24 | 27 | + native |