Compare commits

..

1768 Commits

Author SHA1 Message Date
320d814df4 Bump version 2023-05-30 21:51:49 +03:00
8953017b9d Update copyright notice 2023-05-30 21:49:59 +03:00
874e896178 Fix post-installation sound check for a case with disabled mod_rewrite 2023-05-24 17:37:34 +03:00
973632b4ae Switch to a newer version of some Symfony components 2023-05-24 16:47:30 +03:00
5fa9663d99 Add check for null values for incoming params 2023-05-24 16:46:14 +03:00
1ed31ad638 Bump version 2022-10-22 01:06:02 +03:00
da94f781b3 Improve outlook for chat history items related to leaved messages 2022-10-21 01:43:23 +03:00
d4640219a6 Fix bug with invalid groups list setup for chat dialogs 2022-10-21 01:02:16 +03:00
1fc048fec9 Save correct number of a visitor's messages for threads related to offline messages 2022-10-15 01:26:11 +03:00
d6d5477022 Bump version 2022-06-28 18:56:47 +03:00
691bcfa061 Add button to show tracked path of a visitor into operator's chat window 2022-06-28 02:58:00 +03:00
3148db54b5 Fix typo in the comment 2022-06-28 02:56:45 +03:00
Fedor A. Fetisov
58ee240c80 Fix warning in login controller when checking non-existent login 2022-06-24 01:43:22 +03:00
ca090638da Fix PHP 8.1 compatibility issue with the inherited static variable 2022-06-17 01:59:30 +03:00
4f05231b04 Bump version 2022-05-06 23:55:36 +03:00
730577b4a4 Update copyright notices
Actualize the years
2022-05-06 23:54:45 +03:00
51f2c41b31
Merge pull request #264 from BFallert/temp_viewport_mobile
add viewport meta tag to control layout on mobile browsers
2022-01-25 17:01:20 +03:00
BFallert
2de3ac9044 viewport meta tag for mobile view for backend added 2022-01-17 12:07:50 +01:00
BFallert
09f632cc6d add viewport meta tag to control layout on mobile browsers 2022-01-17 10:53:36 +01:00
339da62a23 Bump version 2021-12-14 13:54:38 +03:00
5a4d3d420f Fix potential problem with some absent HTTP request headers 2021-12-03 20:25:25 +03:00
cd1e8adce3
Merge pull request #263 from jmechnich/check-user-agent
Check if HTTP_USER_AGENT is set, use empty string otherwise
2021-12-03 19:32:56 +03:00
jmechnich
e676ca47dc Check if HTTP_USER_AGENT is set, use empty string otherwise 2021-12-01 20:39:20 +01:00
637758c13e Bump version 2021-12-01 16:43:58 +03:00
6a0c067cef Fix issue with client-side detection of valid cookie domain
See https://mibew.org/forums/index.php/topic,192324.msg200169.html
2021-12-01 16:41:38 +03:00
a956f85fc7 Bump version 2021-11-04 17:11:32 +03:00
1a137bb683 Fix calculation of visitor's messages for old threads 2021-11-02 18:33:23 +03:00
57eacfb953 Remove redundant blank lines 2021-11-01 21:14:07 +03:00
88247f0de3 Switch to a new version of PHP_CodeSniffer 2021-11-01 21:13:52 +03:00
eb0bc9ae5c Bump version 2021-09-03 16:31:58 +03:00
7f133f17f7 Fix bug with tracking new visitors 2021-09-03 16:31:15 +03:00
944b0fe6c5 Bump version 2021-09-01 01:31:33 +03:00
eae2b3df81 Update i18n submodule 2021-09-01 01:28:19 +03:00
3b3abe615d Fix default value for samesite cookies property 2021-08-30 19:06:57 +03:00
756014d568 Add invitation sound check into the installation process 2021-08-29 23:36:35 +03:00
6d4c438d62 Add unique sound for invitations 2021-08-29 23:34:21 +03:00
5c2743c01a Add ogg/vorbis option for audio files 2021-08-29 23:02:41 +03:00
eeb660293c Style copy code button 2021-08-28 03:46:11 +03:00
01261f8c92 Implement simple button code copying 2021-08-28 03:40:34 +03:00
06078cc8e7 Implement sound notification on invitation to chat 2021-08-28 03:09:23 +03:00
a37ea34670 Merge branch 'cookies' into test 2021-08-28 01:13:07 +03:00
56418b1551 Mark all necessary cookies as SameSite=None if possible 2021-08-28 01:12:40 +03:00
dc9f128b79 Fix code style 2021-08-28 00:40:29 +03:00
2533b362ab Fallback to window-based chat in case of blocked third parties cookies
Also affects #261.
2021-08-27 23:10:41 +03:00
0c416c7d7c Add handler for exceptions on thread update related to cookies block (see also #258) 2021-08-27 15:00:22 +03:00
fd94b0108c Remove redundant legacy code 2021-08-27 13:04:57 +03:00
99fb30b0ec Remove redundant legacy code 2021-08-27 13:04:34 +03:00
81e2e345a7 Fix invalid behavior of invitations in case of blocked cookies 2021-08-27 03:24:06 +03:00
ce5071c3e3 Fix typo 2021-08-27 03:00:13 +03:00
1210561448 Implement prototype for invitation sound playback 2021-08-27 02:29:37 +03:00
9294697d58 Fix type 2021-08-27 02:21:58 +03:00
3a92a54cd5 Fix some real-world issues with invitation styles 2021-08-26 00:15:28 +03:00
b6a70659b1 Fix issue with invalid management of session cookies in some browsers leading to "attack of clones" 2021-08-24 22:41:20 +03:00
cd22f3e9d8 Fix damned cookies behaviour in modern chrome 2021-08-24 22:39:35 +03:00
8aba48a1d2 Remove obsolete code from init 2021-08-24 19:09:22 +03:00
Fedor A. Fetisov
423ef8d36f Set cookies on the client side as secure and safe to set as third party if possible 2021-08-24 17:26:28 +03:00
098abccde7 Fix code style 2021-08-24 17:21:09 +03:00
Fedor A. Fetisov
75aaaf21b7 Bump version 2021-07-13 14:07:10 +03:00
622027302f Switch to own PHP8 compatible fork of CanteenHTML5 2021-07-09 23:38:03 +03:00
5b999eff2d Fix warning in PHP 8.0 2021-07-09 01:39:50 +03:00
562eeceac2 Bump version 2021-07-08 23:52:07 +03:00
f9e0755b23 Fix typo in chat user model property 2021-06-15 01:09:18 +03:00
74b9faf7af
Merge pull request #259 from jmechnich/fix-ssl-icon-link
fix SSL lock icon link in chat
2021-06-15 01:07:04 +03:00
jmechnich
9978074fbc fix SSL lock icon link in chat 2021-06-11 21:42:17 +02:00
2df50d9096 Bump version 2021-05-18 18:00:17 +03:00
14aba49194 Update i18n submodule 2021-05-18 18:00:05 +03:00
17df9c8dbc Implement CAPTCHA for the form to send chat to email (fixes #255) 2021-05-18 15:28:44 +03:00
6dae66540d Make possible to disable sending a chat to email 2021-05-16 02:40:51 +03:00
0317979c92 Update i18n submodule 2021-04-23 13:49:22 +03:00
a4b3824a42 Fix typo in standard mail template 2021-04-15 22:01:23 +03:00
f1200c4999 Fix installer crash in absence of PDO and/or pdo_mysql extensions 2021-04-14 13:40:50 +03:00
d7365d719f Update i18n submodule 2021-04-14 12:32:43 +03:00
42f5c1a20a Fix issue with invitation to chat from inaccessible operator 2021-04-13 19:11:03 +03:00
74e69aa520 Fix issue with notices about non well formed numeric values 2021-04-09 16:45:46 +03:00
20da5d2f36 Fix possible type mismatch in track_visit_page func 2021-04-09 16:34:29 +03:00
fe951ad050 Update system requirements 2021-04-09 15:48:19 +03:00
Tsvetan Koshutanski
8edcc7e57f Update dependencies and routing.yml for PHP 7.4 2021-04-09 15:47:15 +03:00
Tsvetan Koshutanski
62ad932aa7 Properly check if variable is set before referencing it
For PHP 7.4
2021-04-09 15:24:01 +03:00
33fb35bd34 Fix returning value in get_group_email func 2021-04-09 15:05:16 +03:00
Tsvetan Koshutanski
003f98b18c Check if group is set
The actual value is possible to be null,
thus leading to PHP notice without the check.

For PHP7.4
2021-04-09 15:05:02 +03:00
6e3720f8e4 Bump version 2021-04-02 18:31:03 +03:00
Tsvetan Koshutanski
4f3d0a57f9 Change return type to empty string on bad incoming value 2021-03-29 17:24:50 +03:00
Tsvetan Koshutanski
f28659a025 Check variable is of type array before using it
For PHP 7.4
2021-03-29 17:24:29 +03:00
Tsvetan Koshutanski
026b463fb7 Ignore intellij folder 2021-03-29 17:22:46 +03:00
bfe0065f1c Bump version 2021-03-22 22:41:40 +03:00
91a1b1872c Fix style of generated operator code field 2021-03-22 22:41:35 +03:00
cf67b11295 Fix issue with double widget code in generated button 2021-03-22 22:41:26 +03:00
dd4169f815 Fix check of system requirements 2021-03-22 22:41:12 +03:00
dbe04bb342 Update system requirements 2021-03-18 18:42:33 +03:00
98f2b68560 Bump version 2021-03-18 16:53:01 +03:00
805bb610a5 Improve handle of network connection errors (fix #203) 2021-03-18 15:50:49 +03:00
3148d0eb2a Update i18n submodule 2021-03-18 02:45:19 +03:00
67439317c4 Make possible to switch tracking for each type of button (also, fix #239) 2021-03-18 02:38:19 +03:00
5e90541918 Fix minor style issue with survey button 2021-03-18 01:43:42 +03:00
704862faad Remove redundant required mark for avatar field 2021-03-17 15:50:49 +03:00
c8df65baee Add dark styles 2021-03-17 15:50:15 +03:00
49d86a55be Skip versioning for _all_ styles 2021-03-17 15:00:50 +03:00
de3db5527b Update copyright notices
Actualize the years
2021-01-29 21:39:18 +03:00
d115befab9 Improve cli tool for bulk update of headers 2021-01-29 21:38:39 +03:00
6b20d0c8b6 Upgrade several vulnerable build tools 2021-01-29 21:37:53 +03:00
b296525e39 Disable versioning for package-lock.json 2021-01-29 21:36:51 +03:00
7a16536341 Fix js code style 2021-01-29 19:55:51 +03:00
aa94e21602 Switch to a newer handlebars.js 2021-01-29 19:55:09 +03:00
bb932e5b9c Migrate build system to Gulp 4 2021-01-29 19:54:44 +03:00
a9ca845c80 Bump version 2020-12-25 23:59:54 +03:00
b8bad36510 Fix XSS in error message (thanks to Sharif aka Vincent Pentester) 2020-12-25 23:44:33 +03:00
1c3d9c98b4 Update i18n submodule 2020-10-25 16:01:08 +03:00
dc9577ff6a Bump version 2020-07-09 12:45:27 +03:00
2336e406f4 Fix XSS in vex messages 2020-07-09 12:45:04 +03:00
84f5bca0a9 Fix multiple XSS (thanks to adsec2s) 2020-07-09 11:16:53 +03:00
fb35d4fff9 Fix comment 2020-07-09 11:12:10 +03:00
ace1423a13 Bump version 2020-03-21 17:31:19 +03:00
3b9a8e5456
Merge pull request #247 from Mibew/debian_fix2
Remove possible tilda from a string of installed dependency.
2020-03-21 17:28:13 +03:00
c60b247ef7 Update copyright notices
Actualize the years
2020-03-21 17:01:34 +03:00
89f0f5c688 Remove possible tilda from a string of installed dependency.
Fix #246.
2020-03-19 18:56:12 +03:00
7bdf01d344 Bump version 2019-12-03 19:31:50 +03:00
c0d9a461af Switch to symfony/http-foundation ~2.8.52 (fix CVE-2019-18888) 2019-12-03 19:30:19 +03:00
1844d91893 Fix security issue in the build environment 2019-06-21 01:55:51 +03:00
1a3594311b Bump version 2019-06-02 22:56:17 +03:00
8b6dcf4db0 Fix typo in cookie name for minified popup state
Fixes #245
2019-05-27 18:23:07 +03:00
9d8e057410 Bump version 2019-04-19 13:38:16 +03:00
8a2586d01b Make possible to support PHP 7.3
Due to abandoned state of XaminProject/handlebars.php one had to switched to private repositories for stuff related to PHP implementation of Handlebars template engine
2019-04-17 18:36:50 +03:00
be5d5d182b Bump version 2019-02-19 16:22:34 +03:00
38b653d075 Fix bug with immutable group description in dialog forms
See https://mibew.org/forums/index.php/topic,192246.msg199920.html for details
2019-02-19 02:31:25 +03:00
88a1b978ce
Merge pull request #241 from Mibew/semver_fix
Loose down semantic versioning expressions
2019-01-23 10:34:07 +03:00
a2946bd67d Loose down semantic versioning expressions
See https://github.com/Mibew/geo-ip-plugin/issues/6 for details
2019-01-22 10:52:25 +03:00
410b925b8d Fix potential issue with incoming visitor name 2019-01-13 19:24:26 +03:00
4f9b48135c Update copyright notices
Actualize the years
2019-01-13 19:17:33 +03:00
5bc4698520 Get rid of get_get_param() function 2019-01-13 17:51:30 +03:00
0f64ad3674 Fix security issue in the build environment 2018-11-27 18:19:07 +03:00
93f949d914 Fix typo in comment 2018-11-26 22:00:13 +03:00
b971d2d85c Update i18n submodule 2018-11-19 19:48:41 +03:00
edd279ca8e Restore ability to reopen iframe with a standard style 2018-11-19 19:13:51 +03:00
525b7de7e2 Make possible to reopen iframe with a custom styled chat
Fixes #238
2018-11-19 19:02:48 +03:00
b6bfc39cbf Bump version 2018-11-19 16:46:52 +03:00
3f4420181c
Update list of official stable plugins in README 2018-11-17 00:49:16 +03:00
94eaed0b2c Update lodash dependency 2018-10-30 03:21:01 +03:00
Fedor A. Fetisov
d747568575 Update i18n submodule 2018-10-30 03:13:59 +03:00
2cda0cbb66 Update i18n submodule 2018-10-17 21:44:25 +03:00
d41db57211 Add link to privacy policy into the leaving message form 2018-10-17 21:41:02 +03:00
bc99761b7a Update i18n submodule 2018-10-17 19:46:20 +03:00
fc2c9d791a Add warnings about need for button regeneration 2018-10-17 19:35:51 +03:00
f9b6eeb92c Fix bug with misinterpretation of 0 as an operator code 2018-08-20 23:10:44 +03:00
2d60df2417 Bump version 2018-08-17 23:24:06 +03:00
6dc0bc8d34 Update i18n submodule 2018-08-17 19:27:23 +03:00
110322ab47 Fix invalid comment 2018-08-17 18:56:07 +03:00
e40be770c3
Merge pull request #235 from Mibew/gdpr
Add optional privacy link to pre-chat survey
2018-08-17 18:48:30 +03:00
d32f9c02ce Add optional privacy link to pre-chat survey
Fixes #227
2018-08-16 19:10:57 +03:00
83185a6b32 Fix invalid comment 2018-08-16 16:38:12 +03:00
a9644ddec1 Prepare database update for the next release 2018-08-16 16:37:08 +03:00
e9b29737c9
Merge pull request #234 from Mibew/mysql_fix
Add support for MySQL 8 (fixes #232)
2018-08-16 12:25:39 +03:00
4f03a73f9a Add support for MySQL 8 (fixes #232) 2018-08-09 16:04:31 +03:00
647bd84995 Update i18n submodule 2018-05-28 18:03:21 +03:00
eb60d6b39f Update i18n submodule 2018-05-28 17:54:28 +03:00
4d038b0777 Bump version 2018-05-25 13:19:55 +03:00
67b0a6005e
Add Mibew Open Street Map plugin to the list of official plugins 2018-05-23 18:25:11 +03:00
d605c80332 Update i18n submodule 2018-05-10 03:56:51 +03:00
98954281d5 Promote usage of Mibew:OpenStreetMap plugin instead of Mibew:GoogleMaps 2018-05-10 03:49:27 +03:00
58e0ddc952 Bump version 2018-04-19 22:30:33 +03:00
f1030c0298 Fix bug with the misbehaviour of the chat toggle
After minimizing the chat it was impossible to use it while browsing the site
2018-04-19 22:20:50 +03:00
9cb71e62c1 Bump version 2018-04-10 19:17:01 +03:00
60ff2c853c Update i18n submodule 2018-04-10 19:15:45 +03:00
6c4e883a8a Fix localization constant 2018-04-10 19:13:23 +03:00
25a4a3db40 Fix code style 2018-03-20 02:20:16 +03:00
5f2aab1501 Fix attempt to restore closed chat in popup 2018-03-20 02:17:14 +03:00
8a2fbc6f38 Fix coding style 2018-02-06 02:18:53 +03:00
2b6779af8f Fix handling of information on updates for absent plugins 2018-02-06 02:11:36 +03:00
efa1372cdc Fix handling of obsolete information on updates 2018-02-06 01:28:48 +03:00
Fedor A. Fetisov
64e902c5a1 Fix version number in VERSION.txt 2018-02-05 17:27:12 +03:00
ee97a2f932 Merge branch 'master' of github.com:Mibew/mibew 2018-02-05 16:42:14 +03:00
4960397655 Fix position of widget toggle element 2018-02-05 16:41:43 +03:00
da03edb665 Change all project related URLs to secure ones 2018-02-02 19:45:40 +03:00
712117dfc4 Update i18n submodule 2018-02-02 19:32:43 +03:00
048e2dd3f0 Update copyright notices
Actualize the years
2018-02-02 19:20:04 +03:00
3beed6b2ec
Merge pull request #221 from Mibew/responsive
Implement responsive design for mobile devices
2018-02-02 17:54:22 +03:00
c62a98b22a Make invitations to chat responsive 2018-01-27 00:57:10 +03:00
20d97e5bce Improve media query logic for responsive design
Fix footer width for mobile devices
2018-01-26 13:08:32 +03:00
2581119295 Restrict responsive design by media query 2018-01-24 18:18:57 +03:00
95c55aa931 Implement responsive design
See https://mibew.org/forums/index.php/topic,191515.msg199759.html for details
2018-01-23 17:45:48 +03:00
059bc5ac39 Update i18n submodule 2018-01-16 19:11:20 +03:00
324a85fb7f
Merge pull request #219 from Mibew/new_perms
New permissions
2018-01-16 18:33:46 +03:00
28e968b15f
Merge pull request #220 from Mibew/cluster_fix
Cluster fix
2018-01-16 18:32:56 +03:00
9d2c4404c0 Remove redundant blank line 2018-01-16 18:13:21 +03:00
d61b142e40 Add missed ids for all textareas 2018-01-16 17:26:28 +03:00
d1a1f51bf0 Wrap chat iframe into a div
This could help make the design responsive
2018-01-16 17:11:23 +03:00
0cf963ac5e Add primary key to revision database table
Fixes #218
2018-01-12 01:07:44 +03:00
5921115af0 Bump version 2018-01-12 01:07:03 +03:00
87d7478864 Fix min PHP version in installer 2018-01-12 01:00:09 +03:00
3179d5b669 Disable management of canned messages for all but admins 2018-01-12 00:32:18 +03:00
8ced21fe86 Hide system information from anyone but admins 2018-01-11 23:35:13 +03:00
84e4de1e7a Add new permission to control access to system statistics 2018-01-11 23:26:13 +03:00
39309d1914 Bump version 2017-11-29 16:46:58 +03:00
194b396788 Remove duplicate license headers from compiled js files 2017-11-28 17:14:46 +03:00
7dd32257d1 Add missed localization for installation steps list 2017-11-22 14:30:49 +03:00
6de62a6929 Don't attach translation.js when in the maintenance mode
Also not sure but maybe it has something to do with #207.
2017-11-22 14:28:37 +03:00
1c6433eb73 Switch to actual handlebars.js library 2017-11-22 14:22:06 +03:00
762998cd4b Update i18n submodule 2017-11-14 22:45:51 +03:00
73abafebac Fix typo in the message 2017-11-14 22:39:24 +03:00
81cd6f75fe Update i18n submodule 2017-11-14 22:24:31 +03:00
42f28a72da Update i18n submodule 2017-11-13 00:20:05 +03:00
69916d8f6d Update i18n submodule 2017-11-12 21:18:14 +03:00
ec2e29083b Bump version 2017-11-12 18:38:53 +03:00
98a5570ef6 Notify operator of potentially irreversible permissions change 2017-11-12 18:36:24 +03:00
3ec1610fff Make possible to remove first user (Fixes #210) 2017-11-12 17:59:50 +03:00
bc39c22c29 Disable versioning for CDN files 2017-11-12 04:39:03 +03:00
2e3b718fe2 Merge branch 'master' of github.com:Mibew/mibew 2017-11-12 04:11:07 +03:00
be8182ffcc Improve gulpfile
Add and fix comments, improve organization and code style
2017-11-12 03:59:14 +03:00
dfaaffcff4 Add new gulp tasks
New tasks intends to automate the process of release uploading to CDN
2017-11-12 02:21:02 +03:00
de782c7fea Automate i18n archives creation via gulp 2017-11-11 02:44:40 +03:00
3ea37e0e11 Create release archives with top-level dir 2017-11-10 18:17:12 +03:00
0f1407682e Fix bug in handle of dirs in gulp 2017-11-10 18:15:59 +03:00
e40e821b5f Add i18n repo as a submodule 2017-11-10 17:05:04 +03:00
31ad9138ef Fix typo in the default config 2017-11-06 02:28:52 +03:00
9cd07fe829 Merge branch 'master' of github.com:Mibew/mibew 2017-11-01 04:26:24 +03:00
4dec01bdaa Correct a bunch of incomplete names of Mibew Messenger 2017-11-01 04:26:08 +03:00
e64670e5aa Fix code style 2017-10-28 01:52:16 +03:00
7c07d7f3e2
Merge pull request #214 from Mibew/fs_fix
Make possible to force secure URLs for iframe styles
2017-10-27 23:23:44 +03:00
f9c5d4dbaf
Merge pull request #213 from Mibew/stats
Make statistics compatible with the default MySQL 5.7 settings
2017-10-27 23:23:26 +03:00
52f203b43d Fix typo in comment 2017-10-18 16:17:46 +03:00
35d80bdcee Fix code style 2017-10-13 19:44:23 +03:00
a6b7367002 Make possible to force secure URLs for iframe styles (Fixes #206) 2017-10-13 19:41:00 +03:00
75c04cae38 Fix potential issue with fallback front page 2017-10-11 16:27:16 +03:00
915b6786d9 Fix erroneous confirmation message 2017-10-11 15:26:18 +03:00
b561f7eec8 Make statistics compatible with the default MySQL 5.7 settings
See
https://mibew.org/forums/index.php/topic,192176.msg199690 for details
2017-10-05 11:38:43 +03:00
89556ae68f Create template for PRs 2017-10-03 19:34:22 +03:00
33149aafb9 Create template for issues 2017-10-03 19:28:35 +03:00
edf8850952 Make symbolic link to license relative 2017-10-03 18:47:56 +03:00
393bf21f30 Add license in Github-compatible way 2017-10-03 18:45:20 +03:00
03a2051ad7 Fix bug with disappearing toggle control (Fixes #209) 2017-10-03 01:41:57 +03:00
51ad3e70d3 Fix unhandled error in plugins list discovering 2017-09-22 17:27:34 +03:00
9417960281 Update the server requirements in README 2017-07-17 19:38:45 +03:00
a312bc5e8f Bump version 2017-07-06 16:10:15 +03:00
a617eebeec Prevent unauthorized access to chat history 2017-07-06 16:00:06 +03:00
38e53aaa6a Bump version 2017-06-27 14:50:02 +03:00
8b6d411d58 Merge pull request #204 from Mibew/styles_fix
Styles fix
2017-06-15 19:34:14 +03:00
1b436f9535 Fix setting of the invitation style 2017-06-15 19:28:47 +03:00
64fccc272c Fix typo in comment 2017-06-09 01:01:51 +03:00
ead790853e Fix setting of the chat style 2017-06-05 18:34:13 +03:00
Fedor A. Fetisov
47e7a81f6f Update year in visible copyright notices 2017-05-26 22:23:30 +03:00
Fedor A. Fetisov
73b11b48af Fix code style 2017-05-26 16:07:26 +03:00
Fedor A. Fetisov
5bb282b3bd Bump version 2017-05-26 16:03:08 +03:00
Fedor A. Fetisov
9608c5a83d Update copyright notice 2017-05-26 16:02:42 +03:00
568e539e49 Merge branch 'ipv6' 2017-05-26 15:42:18 +03:00
Fedor A. Fetisov
8c99b13e12 Improve algorithm in setting the value for a visitor's IP 2017-05-25 12:01:11 +03:00
35bbb22c56 Fix a typo 2017-05-24 16:52:30 +03:00
Fedor A. Fetisov
169b8d3b76 Fix clean task of Gulp
Task 'clean' now compatible with multiple styles (Fixes #200)
2017-05-23 17:12:42 +03:00
d8a63bc2cd Fix invalid algorithm in setting the value for a visitor's IP 2017-05-23 16:16:00 +03:00
f105a0b5d2 Fix inline doc for get_remote_host() 2017-05-22 02:03:29 +03:00
843a6e11ae Define correct remote IP for a visitor (with IPv6 support)
See #197
2017-05-22 02:02:31 +03:00
a5320b07d7 Add Mibew Operator Status to the list of official plugins 2017-03-21 15:31:49 +03:00
3eafe870bc Add Mibew Slack to the list of official plugins 2017-03-18 01:00:59 +03:00
82704cfbd6 Improve instruction for update (Fixes #189) 2017-03-18 00:57:05 +03:00
88ba0f148e Merge pull request #199 from Mibew/gulp_promise
Use promises to build all the styles
2017-03-18 00:49:54 +03:00
Dmitriy Simushev
19376e7f6c More promises to gulpfile.js! 2017-03-16 23:46:01 +03:00
Dmitriy Simushev
3ae6e5cdb4 Use promises to build all the styles 2017-03-13 14:29:16 +03:00
29c9d8dc7d Specify minimal version of Node.js in package.json 2017-03-10 18:07:17 +03:00
7c822661e6 Merge pull request #195 from Mibew/styles
Improve gulp file
2017-03-10 01:56:57 +03:00
3a85c9060b Add watch task (see #179) 2017-03-10 01:45:23 +03:00
834e75cdd6 Compile all styles (see #179) 2017-03-10 01:44:53 +03:00
6ea5f5af11 Merge pull request #194 from Mibew/trusted_proxies
Add "trusted_proxy" option
2017-03-10 00:00:18 +03:00
e2099735e1 Make existing configs backwards compatible with the trusted_proxies option 2017-03-09 23:58:13 +03:00
Dmitriy Simushev
8b1e218862 Add "trusted_proxy" option
Fixes #188
2017-03-09 13:34:57 +00:00
e718518698 Fix permissions for release archives 2017-02-08 10:41:35 +03:00
cc55a13151 Make handlebars cache adapter compatible with the new version of handlebars.php 2016-12-29 18:23:41 +03:00
0fc11b3885 Merge pull request #185 from Mibew/x 2016-12-29 17:50:08 +03:00
16b7297d19 Merge pull request #184 from Mibew/fix_143 2016-12-29 17:49:37 +03:00
1683b7c72a Fix invalid comment 2016-12-29 17:42:11 +03:00
f4ad0a2351 Prevent unnecessary increment of thread revision value
Fixes #149
2016-12-29 17:37:40 +03:00
7f6b193656 Clear routes from cache when a plugin becomes initialized or non-initialized for the first time
Fixes #143
2016-12-29 02:56:50 +03:00
15dbe153f5 Implement cache for Plugin Manager 2016-12-28 19:51:11 +03:00
547efb38e4 Load plugins after the cache initialization 2016-12-28 19:31:22 +03:00
f44ccdc4e1 Remove irrelevant comment 2016-12-28 19:19:44 +03:00
1549125665 Fix bug with failed initialization of plugins that does not need config at all 2016-12-28 19:18:46 +03:00
cf76dd744d Store plugin initialization status in the database 2016-12-28 17:30:33 +03:00
57afba72e8 Update database schema
Add into the plugins table a column to store last known initialization status
2016-12-28 03:55:18 +03:00
3f97ad09df Bump version 2016-12-28 03:53:39 +03:00
00213f806c Implement minification of the chat iframe
Fixes #153
2016-12-28 03:30:02 +03:00
d0f1c50f51 Implement toggle method for iframe-based chat popup 2016-12-27 19:39:11 +03:00
bc16b7c25f Update list of repos in README 2016-12-27 17:56:18 +03:00
5424424eaf Remove duplicate init for isOnline 2016-12-26 18:26:22 +03:00
7aed881f08 Fix naming for the new template variable 2016-12-26 18:22:51 +03:00
ca169c5bc7 Make possible to determine whether an operator is online at any page of the administrative interface
Fixes #181
2016-12-24 03:33:49 +03:00
7041adcdfb Remove built-in (and broken) geo location feature from the core
Fixes #173
2016-12-23 17:35:42 +03:00
ffcdb223cc Fix typos in comments 2016-12-23 15:33:49 +03:00
c70bdfcd90 Prevent system from using uninitialized values when configuration doesn't exists 2016-12-23 15:32:14 +03:00
d512573af8 Make sure that configuration file exist
Fixes #105
2016-12-23 15:21:13 +03:00
0527a9def1 Remove double escape of values in the tracked path of a visitor.
Fixes #137
2016-12-23 14:43:19 +03:00
09ef31e750 Update versions requirements for Gulp 2016-12-08 18:10:19 +03:00
9213453bc3 Merge pull request #176 from J-Fricke/php7
Implement PHP7 compatibility
2016-11-18 14:07:35 +03:00
Joshua Fricke
8c3cbf0489 feat: set min version for xamin/handlebars.php to ~0.10.3 2016-11-02 14:55:13 -07:00
Joshua Fricke
45ac4ec1ee feat: update justblackbird/handlebars.php-helpers dependency to v1
* update .../String namespace to .../Text in Handlebars/Helpers.php
2016-09-22 13:42:12 -07:00
e3123d7c45 Update forgotten version number 2016-08-10 18:02:42 +03:00
680059dece Fix code styling in the contributed code 2016-08-09 18:21:25 +03:00
e9526daf1c Bump version 2016-08-09 18:07:11 +03:00
a2774b8fb9 Merge pull request #171 from Mibew/nav666-patch-1
Try to initialize session only once
2016-08-09 18:01:02 +03:00
5618a334d9 Merge pull request #170 from Mibew/Silron88-patch-2
Fix possible duplicate messages on submit
2016-08-09 17:54:17 +03:00
Silron88
8b32bebdc2 fix: if click send and before message is sended click send again then message will be duplicated 2016-08-08 18:51:54 +03:00
788a18f7f1 Merge branch 'patch-1' of https://github.com/nav666/mibew into nav666-patch-1 2016-08-08 18:40:57 +03:00
ad186da482 Update copyright notices 2016-08-08 18:31:45 +03:00
345cb1748a Merge pull request #167 from candido1212/patch-1
Add missing localization constant
2016-08-08 17:25:12 +03:00
e8f07d27ef Merge pull request #168 from nav666/patch-2
Fix issue with invalid default weight for memcached server in config
2016-08-08 17:24:08 +03:00
e64fe1eb17 Bump version 2016-06-28 16:20:12 +03:00
Dmitriy Simushev
e6dfd1dfec Fix unused vars in JS code 2016-06-09 20:55:59 +00:00
Dmitriy Simushev
a56e775ab9 Make ES lint stop nagging about unused argument of catch statement 2016-06-08 18:20:00 +00:00
Dmitriy Simushev
ce3a59b13c Remove unreachable js code 2016-06-04 14:03:37 +00:00
Dmitriy Simushev
85d1acad5e Refer to jQuery as 'jQuery' and not '$' 2016-06-04 14:02:05 +00:00
Dmitriy Simushev
13dd999158 Add all missed semicolons to JS app
Yes, I know about ASI and that the simicolons are not actually
needed in most cases, but I belive the code looks better when
semicolons are in places.
2016-06-03 14:23:17 +00:00
Dmitriy Simushev
cb3bd91b76 Fix indent in JS app 2016-06-03 13:34:55 +00:00
Dmitriy Simushev
d5130ed655 Make sure all for-in loops works as expected 2016-06-02 23:20:24 +00:00
Dmitriy Simushev
199438285c Merge branch 'stweil-typos' 2016-06-02 12:09:21 +00:00
Stefan Weil
a149731c46 Fix some typos in variable names and strings
Most of them were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-05-30 23:00:08 +02:00
Dmitriy Simushev
2e629df611 Add gulp task for JavaScript files linting 2016-05-30 13:15:50 +00:00
Dmitriy Simushev
fcdc1021af Merge branch 'stweil-typos' 2016-05-28 10:11:03 +00:00
Stefan Weil
ce5cbaa850 Fix some typos in comments (most of them found by codespell)
Fix also an error string in Updater.php.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-05-28 12:02:30 +02:00
dcd243505d Merge pull request #155 from aburakovskiy/master
Add ability to ban forever
2016-05-04 20:05:11 +03:00
Alexander Burakovskiy
4d32e942a3 Add ability to ban forever 2016-05-04 13:14:10 +03:00
nav666
95909d7ed4 Update default_config.yml 2016-04-07 02:41:19 +03:00
nav666
fad8ca5854 Update init.php 2016-04-07 02:24:01 +03:00
Candido
cd3778ca0d Add translate to string "cannot load avatar" 2016-03-07 11:27:35 -03:00
Dmitriy Simushev
8fe1498847 Merge pull request #151 from aburakovskiy/master
Fix thread ban
2016-03-01 13:59:40 +03:00
Alexander Burakovskiy
0edc9657b4 Fix thread ban 2016-02-25 14:53:15 +02:00
9fe423db62 Fix syntax errors 2015-08-23 22:15:10 +03:00
Dmitriy Simushev
a9e7114375 Reduce duplication in get_operators_from_adjacent_groups function 2015-08-05 14:38:49 +00:00
Dmitriy Simushev
e150bd1d26 Mark get_all_groups_for_operator function as deprecated 2015-08-05 14:35:13 +00:00
Dmitriy Simushev
4c9f963aa7 Fix groups isolation
See #131 for details
2015-08-05 14:22:56 +00:00
Dmitriy Simushev
9d81661cfe Fix history for operator without colleagues whose threads he can view
Fixes #132
2015-08-05 13:48:42 +00:00
fcd3cacfbc Add brief update instruction into README 2015-07-24 13:23:42 +03:00
Dmitriy Simushev
3edc959096 Bump version 2015-07-14 11:38:49 +00:00
Dmitriy Simushev
d656d8fe38 Update PHPCode Sniffer 2015-07-08 10:07:11 +00:00
Dmitriy Simushev
eccbb59bcc Require PHP's mbstring extension
Fixes #125
2015-06-19 11:26:03 +00:00
Dmitriy Simushev
8457e51717 Add THREAD_USER_IS_READY event 2015-06-19 11:15:07 +00:00
Dmitriy Simushev
227c7a9410 Localize message about no available updates at the "About" page 2015-06-10 13:02:01 +00:00
Dmitriy Simushev
9c92fda11b Localize "Download" link caption at the "About" page 2015-06-10 12:54:34 +00:00
Dmitriy Simushev
896f090aba Show history for group's related threads when isolation is on 2015-06-10 08:37:54 +00:00
Dmitriy Simushev
5363698020 Make sure appropriate defaults for omitted configs are used 2015-06-08 14:20:45 +00:00
Dmitriy Simushev
aa0c213cc3 Deny access for another's history in groups isolation mode 2015-06-08 14:18:39 +00:00
Dmitriy Simushev
5009f51342 Deny access to history for operators without CAN_VIEWTHREADS permission 2015-06-08 10:08:27 +00:00
Dmitriy Simushev
b340206d3a Merge branch 'auto_update' 2015-06-05 14:47:12 +00:00
Dmitriy Simushev
2cbb0c4134 Set correct instance ID when checking updates manually 2015-06-05 14:38:18 +00:00
Dmitriy Simushev
8c574ec88c Update Updates Server URL one more time 2015-06-05 14:28:12 +00:00
Dmitriy Simushev
5af9f92102 Send instance ID to the updates server 2015-06-05 11:53:39 +00:00
Dmitriy Simushev
6bf331b355 Rename "available_update" table to "availableupdate"
This is needed to follow naming convention
2015-06-05 11:39:44 +00:00
Dmitriy Simushev
4b74ceb854 Fix "available_update" table schema 2015-06-05 11:34:13 +00:00
Dmitriy Simushev
25054c4e0f Add "_instance_id" setting 2015-06-05 11:33:19 +00:00
Dmitriy Simushev
fbe53e3b29 Create getter for update checker inside the cron worker 2015-06-05 09:45:25 +00:00
Dmitriy Simushev
5397f7014a Fix default URL of updates server 2015-06-04 10:16:51 +00:00
Dmitriy Simushev
ebb3cf8ab1 Use the latest version of JSON2 from Douglas Crockford's repository 2015-06-01 13:35:58 +00:00
Dmitriy Simushev
55e7dbe704 Update Bower dependencies
Backbone.js and Underscrore.js left untouched because of versions
conflict with Marionette.js
2015-06-01 13:28:07 +00:00
Dmitriy Simushev
f13d938bde Update build dependencies 2015-06-01 13:08:15 +00:00
Dmitriy Simushev
0ff5c7c28a Fix localization constant at locale edit page 2015-05-28 14:42:10 +00:00
Dmitriy Simushev
fc789e6ef9 Improve statistics aggregation algorithm a little 2015-05-28 13:49:42 +00:00
Dmitriy Simushev
9f3ce28877 Remove unused "use" statement 2015-05-28 13:22:46 +00:00
Dmitriy Simushev
4e7f9eac50 Provide a way to disable automatical updates checking 2015-05-26 14:45:34 +00:00
Dmitriy Simushev
2fc85b1068 Add "check for updates" button to "about" page 2015-05-26 14:19:09 +00:00
Dmitriy Simushev
930ea9a6ac Show info about cURL extension at "About" page 2015-05-26 13:54:39 +00:00
Dmitriy Simushev
d4ebd68052 Show list of available updates at "About" page 2015-05-26 13:53:22 +00:00
Dmitriy Simushev
e9d41c4869 Fix name of "available_update" table 2015-05-26 13:34:58 +00:00
Dmitriy Simushev
577c2be622 Create a way to automatically get info about available updates 2015-05-26 13:19:13 +00:00
Dmitriy Simushev
8e7fe6bcd7 Remove debug statements from CronWorker 2015-05-26 12:17:32 +00:00
Dmitriy Simushev
973cc5746e Remove unused "use" statement 2015-05-22 12:55:49 +00:00
Dmitriy Simushev
8326eb3ebf Merge branch 'editable_locales'
This allows to edit locales meta info using UI
2015-05-22 12:22:27 +00:00
Dmitriy Simushev
e9baceb039 Add an ability to change locale setting using UI
Fixes #99
2015-05-22 11:26:48 +00:00
Dmitriy Simushev
720b72f8e4 Use the latest version of PHPCS from the repository 2015-05-22 10:59:46 +00:00
a3ebe57f1f Bump version 2015-05-22 13:40:33 +03:00
Dmitriy Simushev
d9dc5e0ed7 Fix password form disapearing on installation 2015-05-21 14:09:28 +00:00
Dmitriy Simushev
bc024c3253 Fix layout for install and login pages 2015-05-21 13:58:54 +00:00
Dmitriy Simushev
137d92624e Store locales' meta info in the database 2015-05-21 12:39:36 +00:00
Dmitriy Simushev
5d13afd8f6 Make sure visitor name is not empty in prechat survey 2015-05-08 14:54:53 +00:00
Dmitriy Simushev
5628f42782 Make sure Thread::groupId is always integer
See https://mibew.org/forums/index.php/topic,191756.0.html for details
about why it's needed.
2015-05-08 12:46:50 +00:00
Dmitriy Simushev
eae5b8bb06 Make rewrite rules work with old Apache
See https://mibew.org/forums/index.php/topic,191761.0.html
2015-05-07 14:17:14 +00:00
Dmitriy Simushev
40fef4e360 Fix "replace" Handlebars.js helper 2015-05-07 13:23:53 +00:00
Dmitriy Simushev
ab35143e18 Add gulp "rebuild" task 2015-04-17 14:18:59 +00:00
Dmitriy Simushev
f176ac628b Use clean inside "default" gulp task 2015-04-17 13:07:25 +00:00
Dmitriy Simushev
7a09546198 Fix docs for EventDispatcher\Events::BUTTON_GENERATE const 2015-04-15 14:30:44 +00:00
Dmitriy Simushev
47672a5eb6 Fix gulp clean task 2015-04-14 11:43:56 +00:00
Dmitriy Simushev
3307ba01dc Fix bug with race condition on build 2015-04-14 11:39:33 +00:00
7d3558460b Bump version 2015-04-14 13:47:23 +03:00
Dmitriy Simushev
2fdb7e4525 Update copyrights in the default page style CSS file 2015-04-08 09:46:10 +00:00
Dmitriy Simushev
48d8805605 Add "Show menu" link at awaiting users page
Fixes #95
2015-04-08 09:44:05 +00:00
Dmitriy Simushev
e4a104f52e Add CLI cron worker 2015-04-01 15:28:10 +00:00
Dmitriy Simushev
ff09ea09cc Extract CronWorker from CronController 2015-04-01 15:24:51 +00:00
Dmitriy Simushev
a4ce7ffea7 Clean up before release preparation 2015-03-31 10:54:34 +00:00
0f8b5da18a Bump version 2015-03-30 14:10:55 +03:00
Dmitriy Simushev
1a358c2f09 Don't call set_csrf_token() function in controllers 2015-03-27 15:19:10 +00:00
Dmitriy Simushev
b56881bf01 Mark Database::throwExeptions method as deprecated
This is done because the method has a typo in the name.
2015-03-27 15:05:17 +00:00
Dmitriy Simushev
59de37a12b Automatically reject invitation when visitor goes to another page 2015-03-27 14:34:53 +00:00
Dmitriy Simushev
2a819b1b98 Allow using "?" and "*" wildcards for history search 2015-03-27 13:29:12 +00:00
Dmitriy Simushev
a9eb9f8cf2 Mark thread as chatting right after an invitation is accepted 2015-03-27 12:31:11 +00:00
Dmitriy Simushev
70f630d125 Rewrite Thread::take method to simplify it 2015-03-27 12:29:54 +00:00
Dmitriy Simushev
0075e2169c Add a function that loads online operators 2015-03-26 10:46:50 +00:00
Dmitriy Simushev
f47a67fd57 Notify operators only about threads that are waiting for the answer 2015-03-25 14:41:42 +00:00
Dmitriy Simushev
b2bb9cfb92 Do not show alert if another one is already shown 2015-03-25 14:28:03 +00:00
Dmitriy Simushev
a3f68852ce Fix broken avatar URL in invitation 2015-03-24 15:29:18 +00:00
Dmitriy Simushev
2031d82600 Bump version 2015-03-24 15:05:05 +00:00
Dmitriy Simushev
31b09570f9 Allow to use multiple memcached servers for caching 2015-03-24 15:01:39 +00:00
Dmitriy Simushev
b18aef404a Use bower for managing client side dependencies
Fixes #117
2015-03-23 16:42:32 +00:00
Dmitriy Simushev
6fb71835bf Update Handlebars.js to v3.0.0 2015-03-23 10:05:40 +00:00
Dmitriy Simushev
22aaedd3be Add support of memcached storage for caching 2015-03-20 15:26:15 +00:00
Dmitriy Simushev
758203b6d3 Encapsulate cache pool instantiation in CacheFactory 2015-03-20 14:59:11 +00:00
Dmitriy Simushev
57182b0589 Forbid access to cache files 2015-03-20 13:24:34 +00:00
Dmitriy Simushev
0f44076e48 Use unexpired cache for routes by default 2015-03-20 13:15:32 +00:00
Dmitriy Simushev
094139dead Add routes caching 2015-03-20 13:08:04 +00:00
Dmitriy Simushev
30fd4bad7c Add HTTP caching headers to translations.js
Fixes #70
2015-03-19 12:04:42 +00:00
Dmitriy Simushev
9fef4b2871 Simplify working with Asset Manager in Handlebars helpers 2015-03-19 09:55:58 +00:00
Dmitriy Simushev
db702e43c9 Simplify working with Router in Handlebars helpers 2015-03-19 09:34:16 +00:00
Dmitriy Simushev
93c5cb995a Update Vex.js to v2.3.2 2015-03-18 13:15:41 +00:00
Dmitriy Simushev
5fada43676 Update Marionette.js to v2.4.1 2015-03-18 13:07:26 +00:00
Dmitriy Simushev
adac8fb3fd Update Underscore.js to v1.8.2 2015-03-18 12:57:56 +00:00
Dmitriy Simushev
0eef94a164 Update composer dependencies 2015-03-18 12:50:09 +00:00
Dmitriy Simushev
3c0c880661 Add CSRF protection for password recovery forms 2015-03-17 14:41:31 +00:00
Dmitriy Simushev
e122d020eb Add CSRF protection to login form 2015-03-17 14:22:32 +00:00
Dmitriy Simushev
a8629df5ec Use "encodeURIComponent" instead of "escape" in popup windows JS
This also fixes passing client's URL for IDN domains to the server.
2015-03-17 13:47:23 +00:00
Dmitriy Simushev
415005e2f6 Fix validation for empty emails 2015-03-17 13:25:00 +00:00
Dmitriy Simushev
6e78c45c67 Allow using email with IDN domains at the server side 2015-03-17 12:25:25 +00:00
Dmitriy Simushev
6ac77e629a Improve email validation at the client side 2015-03-17 12:24:21 +00:00
Dmitriy Simushev
313e854723 Move email validation function to Mibew\Mail\Utils class 2015-03-17 10:36:45 +00:00
Dmitriy Simushev
4332d9c205 Use third-party library to validate email at client side 2015-03-17 10:31:37 +00:00
Dmitriy Simushev
833d2a9096 Use PHP's filter_var function for email validation 2015-03-16 15:58:34 +00:00
Dmitriy Simushev
6e71f0542b Store relative avatar path in database
Also it fixes #114
2015-03-16 12:56:36 +00:00
f6fe379a54 Add information on cron job into README 2015-03-10 18:18:22 +03:00
Dmitriy Simushev
cc5adc17b2 Use correct field to pass operator's requests frequency to client side
Fixes #112
2015-03-04 09:56:37 +00:00
284318a287 Update version 2015-02-24 18:21:20 +03:00
Dmitriy Simushev
edcd348bca Fix bug with single popup window openning 2015-02-20 14:22:59 +00:00
Dmitriy Simushev
21ae86958d Remove unused AbstractGenerator::getChatUrlForJs method 2015-02-03 16:20:39 +00:00
Dmitriy Simushev
0dca0bb57d Build correct URLs for chat popups 2015-02-03 16:19:01 +00:00
Dmitriy Simushev
933ced4575 Do not use HTML entities inside script tag
Fixes #107
2015-02-03 16:17:52 +00:00
Dmitriy Simushev
232d69cf72 Use Vex.js for alert, confirm and prompt 2015-02-03 14:23:32 +00:00
Dmitriy Simushev
c1850f0bb3 Use async notice for alert, confirm and prompt functions 2015-02-03 14:08:52 +00:00
Dmitriy Simushev
ebd6684d4a Switch to PHPCS 2.x 2015-02-03 09:49:00 +00:00
Dmitriy Simushev
62f958622c Use stable version of UA parser 2015-02-03 09:46:07 +00:00
Dmitriy Simushev
626145340e Fix setting current database version in the Updater 2015-01-26 12:17:52 +00:00
Dmitriy Simushev
84b0d891e0 Update dependencies of the build system 2015-01-23 11:47:12 +00:00
Dmitriy Simushev
ef98d5056a Make the project buildable on windows 2015-01-23 11:34:24 +00:00
Dmitriy Simushev
ea0b6a0cd5 Add "widgetResponseAlter" event 2015-01-22 12:58:53 +00:00
Dmitriy Simushev
f015b5b820 Pass an instance of Request Processor to *_FUNCTION_CALL events 2015-01-22 11:41:35 +00:00
Dmitriy Simushev
6d3810b7ba Improve Mibew.Utils.toDashFormat JS function 2015-01-21 11:49:27 +00:00
Dmitriy Simushev
e273b04dab Remove unneded condition from profile controller 2015-01-21 11:48:40 +00:00
Dmitriy Simushev
9799fb5e3f Fix "empty password" notification 2015-01-21 11:28:13 +00:00
Dmitriy Simushev
c27a0e1aea Use correct login to generate password hash when it is changed 2015-01-21 11:22:12 +00:00
47ee6edaad Update copyright notices 2015-01-21 14:04:29 +03:00
b8d2af4c67 Update version 2015-01-21 13:05:41 +03:00
Dmitriy Simushev
8faa0d9f4e Hide iframe popup while its real styles are loading 2015-01-21 09:49:50 +00:00
Dmitriy Simushev
9ef0739b80 Show ajax loader while chat iframe is loading 2015-01-20 14:45:41 +00:00
Dmitriy Simushev
ad7f3d6167 Do not define widget code twice 2015-01-20 14:44:21 +00:00
Dmitriy S. Simushev
78dfb230ed Merge pull request #102 from Mibew/dashboard
Dashboard
2015-01-20 16:58:05 +03:00
Dmitriy Simushev
854a4ca010 Switch to dev version of UAParser 2015-01-20 13:55:50 +00:00
Dmitriy Simushev
7fde2eb9cd Add ability to use mibew in an iframe
Fixes #63
2015-01-20 13:48:28 +00:00
8c6d98ddbd Remove useless attribute 2015-01-19 13:39:12 +03:00
c2229a6c79 Improve dashboard look'n'feel 2015-01-17 15:16:10 +03:00
Dmitriy Simushev
120abce028 Fix invitation window params 2015-01-16 10:40:06 +00:00
Dmitriy Simushev
a6d6f2bea2 Add Mibew.Utils.deleteCookie function to widget.js 2015-01-15 13:31:50 +00:00
Dmitriy Simushev
3f6a95f7a6 Use human-readable way to define visitor track window params 2015-01-14 14:37:30 +00:00
Dmitriy Simushev
090f650ac1 Use human-readable way to define user track window params 2015-01-14 14:25:51 +00:00
Dmitriy Simushev
06109eb0c4 Use human-readable way to define ban window params 2015-01-14 14:20:15 +00:00
Dmitriy Simushev
f6938b2f13 Remove unused configs from default page style 2015-01-14 14:12:57 +00:00
Dmitriy Simushev
9467525dac Remove unneeded default configs from ChatStyle 2015-01-14 13:50:32 +00:00
Dmitriy Simushev
1914b23c74 Use human-readable way to define history window params 2015-01-14 13:38:39 +00:00
Dmitriy Simushev
e333ff3d27 Rename Mibew.Utils.buildWindowOptions to buildWindowParams 2015-01-14 12:56:24 +00:00
Dmitriy Simushev
a5b7002239 Use human-readable way to define send mail window params 2015-01-14 12:51:38 +00:00
Dmitriy Simushev
9faf346634 Use human-readable way to define chat window params 2015-01-14 12:25:25 +00:00
Dmitriy Simushev
67a0db5349 Add JS "buildWindowOptions" utility method 2015-01-14 12:14:49 +00:00
Dmitriy Simushev
e5b8c84736 Allow plugins depend on environment
Fixes #98
2015-01-13 11:32:33 +00:00
Dmitriy Simushev
090383bc95 Use UA Parser from packagist.org instead of GitHub repo 2015-01-12 11:21:27 +00:00
Dmitriy S. Simushev
52107afc1a Merge pull request #100 from Mibew/invitations_fix
Prevent use of undefined values on display of chat invitation
2015-01-12 11:46:15 +03:00
Dmitriy S. Simushev
3b9ded0b29 Merge pull request #101 from Mibew/missed_constant
Replace old localization constant with a valid string
2015-01-06 21:58:56 +03:00
c51a3ee5a1 Replace old localization constant with a valid string 2015-01-06 20:32:31 +03:00
ba9c01b82c Prevent use of undefined values on display of chat invitation 2015-01-03 03:13:19 +03:00
Dmitriy Simushev
132ca02cdf Allow to use any browser for chat
There are too many browsers in the world thus we cannot really say
is the current browser is fully supported or not. Give a chance to
all browsers.
2014-12-29 15:39:13 +00:00
Dmitriy Simushev
9cd082b878 Use third party library to detect user's browser 2014-12-29 15:04:24 +00:00
Dmitriy Simushev
efbf92b012 Use multi-level style configs 2014-12-29 11:30:33 +00:00
Dmitriy Simushev
ff1940cdc5 Mibew does not use "iconv" library anymore 2014-12-29 09:29:13 +00:00
Dmitriy Simushev
6a17db4e04 Operators can post messages only to own threads 2014-12-25 15:28:47 +00:00
Dmitriy Simushev
5a2e48eeef Fix ID style in operator's code field 2014-12-25 13:36:11 +00:00
Dmitriy Simushev
b9fd28f20f Do not show "visitor navigate" message if the page is not changed 2014-12-25 12:42:03 +00:00
Dmitriy Simushev
1a8f50adb0 Move "about" link to "Others" section 2014-12-24 16:00:50 +00:00
Dmitriy Simushev
31d602986e Move link to profile to operator's name in the top right corner
Fixes #93
2014-12-24 15:31:13 +00:00
Dmitriy Simushev
fb83027a1e Truncate operator's avatar in invitation
Fixes #96
2014-12-24 13:44:27 +00:00
Dmitriy Simushev
19edc91dfd Add warning sign to "run update wizard" notice 2014-12-24 12:59:26 +00:00
Dmitriy Simushev
27a23f68c0 Remove unneeded versions
Fixes #97
2014-12-24 12:50:27 +00:00
Dmitriy Simushev
1306efd380 Move header logo's styles to css 2014-12-24 12:08:53 +00:00
Dmitriy Simushev
b19473f658 Add link to dashboard to mibew logo
Fixes #94
2014-12-24 12:03:41 +00:00
Dmitriy Simushev
53c60eed76 Exclude JS sources from release package 2014-12-23 14:48:26 +00:00
Dmitriy Simushev
1fae58c350 Remove separate license page 2014-12-23 14:45:14 +00:00
Dmitriy Simushev
0c00a697ec Update build dependencies 2014-12-23 14:36:59 +00:00
Dmitriy Simushev
7e8ea1cdbf Update copyright notice at the about page 2014-12-23 14:32:46 +00:00
Dmitriy Simushev
a39d0fa6cf Fix typo at the about page 2014-12-23 13:55:36 +00:00
Dmitriy Simushev
b40e1deb89 Remove latest version placeholder from about page 2014-12-23 13:52:11 +00:00
Dmitriy Simushev
ee751b471d Use new gateway for latest version info 2014-12-23 13:46:43 +00:00
Dmitriy Simushev
782e9895e5 Show another info on the about page 2014-12-23 13:33:27 +00:00
Dmitriy Simushev
8552881f7d Move system info to about page 2014-12-23 12:51:40 +00:00
Dmitriy Simushev
9bfd6a29fb Use new icon for add group, operator, etc. buttons. 2014-12-23 10:48:53 +00:00
Dmitriy Simushev
f5c80e7b5c Add about page
Fixes #53
2014-12-23 10:22:22 +00:00
Dmitriy Simushev
d7a5c1d9c1 Use new dashboard icons
The icons are taken from http://www.icojam.com/blog/?p=259
2014-12-22 15:44:57 +00:00
Dmitriy Simushev
e66e0c1452 Update jQuery to v1.11.2 2014-12-22 10:16:59 +00:00
Dmitriy Simushev
21daf749f0 Allow markup in leave message page description 2014-12-19 13:50:40 +00:00
Dmitriy Simushev
1e46d6fabd Add notice about statistics aggregation 2014-12-19 13:24:07 +00:00
Dmitriy Simushev
8b34ca34c7 Remove statistics_aggregation_interval setting 2014-12-19 12:36:41 +00:00
Dmitriy Simushev
964e917f4a Provide easy way to override views in JS application 2014-12-18 14:42:11 +00:00
Dmitriy Simushev
210e82e798 Use correct ID for dynamically loaded scripts 2014-12-18 14:05:32 +00:00
Dmitriy Simushev
243fa1a1d9 Remane "mibewAgentButton" id to "mibew-agent-button" 2014-12-18 13:54:46 +00:00
Dmitriy Simushev
506425a9e1 Clean up JS in the default page style 2014-12-18 13:20:35 +00:00
Dmitriy Simushev
a72a602120 Update Marionette.js to v2.3.0 2014-12-18 12:57:44 +00:00
Dmitriy S. Simushev
bcd2bb9242 Merge pull request #89 from Mibew/remove_link
Remove useless link from popup window with a thread history
2014-12-17 20:35:10 +03:00
Dmitriy S. Simushev
a6e6993a65 Merge pull request #88 from Mibew/layout_fix
Fix layout on plugins page
2014-12-17 20:34:40 +03:00
054133e013 Remove useless link from popup window with a thread history 2014-12-17 19:31:28 +03:00
2d875ba623 Fix layout on plugins page 2014-12-17 19:15:25 +03:00
Dmitriy S. Simushev
e6f6fd7d38 Merge pull request #87 from Mibew/issue73
Beautify stylesheets and fix #73
2014-12-17 16:50:46 +03:00
792acd7b17 Beautify stylesheets and fix #73 2014-12-17 15:38:52 +03:00
Dmitriy Simushev
30d884b699 Use static file for license during installation 2014-12-17 11:42:05 +00:00
Dmitriy Simushev
bc14d1f0ef Let the system work without mailer configs 2014-12-17 10:46:42 +00:00
Dmitriy S. Simushev
062a4c1090 Merge pull request #86 from Mibew/fix_typo
Fix typo in string constant
2014-12-17 13:09:26 +03:00
134bbb9984 Fix typo in string constant 2014-12-17 00:04:01 +03:00
Dmitriy Simushev
a441bed2a2 Move common helpers to a separate composer package 2014-12-16 16:00:20 +00:00
Dmitriy Simushev
f5ee6448e4 Store project meta info only in composer.json 2014-12-11 14:21:20 +00:00
Dmitriy Simushev
3e77eddb33 Exclude vendor binaries from release package 2014-12-11 14:06:15 +00:00
Dmitriy Simushev
ad8c815b3c Use SESSION_PREFIX everywhere 2014-12-11 13:56:22 +00:00
Dmitriy Simushev
96724464e2 Create missed templates at "operator/mail-template" page 2014-12-11 13:20:20 +00:00
Dmitriy Simushev
8f346ae0b7 Do not die if "leave_message" mail template cannot be loaded 2014-12-11 13:07:17 +00:00
Dmitriy Simushev
8a47afef58 Do not die if "user_history" mail template cannot be loaded 2014-12-11 13:04:25 +00:00
Dmitriy Simushev
6768fe96c2 Use "en" locale as a fallback for MailTemplate 2014-12-11 12:48:53 +00:00
Dmitriy Simushev
c4a47928a8 Add warning about uncaught exception to AbstractProcessor 2014-12-11 11:57:57 +00:00
Dmitriy Simushev
ec06357535 Use stable version of Handlebars.php 2014-12-11 11:26:29 +00:00
Dmitriy Simushev
bb1b6c377c Log error when "Internal Server Error" page is shown 2014-12-11 10:48:00 +00:00
Dmitriy Simushev
9c87fadb7d Clean up ImageGenerator::getWidgetCode method 2014-12-11 10:18:24 +00:00
Dmitriy S. Simushev
db7aa3d12a Merge pull request #84 from Mibew/button_fix
Fix button generation with disabled visitors tracking
2014-12-11 13:14:40 +03:00
304de4ab71 Fix button generation with disabled visitors tracking 2014-12-10 19:48:34 +03:00
Dmitriy S. Simushev
3e5f589972 Merge pull request #83 from Mibew/connection_timeout
Fixes #65
2014-12-10 19:32:15 +03:00
Dmitriy Simushev
6fbee71173 Add an ability to use SMTP mail transport 2014-12-10 16:21:59 +00:00
07c015856e Fixes #65 2014-12-10 19:09:04 +03:00
Dmitriy Simushev
17b7bf6757 Use Object-Oriented approach for mail templates 2014-12-10 11:50:57 +00:00
Dmitriy Simushev
e0716bbeb2 Fix bug with "plugin" table fields sizes 2014-12-10 11:15:23 +00:00
Dmitriy Simushev
4e4f0adfd6 Use SwiftMailer to send emails 2014-12-09 14:40:16 +00:00
Dmitriy Simushev
a66e23fe9b Remove unneeded TODO from HomeController 2014-12-09 11:55:35 +00:00
80565efefb Update README 2014-12-08 16:18:34 +03:00
3a325ecc6c Update info on system requirements 2014-12-08 15:12:24 +03:00
Dmitriy Simushev
aa28272dbd Update Symfony Components 2014-12-05 15:53:18 +00:00
Dmitriy Simushev
097ec6ef1a Add info about current plugin state 2014-11-28 15:18:48 +00:00
Dmitriy Simushev
2bdfebc428 Add PluginManager::hasPlugin method 2014-11-28 15:02:16 +00:00
Dmitriy Simushev
5282e789ba Use PluginInfo::needsUpdate instead of checking versions directly 2014-11-28 14:38:54 +00:00
Dmitriy Simushev
b0aa66c7cf Fix issue with sprintf arguments in PluginManager 2014-11-28 14:25:07 +00:00
Dmitriy Simushev
772aa904d9 Add plugins update stuff 2014-11-28 14:20:47 +00:00
Dmitriy Simushev
459f75727a Provide an ability to use static methods as updates 2014-11-28 13:34:37 +00:00
Dmitriy Simushev
e2d4ab3715 Recognize alpha and rc versions in updates names 2014-11-28 11:46:27 +00:00
Dmitriy Simushev
80f5873d9a Move getUpdates to Maintenance\Utils class 2014-11-28 11:02:55 +00:00
Dmitriy Simushev
abdfa54f36 Update Handlebars.php 2014-11-27 15:42:30 +00:00
Dmitriy Simushev
361e424acd Merge two localization constants in plugins template 2014-11-27 15:08:52 +00:00
Dmitriy Simushev
7ac85ac412 Check that all needed PHP extensions are loaded before install 2014-11-27 13:01:25 +00:00
Dmitriy Simushev
80077be185 Implement new plugin management system 2014-11-27 11:42:23 +00:00
014a7fabcb Merge pull request #80 from Mibew/issue61
Fix setting of tracking cookie for TLDs
2014-11-27 13:37:26 +03:00
a2fee28bba Fix setting of tracking cookie for TLDs
Fixes #61
2014-11-26 20:02:15 +03:00
Dmitriy Simushev
f7434502b7 Add PluginInfo::getInstance method 2014-11-25 12:22:49 +00:00
Dmitriy Simushev
a4361fe8ce Create plugin info wrapper 2014-11-24 10:37:08 +00:00
Dmitriy Simushev
48978fb060 Add a function to check if a plugin exists or it does not. 2014-11-24 10:13:51 +00:00
Dmitriy Simushev
03a8eab3d1 Fix undefined index in ThreadProcessor::processFunction 2014-11-21 15:49:03 +00:00
Dmitriy Simushev
428c592139 Statically cache results of Plugin\Utils::discoverPlugins 2014-11-21 13:06:44 +00:00
Dmitriy Simushev
dca7c2c520 Fix comments in Mibew\Ban class 2014-11-21 13:00:30 +00:00
Dmitriy Simushev
c9c1ffca4e Remove unused "use" statement 2014-11-20 10:06:30 +00:00
Dmitriy Simushev
ad5554bb52 Fix coding style in Mibew\Plugin\Utils 2014-11-20 09:50:32 +00:00
Dmitriy Simushev
bf7642dab3 Run plugins only after all libs are loaded 2014-11-20 09:26:03 +00:00
Dmitriy Simushev
a63f4ced3d Create a method for plugin class name building 2014-11-19 14:19:01 +00:00
Dmitriy Simushev
b896d43db7 Use more strict policy for plugin names 2014-11-19 14:06:19 +00:00
Dmitriy Simushev
f4b08ff0a3 Add plugins discovery means 2014-11-19 13:15:41 +00:00
Dmitriy Simushev
c70764dab2 Use regular singleton in Mibew\Plugin\PluginManager 2014-11-19 12:50:08 +00:00
Dmitriy Simushev
542b830577 Return false from PluginManager::getPlugin for unregistered plugins 2014-11-19 11:58:50 +00:00
Dmitriy Simushev
bfe902e062 Rename Mibew\Plugin\Manager to Mibew\Plugin\PluginManager 2014-11-19 11:55:16 +00:00
Dmitriy Simushev
c205c9ff94 Use versions range in plugin dependencies 2014-11-19 10:17:15 +00:00
Dmitriy Simushev
2d702f5542 Add versions check to plugins 2014-11-18 12:06:22 +00:00
Dmitriy Simushev
d68b0bdb0c Flush cache on update 2014-11-17 14:30:15 +00:00
Dmitriy Simushev
07b25a2fc3 Create Updater 2014-11-17 14:19:07 +00:00
Dmitriy Simushev
a43d46f5f5 Extract SessionAuthenticationManager 2014-11-13 11:19:53 +00:00
Dmitriy Simushev
47851c9ed2 Move "format_version_id" func to Maintenance\Utils class 2014-11-12 15:14:13 +00:00
Dmitriy Simushev
f82d42e729 Add "buttonGenerate" event 2014-11-12 10:58:21 +00:00
Dmitriy Simushev
c43fccf297 Use CanteenHTML5 for buttons generation 2014-11-12 10:24:40 +00:00
Dmitriy Simushev
d446b9a78f Replace INSTALLATION_IN_PROGRESS const with MAINTENANCE_MODE 2014-11-11 13:31:38 +00:00
Dmitriy Simushev
1deebaff20 Move Installer to a separated namespace 2014-11-11 13:14:37 +00:00
Dmitriy Simushev
df66227729 Remove unused "escape_with_cdata" function 2014-11-11 12:21:02 +00:00
Dmitriy Simushev
bcbb02f52f Fix trailing slash removing on installation 2014-11-11 10:49:13 +00:00
Dmitriy Simushev
f5470239e4 Use Symfony-compatible router 2014-11-11 10:34:04 +00:00
Dmitriy Simushev
f8909d5e8c Move Stash cache to separated directory 2014-11-11 10:31:51 +00:00
d27633fc28 Increase Mibew version 2014-11-10 21:41:12 +03:00
Dmitriy Simushev
6066b9312e Remove "is_secure_request" function 2014-11-07 12:39:19 +00:00
Dmitriy Simushev
fe0d2f2760 Check directories permissions on install
Fixes #76
2014-11-07 12:09:18 +00:00
Dmitriy Simushev
2c0d88c4d5 Use ephemeral cache during installation 2014-11-07 11:40:36 +00:00
Dmitriy Simushev
2c9a6830c8 Use lazy objects creation in Application class 2014-11-07 11:10:19 +00:00
Dmitriy Simushev
6b3b5d6fec Forbid users to post to closed threads
Fixes #72
2014-11-06 13:13:29 +00:00
Dmitriy Simushev
b4ab5d8cd1 Use "once" method instead of "on"/"off" in JS message form 2014-11-06 11:02:57 +00:00
Dmitriy Simushev
bffc2fd799 Restrict access to a thread for third-party users
Fixes #71
2014-11-06 10:45:38 +00:00
Dmitriy Simushev
3f36afc285 Fix comments for AbstractProcessor::processFunction method 2014-11-06 10:08:12 +00:00
Dmitriy Simushev
18e9cf7039 Remove "get_logged_in" function 2014-11-05 15:52:25 +00:00
Dmitriy Simushev
43f7df6c76 Remove Thread::setupAvatar method 2014-11-05 15:29:23 +00:00
Dmitriy Simushev
03328b9293 Use valid types for Thread fields 2014-11-05 14:40:19 +00:00
Dmitriy Simushev
3dd80070c7 Add "userId" and "agentId" fields to thread at client side 2014-11-05 14:25:02 +00:00
Dmitriy Simushev
3984c260b0 Use the correct backpath to redirect operator after login 2014-11-05 10:46:56 +00:00
Dmitriy Simushev
82a4d7a2a2 Use composer's autoloader
Funny, but it fixes #75 without classes changing
2014-10-31 14:13:49 +00:00
Dmitriy Simushev
3b43090bda Add "visitorDeleteOld" event 2014-10-31 11:51:08 +00:00
Dmitriy Simushev
f0c4299ba3 Remove old visitors in single process 2014-10-31 11:26:53 +00:00
Dmitriy Simushev
f10079497c Add "groupUpdateOperators" event 2014-10-31 09:59:44 +00:00
Dmitriy Simushev
07fc4a3666 Fix broken links at "operator/group/<id>/members" page 2014-10-30 13:53:47 +00:00
Dmitriy Simushev
38bc096444 Return IDs set from "get_operator_group_ids" function 2014-10-30 13:49:16 +00:00
Dmitriy Simushev
146c4b7ac1 Return IDs set from "get_group_members" function 2014-10-30 13:27:23 +00:00
Dmitriy Simushev
9d854e9642 Use regular "Thread::save" to close old invitations 2014-10-30 13:07:54 +00:00
Dmitriy Simushev
6e200bf956 Fix race condition in old invitation closing 2014-10-30 12:33:21 +00:00
Dmitriy Simushev
b3c9a02660 Encapsulate locks mechanics in "ProcessLock" class 2014-10-30 12:25:48 +00:00
Dmitriy Simushev
22699f1ed5 Add "threadGetMessagesAlter" event 2014-10-30 10:19:08 +00:00
Dmitriy Simushev
c0232e6fce Use regular tread save in "Thread::closeOldThreads" method 2014-10-29 16:03:38 +00:00
Dmitriy Simushev
96c9bf2a93 Prevent race condition in old threads closing 2014-10-29 15:12:05 +00:00
Dmitriy Simushev
b5020645be Remove Settings::update method
It was too slow
2014-10-29 15:02:55 +00:00
Dmitriy Simushev
bf483e4abc Fix bug with "Settings::update" method. 2014-10-29 14:35:40 +00:00
Dmitriy Simushev
a37018aab6 Add "default" argument to "Settings::get" method 2014-10-29 13:48:30 +00:00
Dmitriy Simushev
be7d49c0f5 Use Events class constant instead of raw event name in track.php 2014-10-29 12:39:59 +00:00
Dmitriy Simushev
336d8c1faa Add "threadCreate" event 2014-10-29 10:50:09 +00:00
Dmitriy Simushev
ab942731e6 Refactor Thread class 2014-10-29 10:45:35 +00:00
Dmitriy Simushev
168336a20b Document "threadFunctionCall" event 2014-10-28 13:04:31 +00:00
Dmitriy Simushev
297377b0fd Add "operatorUpdate" event 2014-10-28 12:43:40 +00:00
Dmitriy Simushev
65d7cb3823 Use "update_operator" func for operator modification everywhere 2014-10-28 12:26:14 +00:00
Dmitriy Simushev
1d9a837e37 Make operator's login unchangeable 2014-10-28 12:06:07 +00:00
Dmitriy Simushev
05f5a606d1 Refactor update_operator function 2014-10-28 11:45:36 +00:00
Dmitriy Simushev
614f02a108 Refactor "check_group_fields" function 2014-10-28 10:40:26 +00:00
Dmitriy Simushev
32a134f31a Remove unused class alias from libs/chat.php 2014-10-27 14:20:59 +00:00
Dmitriy Simushev
4ae850d529 Remove invalid link from Thread::postMessage docs 2014-10-27 14:19:08 +00:00
Dmitriy Simushev
3f27aea2ea Add "threadPostMessage" event 2014-10-27 13:18:12 +00:00
Dmitriy Simushev
30da4ae75e Add notice about triggering event to "update_group" function 2014-10-27 12:07:52 +00:00
Dmitriy Simushev
b7bf41a191 Create separate function for enable/disable operators 2014-10-27 11:55:29 +00:00
Dmitriy Simushev
38769615ac Fix notice about undefined variable in BanController 2014-10-27 10:57:43 +00:00
Dmitriy Simushev
6cc94bcb33 Reduce duplication in Ban class 2014-10-27 10:57:03 +00:00
Dmitriy Simushev
7f6a9c6513 Add "banUpdate" event 2014-10-27 10:40:45 +00:00
Dmitriy Simushev
7e371a20d9 Fix wrong group key in "update_group" function 2014-10-27 10:30:25 +00:00
Dmitriy Simushev
28270d7d18 Use named placeholders in "update_group" function 2014-10-27 10:27:37 +00:00
Dmitriy Simushev
d6084f035f Pass regular group array to "create_group" and "update_group" functions 2014-10-27 10:19:21 +00:00
Dmitriy Simushev
816323a154 Add one more group parameter to check 2014-10-27 10:01:40 +00:00
Dmitriy Simushev
0a3207e879 Add "groupUpdate" event 2014-10-27 10:00:27 +00:00
Dmitriy Simushev
7af300b8f5 Move group related functions to libs/groups.php 2014-10-23 11:41:35 +00:00
Dmitriy Simushev
9753081407 Sent "Visitor closed chat window" message only if there was a chat 2014-10-22 14:34:06 +00:00
Dmitriy Simushev
c83fd59763 Remove unused "blockedcount" field of ban table 2014-10-22 14:17:38 +00:00
Dmitriy Simushev
445a5866ad Add "invitationIgnore" event 2014-10-22 14:15:05 +00:00
Dmitriy Simushev
f070a121fe Fix typo in widget.js code 2014-10-21 12:54:07 +00:00
Dmitriy Simushev
c2f0fb24c3 Describe "routesAlter" event in Events class 2014-10-21 12:37:07 +00:00
Dmitriy Simushev
7eea7c09d4 Add "banDelete" event 2014-10-21 11:51:19 +00:00
Dmitriy Simushev
6263f3a2f4 Add "banCreate" event 2014-10-21 11:43:10 +00:00
Dmitriy Simushev
ada83c629a Encapsulate work with bans in Ban class 2014-10-21 11:33:13 +00:00
Dmitriy Simushev
1dea407037 Add "invitationReject" event 2014-10-20 12:44:44 +00:00
Dmitriy Simushev
b83cb193f1 Add "invitationAccept" event 2014-10-20 12:36:44 +00:00
Dmitriy Simushev
5ad1044dc0 Add "invitationCreate" event 2014-10-20 12:27:10 +00:00
Dmitriy Simushev
09b3d77b19 Add "groupDelete" action 2014-10-20 12:21:59 +00:00
Dmitriy Simushev
7ce1add5dc Create delete_group function 2014-10-20 12:10:31 +00:00
Dmitriy Simushev
34341ef01c Refactor create_group function a little 2014-10-20 11:50:45 +00:00
Dmitriy Simushev
1aec37b6f6 Add "groupCreate" event 2014-10-20 11:17:56 +00:00
Dmitriy Simushev
9b05509ec4 Add "threadClose" event 2014-10-20 11:07:50 +00:00
Dmitriy Simushev
53450ea9d6 Create "threadDelete" event 2014-10-20 10:55:22 +00:00
Dmitriy Simushev
60bd21bf42 Move "threadUpdate" event to Events class 2014-10-20 10:17:34 +00:00
Dmitriy Simushev
d05fe335b8 Describe all "users" app related events in Events class 2014-10-20 10:12:55 +00:00
Dmitriy Simushev
55b1476139 Describe "cronRun" event in Events class 2014-10-17 14:42:39 +00:00
Dmitriy Simushev
de1d5d6d51 Create "visitorCreate" event 2014-10-17 14:37:01 +00:00
Dmitriy Simushev
e61b91dd5e Describe "visitorTrack" event in Events class 2014-10-17 14:10:20 +00:00
Dmitriy Simushev
1814298f4f Create "Resource not found" event 2014-10-17 13:47:57 +00:00
Dmitriy Simushev
5c52ec61da Describe "accessDenied" event in Events class 2014-10-17 13:36:20 +00:00
Dmitriy Simushev
86f6d6429e Move "pageAdd*" events description to Events class 2014-10-17 13:15:53 +00:00
Dmitriy Simushev
31c4afe751 Remove jabber operator field 2014-10-17 12:48:28 +00:00
Dmitriy Simushev
a34cb53e91 Add event on operator create 2014-10-17 11:09:10 +00:00
Dmitriy Simushev
2dca8f236e Describe operators' events in one place 2014-10-17 10:54:04 +00:00
Dmitriy Simushev
55b7b28eb1 Move EventDispatcher class to a separate namespace 2014-10-17 09:47:03 +00:00
Dmitriy Simushev
919c71a1c1 Fix misssed semicolon in js test 2014-10-14 14:39:52 +00:00
Dmitriy Simushev
2d5d4b0e46 Remove unused "append_query" function 2014-10-14 14:38:54 +00:00
Dmitriy Simushev
2703f72de8 Fix localization of unknown strings on client 2014-10-14 12:36:23 +00:00
Dmitriy Simushev
7f071cbe80 Increase Mibew version 2014-10-14 11:19:24 +00:00
Dmitriy Simushev
55587f67fe Remove unused "jsString" Handlebars.php helper 2014-10-14 11:18:39 +00:00
Dmitriy Simushev
ae7ee06031 Increase cache ttl for handlebars templates 2014-10-14 11:16:55 +00:00
Dmitriy Simushev
3fbc5fa262 Always set focus on message input after message sent
Fixes #66
2014-10-14 11:03:20 +00:00
Dmitriy Simushev
397786991d Simplify plugins' assets attachment 2014-10-14 10:57:01 +00:00
Dmitriy Simushev
1a82e11b5e Use 500 as default weight for plugins assets 2014-10-14 10:23:40 +00:00
Dmitriy Simushev
71d2b234c6 Create Asset/Package class to reduce code duplication 2014-10-14 09:36:55 +00:00
Dmitriy Simushev
f8d4d074d5 Rename "styles/dialogs" to "styles/chats" 2014-10-13 13:52:17 +00:00
Dmitriy Simushev
6ac121bc01 Remove unused value 2014-10-13 13:34:28 +00:00
Dmitriy Simushev
452446a375 Initialize chat js application from controller 2014-10-13 13:30:07 +00:00
Dmitriy Simushev
dcd17ed01c Attach js files to chat page in "_layout" template 2014-10-13 12:41:11 +00:00
Dmitriy Simushev
8eaf93a916 Remove unused templates from the default chat style 2014-10-13 11:34:44 +00:00
Dmitriy Simushev
0d1efa5a87 Use cache for Handlebars AST 2014-10-13 11:20:05 +00:00
Dmitriy Simushev
d92b88b65a Initialize "thread_log" client side app from controller 2014-10-13 09:52:06 +00:00
Dmitriy Simushev
aee1aa6904 Initialize "users" client side app from controller 2014-10-13 09:23:43 +00:00
Dmitriy Simushev
5dafbd2997 Add weights to asset manager 2014-10-13 09:07:07 +00:00
Dmitriy Simushev
54b4814389 Attach js on updates page via controller 2014-10-10 12:38:00 +00:00
Dmitriy Simushev
d01bd8a080 Move thread log app initialization to controller 2014-10-10 12:25:53 +00:00
Dmitriy Simushev
3081dcc8db Remove js working with features fields from style files 2014-10-10 12:14:37 +00:00
Dmitriy Simushev
c86d7569f3 Remove js working with group fields from style files 2014-10-10 11:59:23 +00:00
Dmitriy Simushev
e8b35a6971 Move js attaching from install_done template to controller 2014-10-10 11:44:13 +00:00
Dmitriy Simushev
3339153ad3 Remove js with operator delete comfirm from style files 2014-10-10 11:24:54 +00:00
Dmitriy Simushev
ed6252bb38 Remove js with group delete comfirm from style files 2014-10-10 11:10:28 +00:00
Dmitriy Simushev
01e2d8f2a7 Remove js with ban delete comfirm from style files 2014-10-10 10:57:00 +00:00
Dmitriy Simushev
dd71e6bc70 Attach js and css assets to every operator's page 2014-10-10 10:33:08 +00:00
Dmitriy Simushev
46ee9df63a Use relative URL for assets as default 2014-10-10 10:17:41 +00:00
Dmitriy Simushev
922edc96d7 Replace inline js in the default page style with files 2014-10-10 09:15:50 +00:00
Dmitriy Simushev
a671caeb79 Move js code which auto close a window in a sepate file 2014-10-10 09:01:15 +00:00
Dmitriy Simushev
3088481d6d Remove unused "brws.js" lib 2014-10-10 08:38:37 +00:00
Dmitriy Simushev
00bba6c05a Create a base class for jsAssets and cssAssets helpers 2014-10-10 08:17:36 +00:00
Dmitriy Simushev
5b09b3e52c Rename "additionalJs" helper to "jsAssets" 2014-10-09 14:31:26 +00:00
Dmitriy Simushev
3772274ca3 Rename "additionalCss" helper to "cssAssets" 2014-10-09 14:27:35 +00:00
Dmitriy Simushev
7ce4d812bd Rename "AssetManager::add*Asset" methods to "attach*" 2014-10-09 14:20:40 +00:00
Dmitriy Simushev
2ed44e874c Clean up docs for Assetmanager::triggerJsEvent a little 2014-10-09 14:01:38 +00:00
Dmitriy Simushev
9898fb0cbe Create "additionalCss" HBS helper 2014-10-09 13:51:37 +00:00
Dmitriy Simushev
bc45a6d3be Create "additionalJs" HBS helper 2014-10-09 13:25:17 +00:00
Dmitriy Simushev
e320dcd1bb Create AssetManager class 2014-10-08 14:14:43 +00:00
Dmitriy Simushev
54840e96ad Move default js libraries to _layout.hbs in pages style 2014-10-07 11:02:31 +00:00
Dmitriy Simushev
406e11a38e Simplify client side templates structure of pages style 2014-10-06 10:38:33 +00:00
Dmitriy Simushev
a61b48252c Move request preparation and finalization to special methods 2014-10-06 09:06:11 +00:00
Dmitriy Simushev
952ebf8b9d Remove unneeded files from release archive
Fixes #67
2014-09-26 13:18:42 +00:00
Dmitriy Simushev
b6d472d62f Fix some typos in js 2014-09-26 09:24:49 +00:00
Dmitriy Simushev
0cd01e2c03 Remove unneeded "pageAddLocalizedStrings" event 2014-09-25 12:40:46 +00:00
Dmitriy Simushev
c3956be558 Move send shortcut string generation to the client side 2014-09-25 12:33:30 +00:00
Dmitriy Simushev
6e6920851d Remove almost all pseudo-localization strings 2014-09-25 11:51:04 +00:00
Dmitriy Simushev
022fe7d6f4 Purge cache on cron 2014-09-25 10:38:31 +00:00
Dmitriy Simushev
ba103d5636 Pass all localized string to a client side application 2014-09-25 10:30:19 +00:00
Dmitriy Simushev
a2e2f1b194 Use Stash as a cache system 2014-09-24 13:04:37 +00:00
Dmitriy Simushev
e514b1590b Pass AssetUrlGenerator via constructor to ControllerResolver 2014-09-23 13:10:35 +00:00
Dmitriy Simushev
2bb6899c33 Move translation logic from js helper to localization object 2014-09-19 13:51:59 +00:00
Dmitriy Simushev
cb4bd3acaa Add inheritance helpers to Handlebars.js 2014-09-18 15:00:57 +00:00
Dmitriy Simushev
fa615bc2e0 Add placeholders to HBS.js "l10n" helper 2014-09-18 10:35:08 +00:00
Dmitriy Simushev
957e67686a Refactor HelpersSet class 2014-09-18 09:42:50 +00:00
Dmitriy Simushev
911487871d Generate offline message in the template 2014-09-18 08:32:16 +00:00
Dmitriy Simushev
c397a953a1 Update Handlebars.php version 2014-09-17 14:54:04 +00:00
Dmitriy Simushev
e7b0201e0a Update Handlebars.js to v2.0.0 2014-09-15 14:32:34 +00:00
Dmitriy Simushev
340c0f9213 Update jQuery to v1.11.1 2014-09-12 13:14:20 +00:00
Dmitriy Simushev
db4e8ee0db Update Underscore.js to v1.7.0 2014-09-12 12:50:49 +00:00
Dmitriy Simushev
95caad6b59 Use "replace" helper instead of "nl2br" in HBS.js templates 2014-09-12 11:12:34 +00:00
Dmitriy Simushev
ae9de7aa92 Sanitize messages at server side 2014-09-12 10:59:56 +00:00
Dmitriy Simushev
ce6761755e Enforce HTML sanitization 2014-09-11 14:53:03 +00:00
Dmitriy Simushev
6154992f4f Remove "apply" Handlebars.js helper 2014-09-11 12:30:11 +00:00
Dmitriy Simushev
0b9fdeceb8 Fix number arguments in "allowTags" Handlebars.js helper 2014-09-11 12:15:19 +00:00
Dmitriy Simushev
34017d54db Fix number arguments in "urlReplace" Handlebars.js helper 2014-09-11 11:24:33 +00:00
Dmitriy Simushev
aa12eceeea Fix number arguments in "nl2br" Handlebars.js helper 2014-09-11 11:23:02 +00:00
Dmitriy Simushev
9805b4bb18 Add "replace" Handlebars.js helper 2014-09-11 11:08:34 +00:00
Dmitriy Simushev
333f769a16 Add "cutString" Handlebars.js helper 2014-09-11 10:09:14 +00:00
Dmitriy Simushev
75276ab2da Add "repeat" Handlebars.js helper 2014-09-11 10:06:30 +00:00
Dmitriy Simushev
814869ec77 Add tests for "ifEven" and "ifOdd" Handlebars.js helpers 2014-09-11 09:36:33 +00:00
Dmitriy Simushev
3f3abb4255 Add "ifEqual" Handlebars.js helper 2014-09-11 09:29:36 +00:00
Dmitriy Simushev
55a33cf012 Add "ifAny" Handlebars.js helper 2014-09-11 09:19:51 +00:00
Dmitriy Simushev
accfbe0acd Merge branch 'fix_comment' 2014-09-10 15:04:20 +00:00
94c1859a01 Fix comment for generated text link 2014-09-10 18:59:43 +04:00
Dmitriy Simushev
bbf1cec98c Remove unused "use" statement in the "ifOdd" helper 2014-09-10 14:15:14 +00:00
Dmitriy Simushev
ff72960382 Throw an exception if a HBS helper receives wrong arguments set 2014-09-10 14:13:16 +00:00
Dmitriy Simushev
61ee2d0af6 Fix invitation popup 2014-09-10 11:26:09 +00:00
Dmitriy Simushev
933d03e45a Increase Mibew version 2014-09-10 11:07:54 +00:00
Dmitriy Simushev
86085a0c31 Force Mibew to work without mod_rewrite 2014-09-10 10:56:06 +00:00
Dmitriy Simushev
7c969e495e Add RTL support to the default chat style
Fixes #64
2014-09-10 10:16:30 +00:00
Dmitriy Simushev
97ab17ce7a Update Symfony components version 2014-09-10 09:40:27 +00:00
Dmitriy Simushev
58959cf866 Fix problems with installation script 2014-09-09 10:07:43 +00:00
Dmitriy Simushev
7201dfd113 Remove MIBEW_WEB_ROOT constant 2014-09-08 14:08:44 +00:00
Dmitriy Simushev
a314bca69b Move "go online link" generation to Controller 2014-09-08 14:01:41 +00:00
Dmitriy Simushev
cb98a6fc94 Fix typo in comment 2014-09-08 12:39:09 +00:00
Dmitriy Simushev
f107ae4556 Configure plugins data with a request instead of a page name 2014-09-08 12:29:30 +00:00
Dmitriy Simushev
3a3b7f362b Add "asset" helper to the repository. 2014-09-08 09:54:53 +00:00
Dmitriy Simushev
ff917b25ad Do not use MIBEW_WEB_ROOT in Style classes 2014-09-05 10:59:48 +00:00
Dmitriy Simushev
dfbbc11cfb Apply asset helper to chat templates 2014-09-05 10:50:36 +00:00
Dmitriy Simushev
7c1e123ad6 Do not use style path for pagination generation 2014-09-05 10:26:47 +00:00
Dmitriy Simushev
84094ad38b Use divs instead of images for pagination arrows 2014-09-05 10:06:26 +00:00
Dmitriy Simushev
5a3a4d959f Use asset helper in pages style 2014-09-05 09:13:11 +00:00
Dmitriy Simushev
83f6c31dd6 Fix styles screeenshots 2014-09-04 15:11:52 +00:00
Dmitriy Simushev
e5031f9987 Use "mibewRoot" only in file paths 2014-09-04 12:53:13 +00:00
Dmitriy Simushev
0253f8e67e Remove unused use statement 2014-09-04 12:43:08 +00:00
Dmitriy Simushev
c207f0507d Use "route" helper to generate URLs in chat style 2014-09-04 12:26:18 +00:00
Dmitriy Simushev
6ceecb42aa Generate links for Users JS App in the controller 2014-09-04 12:12:30 +00:00
Dmitriy Simushev
f8bd639f39 Use stylePath variable instead of tplRoot in chat templates 2014-09-04 10:52:57 +00:00
Dmitriy Simushev
cf6e7f625a Fix URL for ban edit page 2014-09-04 10:38:17 +00:00
Dmitriy Simushev
cbc119382b Create a helper to generatate URLs with CSRF protection 2014-09-04 10:23:38 +00:00
Dmitriy Simushev
c08ab3a456 Use "route" helper in pages style 2014-09-03 15:19:27 +00:00
Dmitriy Simushev
09c7b15656 Move protected AbstractController::getStyle method to the end of the class 2014-09-03 11:56:53 +00:00
Dmitriy Simushev
5ee217accb Create "route" Handlebars.php helper 2014-09-03 11:52:37 +00:00
Dmitriy Simushev
eba2eadaca Reduce code duplication in Handlebars powered styles 2014-09-03 11:27:43 +00:00
Dmitriy Simushev
7021cb983e Move takeover confirmation page template to chat style 2014-08-29 12:55:41 +00:00
Dmitriy Simushev
37cc5cb178 Move Handlebars.php helpers to separate classes 2014-08-29 11:42:15 +00:00
Dmitriy Simushev
a5d7c6ccd4 Don't use MIBEW_WEB_ROOT in get_current_locale func 2014-08-28 12:15:59 +00:00
Dmitriy Simushev
766be1f051 Remove unused function "get_app_location" 2014-08-28 10:23:58 +00:00
Dmitriy Simushev
f61ef23e3f Don't use global environment in "setup_chatview_for_user" func 2014-08-28 10:22:17 +00:00
Dmitriy Simushev
896e0d924b Don't rely on internal Router structure 2014-08-28 09:52:48 +00:00
Dmitriy Simushev
1c1d479474 Don't use global environment in "setup_chatview_for_operator" func 2014-08-28 09:39:14 +00:00
Dmitriy Simushev
ee492a0c23 Extract release preparation stuff from default gulp task
Fixes #62
2014-08-28 08:40:08 +00:00
Dmitriy Simushev
da54de32b9 Remove unused "is_agent_opera95" function 2014-08-27 15:34:56 +00:00
Dmitriy Simushev
4ba7804b88 Make *Processor::handleRequest returns a Response 2014-08-27 13:44:01 +00:00
Dmitriy Simushev
928328f2b0 Set default value for Thread's agent ID when a thread is created 2014-08-27 13:28:01 +00:00
Dmitriy Simushev
730dd2f2df Make *Processor handles Symfony requests 2014-08-27 13:22:43 +00:00
Dmitriy Simushev
8b1b38dddc Set default operator's avatar
Fixes #60
2014-08-27 10:33:35 +00:00
Dmitriy Simushev
57770e76cf Remove unused needs_frame_src function 2014-08-26 14:53:21 +00:00
Dmitriy Simushev
aad2f6a34f Move button generating logic to separate classes 2014-08-26 12:03:58 +00:00
Dmitriy Simushev
3802e1bf0f Update Handlebars.php version 2014-08-26 09:39:14 +00:00
Dmitriy Simushev
c9e7971c41 Fix button size determination 2014-08-26 09:33:10 +00:00
Dmitriy Simushev
e97f3d1fbf Add secure URL generation for assets 2014-08-25 11:21:18 +00:00
Dmitriy Simushev
21c0ee9134 Move secure URL generation to the Router 2014-08-22 13:11:17 +00:00
Dmitriy Simushev
96df4dc857 Declare method visibility in ButtonCodeController 2014-08-21 11:38:45 +00:00
Dmitriy Simushev
c32628e2b2 Generate URLs from routes in HomeController 2014-08-21 11:37:17 +00:00
Dmitriy Simushev
df4b6f214e Add an easy way to generate assets URL 2014-08-21 11:33:38 +00:00
Dmitriy Simushev
f0f41cbfb6 Move all button generation logic to ButtonCodeController 2014-08-20 14:40:30 +00:00
Dmitriy Simushev
e9f480e3ef Add an ability to generate https routes 2014-08-20 13:00:03 +00:00
Dmitriy Simushev
82a3cb7dd5 Remove unused "verifyparam_groupid" function 2014-08-20 10:04:19 +00:00
Dmitriy Simushev
34a8a2eee4 Do not use MIBEW_WEB_ROOT in AvatarController 2014-08-20 09:50:39 +00:00
Dmitriy Simushev
e6b9635e22 Add project name to .pot file 2014-08-19 12:49:54 +00:00
Dmitriy Simushev
154e891cb4 Update Handlebars.php version 2014-08-18 14:40:24 +00:00
4fc223a6a6 Improve headers 2014-08-18 15:42:27 +04:00
Dmitriy Simushev
22a34c3315 Localize some strings related with files uploading 2014-08-18 09:46:26 +00:00
Dmitriy Simushev
51e076aafc Add more PHP's localization functions 2014-08-18 09:42:08 +00:00
Dmitriy Simushev
46a8345de2 Extract localization strings from js files 2014-08-18 09:23:15 +00:00
Dmitriy Simushev
17d7014da9 Rename Localization.get method on the client side 2014-08-18 09:11:40 +00:00
Dmitriy Simushev
7128870ef6 Fix notice about undefined "visitorid" in UserChatController 2014-08-13 14:09:35 +00:00
Dmitriy Simushev
48408c6547 Remove unused console scripts 2014-08-13 12:51:17 +00:00
Dmitriy Simushev
3ca9395d69 Search localization strings in .handlebars files 2014-08-13 12:14:35 +00:00
Dmitriy Simushev
95d2593b28 Update version of gulp-phpcs plugin 2014-08-13 11:03:03 +00:00
Dmitriy Simushev
02874adbd0 Do not include GIT repos of third-party libs to build 2014-08-13 09:04:44 +00:00
Dmitriy Simushev
f583aa6439 Add gulp task for .pot file generation 2014-08-13 08:40:42 +00:00
Dmitriy Simushev
547cd5abb6 Fix suhosin problems during build process 2014-08-12 10:35:57 +00:00
Dmitriy Simushev
51fcdcd1a5 Update JavaScript headers 2014-08-08 12:34:04 +00:00
Dmitriy Simushev
58aec22fc3 Remove compiled files from the reository 2014-08-08 12:20:44 +00:00
Dmitriy Simushev
ac55ecc545 Minify js/source/update.js file 2014-08-08 11:51:38 +00:00
Dmitriy Simushev
f8b5cdafa2 Move JavaScript files related with style to style 2014-08-08 11:49:26 +00:00
Dmitriy Simushev
5feb4535d6 Fix automatic set of online status 2014-08-08 10:26:42 +00:00
Dmitriy Simushev
6d90246bbe Do not override "getFilesPath" method in the Abstract style class
Fixes #56
2014-08-08 10:15:12 +00:00
Dmitriy Simushev
c086ba176f Add info about building process 2014-08-07 11:25:37 +00:00
Dmitriy Simushev
c2aeeb07f9 Add gulp task for build the sources 2014-08-07 11:04:45 +00:00
Dmitriy Simushev
a9cd400834 Add a Gulp tasks for composer dependancies installation 2014-08-06 12:08:19 +00:00
Dmitriy Simushev
4594619a4a Provide an ability to export translations
Fixes #45
2014-08-06 08:52:12 +00:00
Dmitriy Simushev
668e724a01 Add option to override strings during import
Fixes #47
2014-08-05 14:15:02 +00:00
Dmitriy Simushev
cabdaed21d A user cannot start chat if all groups offline
Revert changes made in 324f5bf94e
2014-08-05 12:50:09 +00:00
Dmitriy Simushev
38bdf1318f Remove unused legacy code 2014-08-05 12:32:34 +00:00
Dmitriy Simushev
4ccd67e28a Do not work directly with session in "notify_operator_alive" func
Fixes #57
2014-08-05 11:39:44 +00:00
Dmitriy Simushev
6cdfb4a7bc Get operator from AuthenticationManager in UsersProcessor 2014-08-05 11:26:33 +00:00
Dmitriy Simushev
a99a839998 Add support for ".png" buttons
Fixes #48
2014-08-04 15:33:19 +00:00
Dmitriy Simushev
ef5c919803 Add timezone option to the config file
Fixes #55
2014-08-04 14:18:43 +00:00
Dmitriy Simushev
fdfb945ed0 Remove unneeded "check_coding_style" shell script 2014-08-04 13:59:13 +00:00
Dmitriy Simushev
bee65e50f7 Use Gulp.js instead of Ant for building 2014-08-04 13:53:18 +00:00
Dmitriy Simushev
324f5bf94e Treat operators online even if they don't belong to any groups
Fixes #51
2014-07-29 14:55:22 +00:00
Dmitriy Simushev
a8e98c1e08 Always use absolute URL for an invitation thread
Fixes 52
2014-07-29 14:09:23 +00:00
9e08c6f2a5 Fix typo in comment 2014-07-28 15:32:12 +04:00
Dmitriy Simushev
074f4652d1 Fix caching in localized strings saving
Fixes #49
2014-07-28 10:33:20 +00:00
Dmitriy Simushev
650faf25f6 Localize permission descriptions in "permission_descriptions" func 2014-07-28 10:12:12 +00:00
Dmitriy Simushev
4670851505 Localize permission descriptions
Fixes #50
2014-07-28 09:32:15 +00:00
Dmitriy Simushev
48bcea8f65 Use client-side templates names according to directory structure 2014-07-24 13:46:24 +00:00
Dmitriy Simushev
2ddae8e300 Clarify description for "Track operators" feature 2014-07-23 14:01:58 +00:00
Dmitriy Simushev
d04f703f35 Add option to track operators like any other visitors.
Fixes #46
2014-07-23 13:28:35 +00:00
Dmitriy Simushev
86f8cb5100 Display installation errors on a step page 2014-07-23 12:56:38 +00:00
Dmitriy Simushev
c4592d242a Fix error displaying on installation pages 2014-07-23 12:31:59 +00:00
Dmitriy Simushev
6a1ac9ada4 Update after installation login link 2014-07-23 12:25:18 +00:00
Dmitriy Simushev
62b8b3ceff Override "home" route in the installer routes 2014-07-23 11:50:27 +00:00
Dmitriy Simushev
4f49920526 Allow apache to process existing directories 2014-07-14 11:25:06 +00:00
Dmitriy Simushev
1a60aeac2e Remove trailing slash if it exists in a request
Fixes #36
2014-07-14 11:02:20 +00:00
Dmitriy Simushev
1a3062f2f9 Use more convenient name for the primary key in "translation" table 2014-07-14 10:35:50 +00:00
Dmitriy Simushev
14e709be37 Do not use "needChangePassword" template var 2014-07-14 10:25:59 +00:00
Dmitriy Simushev
5636b1ab3d Imporove localization strings import and saving 2014-07-14 10:23:49 +00:00
Dmitriy Simushev
67383cf052 Use YAML files for style configs 2014-07-14 08:59:13 +00:00
Dmitriy Simushev
2ba5c0e9b3 Use convenient names for database tables 2014-07-14 08:36:29 +00:00
Dmitriy Simushev
2af3df4bc6 Remove a stub for get_enabled_locales function 2014-07-11 15:15:59 +00:00
Dmitriy Simushev
e4829b9c04 Fix locales disable 2014-07-11 15:14:46 +00:00
Dmitriy Simushev
a63215f299 Replace HOME_LOCALE const with get_home_locale() func 2014-07-11 15:05:42 +00:00
Dmitriy Simushev
cca081b5c7 Replace DEFAULT_LOCALE const with get_default_locale() func 2014-07-11 14:36:37 +00:00
Dmitriy Simushev
803863571b Replace const CURRENT_LOCALE with get_current_locale() func 2014-07-11 14:26:14 +00:00
Dmitriy Simushev
e3e25f78d7 Reduce count of .htaccess files
Fixes #34
2014-07-11 13:33:59 +00:00
Dmitriy Simushev
7ce675da86 Remove outdated PHPUnit tests
Need new good tests.
2014-07-11 13:10:18 +00:00
Dmitriy Simushev
f33c686aab Lowercase database columns names 2014-07-11 13:00:11 +00:00
Dmitriy Simushev
bdd7d31bd5 Remove operator's avatar file when it is removed for UI
Fixes #39
2014-07-11 12:13:57 +00:00
Dmitriy Simushev
6ae53d90af Remove message about empty password and first login 2014-07-11 11:56:48 +00:00
Dmitriy Simushev
217ccb9e09 Fix phpdoc comments 2014-07-11 11:14:42 +00:00
Dmitriy Simushev
8a79393989 Add an ability to use non-default database port
Fixes #40
2014-07-11 11:09:17 +00:00
524302fb2e Prevent use of an invalid salt for Blowfish hashing of passwords 2014-07-11 09:20:49 +00:00
Dmitriy Simushev
dadbe36bd2 Downgrade Handlebars.php a little
The latest version of Handlebars.php contains a problem with nested
ifs (https://github.com/XaminProject/handlebars.php/pull/71) thus
it cannot be used.
2014-07-11 09:08:18 +00:00
Dmitriy Simushev
0f9e49a1ce Update Handlebars.php 2014-07-10 14:29:58 +00:00
Dmitriy Simushev
991422fef4 Update README 2014-07-10 14:25:31 +00:00
Dmitriy Simushev
b5e502c647 Remove "mibew_root" variable from configs 2014-07-10 14:18:11 +00:00
Dmitriy Simushev
5688f81904 Fix installation sound check 2014-07-10 14:07:15 +00:00
Dmitriy Simushev
0a82b6933e Use step-by-step installation process 2014-07-10 13:53:44 +00:00
Dmitriy Simushev
0820dc9997 Do not ignore "mibew/install" dir in "check_coding_style" script
This dir was not follow coding standatrds but not it does not
exist.
2014-07-09 10:09:28 +00:00
Dmitriy Simushev
93cfdc3ed1 Remove unused "start_html_output" function 2014-07-09 10:06:50 +00:00
Dmitriy Simushev
3bb795a793 Use YAML for the core configurations 2014-07-09 09:14:26 +00:00
Dmitriy Simushev
99a4ca6192 Move all runtime configs to "configs" dir 2014-07-09 08:31:51 +00:00
Dmitriy Simushev
b84a6b1855 Make the first approach to a new installer 2014-07-08 14:30:53 +00:00
Dmitriy Simushev
8384a58118 Check for installation in get_localized_string function 2014-07-08 14:25:36 +00:00
Dmitriy Simushev
037b823db9 Do not rely on database state during installation 2014-07-08 12:43:53 +00:00
Dmitriy Simushev
edef518da3 Add mail templates import 2014-07-08 11:51:06 +00:00
Dmitriy Simushev
1bfbb5c243 Add canned messages import 2014-07-08 11:01:30 +00:00
Dmitriy Simushev
232fde0a73 Decouple CookieFactory from AuthenticationManager 2014-07-04 13:49:16 +00:00
Dmitriy Simushev
93eeeafd3c Inject authentication manager into Application using constructor 2014-07-04 13:11:40 +00:00
Dmitriy Simushev
af112aa72b Implement "AuthenticationManagerInterface" in "CheckResolver" class 2014-07-04 12:56:48 +00:00
Dmitriy Simushev
8dbc46145c Implement "AuthenticationManagerAwareInterface" in "ControllerResolver" class 2014-07-04 12:48:43 +00:00
Dmitriy Simushev
184e6ccdc3 Make "ControllerResolver" implements "RouterAwareInterface" 2014-07-04 12:46:16 +00:00
Dmitriy Simushev
42c1d4e340 Use "RouterInterface" instead of "Router" in "AbstractController" 2014-07-04 12:24:21 +00:00
Dmitriy Simushev
2ab669ba3a Use "RouterInterface" instead of "Router" in "RouterAwareInterface" 2014-07-04 12:04:51 +00:00
Dmitriy Simushev
eb078a0b73 Specify routes set to load via Router options 2014-07-02 12:24:28 +00:00
Dmitriy Simushev
4649a0d3dc Fix bug with localized strings case sensitivity 2014-07-02 11:44:27 +00:00
Dmitriy Simushev
1a599a6af3 Inject a Router to the Application via constructor 2014-07-02 10:44:16 +00:00
Dmitriy Simushev
5337d899d4 Do not initialize database and load plugins during installation 2014-07-02 10:00:12 +00:00
Dmitriy Simushev
c3685f3aad Make basic locale function work without database 2014-07-02 09:51:23 +00:00
Dmitriy Simushev
feff032c31 Remove unused "read_config_file" function 2014-07-02 09:28:06 +00:00
Dmitriy Simushev
ef958483bb Use a function to load system configs 2014-07-02 09:26:55 +00:00
Dmitriy Simushev
dfeadec80b Remove unused "libs/common/forms.php" library 2014-07-01 12:56:45 +00:00
Dmitriy Simushev
f66bab2dd2 Remove unused functions related with request processing 2014-07-01 08:27:27 +00:00
Dmitriy Simushev
27ed59eb08 Do not automatically load translations from plugins
One shoud use translations import feature instead
2014-07-01 08:07:16 +00:00
Dmitriy Simushev
c9a81dd174 Rename "TranslationsImportController" to "TranslationImportController" 2014-06-30 14:53:23 +00:00
Dmitriy Simushev
fe40fd57ae Provide an ability to import translations 2014-06-30 14:34:14 +00:00
Dmitriy Simushev
53fbb8e6e7 Import localized messages when locale is enabled for the first time 2014-06-30 13:21:14 +00:00
Dmitriy Simushev
904f7d1109 Fix title at the "operator/locales" page 2014-06-30 13:07:15 +00:00
Dmitriy Simushev
7edc74b253 Remove "get_locale_names" function 2014-06-30 11:59:14 +00:00
Dmitriy Simushev
2f82594a60 Remove unneeded function "get_local_for_js" 2014-06-30 07:47:17 +00:00
Dmitriy Simushev
791abc1c2b Make translation interface play nice with new localization system 2014-06-27 13:22:38 +00:00
Dmitriy Simushev
1f899a3d80 Save unknown localization strings to the database 2014-06-27 11:35:14 +00:00
Dmitriy Simushev
1a3982d1b7 Update Handlebars.php 2014-06-26 15:15:54 +00:00
Dmitriy Simushev
64c626ffdb Use english strings instead of keys for localization 2014-06-26 15:14:15 +00:00
Dmitriy Simushev
c454ec6d98 Remove asterisk markup from localization constants 2014-06-24 10:14:21 +00:00
Dmitriy Simushev
70c77762a2 Add locales managment to UI 2014-06-24 09:47:23 +00:00
Dmitriy Simushev
7309244ccf Update Handlebars.php 2014-06-23 10:27:21 +00:00
Dmitriy Simushev
fa5bf90195 Remove canned messafes from localization constants 2014-06-20 09:25:30 +00:00
Dmitriy Simushev
f34ddb1060 Remove mail templates from localization constants 2014-06-19 14:21:23 +00:00
Dmitriy Simushev
561c512a9b Remove time format from localization constants 2014-06-18 13:54:50 +00:00
Dmitriy Simushev
bde9f2eb00 Fix bug with mail_template_load function 2014-06-18 11:14:35 +00:00
Dmitriy Simushev
47880fa951 Create "get_locale_info" function to improve code readability 2014-06-17 14:27:52 +00:00
Dmitriy Simushev
56357c4d40 Remove "localedirection" localization constant 2014-06-17 14:17:12 +00:00
Dmitriy Simushev
ec2574d707 Remove "localeid" localization constatant 2014-06-17 13:30:15 +00:00
Dmitriy Simushev
7c183fbe73 Remove unused localization constants 2014-06-17 12:07:19 +00:00
Dmitriy Simushev
3f60187158 Remove trailing space from locale constants 2014-06-17 11:19:20 +00:00
Dmitriy Simushev
5193574f68 Add mail templates functionallity 2014-06-17 11:15:44 +00:00
Dmitriy Simushev
d9e41240a4 Clean up code in "read_locale_file" function 2014-06-10 14:18:32 +00:00
e9924db3a2 Change japanese language code according to ISO 639 2014-06-10 18:16:29 +04:00
Dmitriy Simushev
96efd0f194 Fix bug with locale changing 2014-06-10 14:12:28 +00:00
Dmitriy Simushev
99cccc9d2f Use .po file for localized strings 2014-06-10 12:26:06 +00:00
Dmitriy Simushev
af3aa7afec Store changed localized strings in database 2014-06-10 10:50:36 +00:00
Dmitriy Simushev
44119fba90 Remove "names" locale from .gitignore 2014-06-06 10:58:51 +00:00
Dmitriy Simushev
12cb4f014a Remove "names" locale 2014-06-06 10:58:05 +00:00
Dmitriy Simushev
91b46e23aa Clean up markup in localization 2014-06-06 10:35:26 +00:00
Dmitriy Simushev
2bb02b6e13 Clean up markup in "common.asterisk_explanation" localization constant 2014-06-06 09:39:36 +00:00
Dmitriy Simushev
ef0f43d7e4 Remove markup from "old browsers" localization constants 2014-06-06 08:55:39 +00:00
Dmitriy Simushev
49469f6aaf Remove markup from errors realated localized strings 2014-06-05 15:38:17 +00:00
Dmitriy Simushev
12634894ac Remove admin buttons from localization 2014-06-05 14:47:18 +00:00
Dmitriy Simushev
a2383a2702 Fix bug with call to undefined "_getlocal" function 2014-06-05 13:33:14 +00:00
Dmitriy Simushev
ddd7498016 Remove unused images from locale 2014-06-05 12:57:15 +00:00
Dmitriy Simushev
4ecec3a3ab Remove separation of localization constants by level 2014-06-05 11:05:06 +00:00
Dmitriy Simushev
3bb7507fe5 Fix docs about language code standard 2014-06-05 10:04:23 +00:00
Dmitriy Simushev
7410a0019b Replace "getlocal2" function with "getlocal" one 2014-06-05 08:51:14 +00:00
Dmitriy Simushev
8105bfaa1e Replace "getlocal2_" function with "getlocal" 2014-06-05 08:27:26 +00:00
Dmitriy Simushev
9ddaba0b4c Replace "getlocal_" function with "getlocal" 2014-06-05 08:15:25 +00:00
Dmitriy Simushev
090166b780 Update arguemnts list of the "getlocal" function. 2014-06-05 07:56:08 +00:00
Dmitriy Simushev
98fe748bef Remove getstring* functions 2014-06-04 12:20:40 +00:00
Dmitriy Simushev
24c50487d2 Fix bug with undefined "$start" variable in StatisticsController 2014-06-03 15:37:58 +00:00
Dmitriy Simushev
2da623dfb3 Remove "start_xml_output" and "start_js_output" functions 2014-06-03 14:58:14 +00:00
Dmitriy Simushev
390391d117 Do not output content in "*Style::render" methods 2014-06-03 14:55:31 +00:00
Dmitriy Simushev
80f1fbbce7 Remove "check_login" and "force_password" functions 2014-06-03 14:42:39 +00:00
Dmitriy Simushev
1a628d39f7 Replace "index.php" files with a controller. 2014-06-03 14:40:38 +00:00
Dmitriy Simushev
66a68d0f23 Replace "cron.php" with a controller 2014-06-03 13:34:08 +00:00
Dmitriy Simushev
457045d81a Remove legacy code from csrf_check_token function 2014-06-03 13:18:00 +00:00
Dmitriy Simushev
3346a0c90f Remove "setup_settings_tabs" function 2014-06-03 13:13:35 +00:00
Dmitriy Simushev
b75f693454 Replace "operator/*_themes.php" with a controller 2014-06-03 12:44:52 +00:00
Dmitriy Simushev
7b6604fba2 Replace "thread.php" with a controller 2014-06-03 10:10:20 +00:00
Dmitriy Simushev
5244480d4c Simplify chat controllers directory stucture 2014-06-03 09:55:28 +00:00
Dmitriy Simushev
6c9734648a Beautify user chat URLs 2014-06-03 09:43:44 +00:00
Dmitriy Simushev
44ca9e2a2e Clean up "Chat\User\MailController" logic 2014-06-03 08:56:11 +00:00
Dmitriy Simushev
e886e7dc33 Beautify operator chat URLs 2014-06-03 08:15:11 +00:00
Dmitriy Simushev
e31b03ccdf Extract redirection logic from "Chat\Operator\ChatController" 2014-06-02 13:05:34 +00:00
Dmitriy Simushev
7ceb242814 Fix bug with the route name 2014-06-02 12:20:54 +00:00
Dmitriy Simushev
4ff92e7f5c Replace "$mibew_mailbox" variable with a constant 2014-06-02 12:08:24 +00:00
Dmitriy Simushev
b6ee459833 Replace "mail.php" with a controller 2014-06-02 11:56:56 +00:00
Dmitriy Simushev
f7dd6a8d72 Replace "client.php" with a controller 2014-06-02 11:27:19 +00:00
Dmitriy Simushev
0cdf90e24a Replace "operator/redirect.php" with a controller 2014-06-02 10:32:51 +00:00
Dmitriy Simushev
94ab0b8b07 Replace "operator/agent.php" with a controller 2014-06-02 09:58:03 +00:00
Dmitriy Simushev
1163023062 Rewrite Authentication Manager to keep the current operator within it 2014-05-30 10:53:22 +00:00
Dmitriy Simushev
65a9e7c9e8 Remove outdated styles "how to" file 2014-05-30 08:27:56 +00:00
Dmitriy Simushev
c3fd4941fe Replace "captcha.php" with a controller 2014-05-30 08:26:35 +00:00
Dmitriy Simushev
36e06aec16 Remove unused functions 2014-05-29 15:15:35 +00:00
Dmitriy Simushev
f5cb3ec179 Replace "operator/getcode.php" with a controller 2014-05-29 15:13:03 +00:00
Dmitriy Simushev
090ebdb332 Merge branch 'master' of github.com:Mibew/mibew 2014-05-29 12:13:20 +00:00
Dmitriy Simushev
a05f966cfd Add 'operatorAuthenticate' event 2014-05-29 11:50:16 +00:00
Dmitriy Simushev
335cdc6055 Rewrite login/logout process 2014-05-29 11:38:21 +00:00
Dmitriy Simushev
6a5b962f01 Build cookie factory
Please, do not tell Cookie Monster.
2014-05-29 08:17:40 +00:00
88ff761876 Merge branch 'invitation_style' 2014-05-28 18:23:32 +04:00
eefd9ece11 Fix appearance of the default invitation in ie8+ 2014-05-28 18:20:59 +04:00
Dmitriy Simushev
078bf1c1fc Merge remote-tracking branch 'invitation_style' 2014-05-28 09:22:30 +00:00
Dmitriy Simushev
037d69bccb Merge remote-tracking branch 'default_chat_logo' 2014-05-28 08:11:23 +00:00
eb062a2424 Add screenshots to a styles of invitations 2014-05-28 02:06:43 +04:00
0619cdc9c1 Fix outlook of the default chat invitation in standard modern browsers 2014-05-28 01:46:18 +04:00
15739dd410 Fix header of the default chat invitation 2014-05-27 18:41:15 +04:00
Dmitriy Simushev
e458257c65 Add missed property to Application class 2014-05-27 14:16:26 +00:00
Dmitriy Simushev
3d8fa75d59 Use RouterInterface in ConrollerResolver constructor 2014-05-27 13:23:59 +00:00
Dmitriy Simushev
f4268b53cf Mark "check_login" function as deprecated 2014-05-27 11:08:17 +00:00
Dmitriy Simushev
dfca800514 Mark "setup_settings_tabs" function as deprecated 2014-05-27 08:28:01 +00:00
Dmitriy Simushev
862d94d35d Replace "operator/features.php" with a controller 2014-05-27 08:23:13 +00:00
af08dd1b43 Update screenshot for the default chat theme 2014-05-27 00:01:33 +04:00
6c3c70024d Update default logo for the default chat theme 2014-05-27 00:01:07 +04:00
edc7838128 Improve the default invitation theme 2014-05-27 00:00:04 +04:00
Dmitriy Simushev
46e329471c Replace "operator/performance.php" with a controller 2014-05-26 13:08:33 +00:00
Dmitriy Simushev
3373095a66 Replace "operator/settings.php" with a controller 2014-05-26 12:36:14 +00:00
Dmitriy Simushev
3ea2da1ad2 Create "BanController" 2014-05-26 10:01:38 +00:00
Dmitriy Simushev
8969b71613 Replace "operator/translate.php" with a controller 2014-05-23 12:56:39 +00:00
Dmitriy Simushev
ae92fe1514 Remove "$messages" global variable 2014-05-23 11:43:09 +00:00
Dmitriy Simushev
36b817ac58 Do not use IDs from form fields 2014-05-23 11:19:53 +00:00
Dmitriy Simushev
9527ef632f Extract access check from operator controllers 2014-05-23 10:53:29 +00:00
Dmitriy Simushev
af45d34721 Restrict access to avatar edit page 2014-05-23 09:11:35 +00:00
Dmitriy Simushev
c39131199d Replace "operator/permissions.php" with a controller 2014-05-23 09:08:13 +00:00
Dmitriy Simushev
e4cce9618e Make "Mibew\Controller\Group\AbstractController" really abstract 2014-05-23 08:54:30 +00:00
Dmitriy Simushev
4d45e57a9b Remove "&amp;" from "get_csrf_token_in_url" function's result 2014-05-23 07:53:09 +00:00
Dmitriy Simushev
16749fec8c Replace "operator/opgroups.php" with a controller 2014-05-22 15:49:41 +00:00
Dmitriy Simushev
8a4da51366 Fix bug with operators URLs at group member page 2014-05-22 15:01:04 +00:00
Dmitriy Simushev
2568072c0e Split giant "GroupController" to several parts 2014-05-22 14:58:54 +00:00
Dmitriy Simushev
8c9e361918 Split giant "OperatorController" to several parts 2014-05-22 13:36:18 +00:00
Dmitriy Simushev
55c1565f66 Do not index avatars 2014-05-22 12:54:13 +00:00
Dmitriy Simushev
9f70aa80d2 Replace "operator/avatar.php" with a controller 2014-05-22 12:48:17 +00:00
Dmitriy Simushev
9fb205bc2b Replace "operator/operator.php" with a controller 2014-05-22 10:12:11 +00:00
Dmitriy Simushev
1af5e68bd0 Fix regexp for thread ID 2014-05-21 10:47:03 +00:00
Dmitriy Simushev
b674060ddf Replace "operator/operators.php" with a controller 2014-05-21 10:45:09 +00:00
55dff20bc1 Beautify js code 2014-05-21 13:24:34 +04:00
Dmitriy Simushev
a3f76b3369 Merge remote-tracking branch 'origin/issue04' 2014-05-21 09:20:42 +00:00
a8e84342b9 Rebuild js using latest Closure compiler 2014-05-21 13:13:35 +04:00
Dmitriy Simushev
42e32bb7a7 Use appropriate name for submit handler in "CannedMessageController" 2014-05-21 08:32:06 +00:00
Dmitriy Simushev
f4129ff8ee Replace "operator/invite.php" with a controller 2014-05-21 08:23:51 +00:00
Dmitriy Simushev
938c4cbd69 Remove unused code that is related with invitations 2014-05-21 07:55:55 +00:00
619a5c4ecf Remove useless blank line 2014-05-21 01:04:12 +04:00
Dmitriy Simushev
ff0e1060e9 Fix new user sound notification (issue #38). 2014-05-20 15:14:35 +00:00
Dmitriy Simushev
ad20c781a5 Make controllers' comments more sensible 2014-05-20 14:22:47 +00:00
Dmitriy Simushev
278f9e65ac Use correct regexp for integer value 2014-05-20 14:09:13 +00:00
Dmitriy Simushev
d6d4e36640 Add a controller for group-related actions 2014-05-20 14:06:39 +00:00
Dmitriy Simushev
4f5207858f Clean up "CannedMessageController" code 2014-05-20 13:37:26 +00:00
Dmitriy Simushev
d06e4a1d48 Add access check based on permissions 2014-05-20 11:09:29 +00:00
Dmitriy Simushev
bd1096760b Use more convenient name for canned messages stuff 2014-05-20 11:09:16 +00:00
Dmitriy Simushev
6bd729e859 Merge branch 'issue22' 2014-05-20 09:33:03 +00:00
Dmitriy Simushev
5ef2495ee3 Replace "operator/cannededit.php" with a controller 2014-05-20 09:22:44 +00:00
525243bd8d Improve sound playback (see Issue #4) 2014-05-19 19:34:23 +04:00
a17583c599 Make all settings changeable (see Issue #22) 2014-05-19 16:35:21 +04:00
Dmitriy Simushev
2630786cc1 Replace "operator/canned.php" with a controller 2014-05-19 10:25:32 +00:00
Dmitriy Simushev
86f2c59faa Make "csrf_check_token" function compatible with new requests logic 2014-05-19 09:36:17 +00:00
Dmitriy Simushev
00e7f3eb40 Add controller's action for user's track 2014-05-19 07:33:44 +00:00
Dmitriy Simushev
ae1b1dfbb1 Add script for coding style check 2014-05-16 09:21:01 +00:00
Dmitriy Simushev
8e01325cad Fix coding style 2014-05-16 08:32:25 +00:00
Dmitriy Simushev
3e01b98388 Add "statistics" controller 2014-05-16 08:28:25 +00:00
Dmitriy Simushev
797fc7a3c0 Fix Exception names in \Mibew\Application class 2014-05-16 08:20:44 +00:00
Dmitriy Simushev
e3fe5b8022 Create a controller for password recovery pages 2014-05-15 14:50:16 +00:00
Dmitriy Simushev
d342a4ca9a Merge branch 'display_image' 2014-05-15 14:38:16 +00:00
Dmitriy Simushev
64e96c1c30 Add HTTP Exceptions classes 2014-05-15 14:29:39 +00:00
cd51a360df Display image next to user name in chat history (see Issue #3) 2014-05-15 18:06:50 +04:00
Dmitriy Simushev
d7153a4bf1 Improve filtration of special characters 2014-05-15 12:09:16 +00:00
Dmitriy Simushev
b399cf74e9 Merge branch 'text_button' 2014-05-15 11:53:32 +00:00
Dmitriy Simushev
9718ab4ec1 Remove unused argument from "get_locale_links" function 2014-05-15 07:16:31 +00:00
4f3c9af3c4 Generate non-graphical buttons for locales with missed images 2014-05-15 01:07:21 +04:00
df448fbaf5 Fix typo 2014-05-15 00:58:50 +04:00
88694193b4 Port text button from legacy (see Issue #35) 2014-05-15 00:55:43 +04:00
Dmitriy Simushev
e76ded074c Remove encoding-related localization constants 2014-05-14 13:01:39 +00:00
Dmitriy Simushev
f483c90ee2 Use only UTF-8 encoding in database connections 2014-05-14 12:39:19 +00:00
Dmitriy Simushev
7042f3dd9e Use only UTF-8 encoding 2014-05-14 12:16:04 +00:00
Dmitriy Simushev
a93517dcf1 Add "history" controller 2014-05-14 09:02:45 +00:00
Dmitriy Simushev
1106a510da Create controller for awaiting-users actions 2014-05-13 14:52:30 +00:00
Dmitriy Simushev
4dac50301d Replace "/operator/updates.php" page with a controller 2014-05-13 14:20:11 +00:00
Dmitriy Simushev
3762bd4906 Add "logged in" access check 2014-05-13 14:10:00 +00:00
Dmitriy Simushev
d41f8547db Use route name instead of path in controllers docs 2014-05-13 14:06:15 +00:00
Dmitriy Simushev
75349a34b5 Mark function "force_password" as deprecated 2014-05-13 13:33:56 +00:00
Dmitriy Simushev
b10408b631 Add routes-based access control 2014-05-13 12:13:02 +00:00
bac1404cf1 Make flat_cp tool portable to systems without GNU sed 2014-05-12 18:01:13 +04:00
Dmitriy Simushev
1c9430286c Add PHP Code Sniffer to dev dependencies 2014-05-08 13:20:03 +00:00
Dmitriy Simushev
c7d87ac5c8 Fix codding style 2014-05-08 13:19:04 +00:00
Dmitriy Simushev
e6c055e782 Mark "start_xml_output" function as deprecated 2014-05-08 12:24:11 +00:00
Dmitriy Simushev
35605b5af3 Create controller for button image 2014-05-08 11:53:25 +00:00
Dmitriy Simushev
8db2b94203 Prepare a request before send 2014-05-08 11:29:39 +00:00
Dmitriy Simushev
09411a4b32 Add "visitorTrack" event 2014-05-07 11:26:22 +00:00
Dmitriy Simushev
049dff0952 Make a controller for widget gateway 2014-05-07 11:23:25 +00:00
Dmitriy Simushev
7374d5f752 Fix bug in the main exceptions catcher 2014-05-07 09:16:09 +00:00
Dmitriy Simushev
f809557679 Replace license.php with controller's action 2014-05-06 15:36:15 +00:00
Dmitriy Simushev
18a2718888 Add extension to LICENSE, README, VERSION files 2014-05-06 15:25:21 +00:00
Dmitriy Simushev
3e7578411b Load all libs in libs/init.php 2014-05-06 15:18:31 +00:00
Dmitriy Simushev
456e329232 Add info about the project to composer.json 2014-05-06 14:55:18 +00:00
Dmitriy Simushev
a15b37d9ea Implement front controller 2014-05-06 14:26:30 +00:00
Dmitriy Simushev
813f27c4d2 Increase PHP version in repository readme file 2014-05-05 09:19:07 +00:00
Dmitriy Simushev
11462e76ef Increase required PHP version 2014-04-29 14:31:43 +00:00
Dmitriy Simushev
8057b40bb3 Update installation procedure 2014-04-28 10:54:09 +00:00
Dmitriy Simushev
b40f1e2e51 Fix bug with takeover feature 2014-04-28 08:39:11 +00:00
Dmitriy Simushev
06991af115 Fix problem with not serial keys and JSON response 2014-04-25 12:38:36 +00:00
Dmitriy Simushev
4e3593375f Update Handlebars.php 2014-04-24 13:43:00 +00:00
Dmitriy Simushev
b0c7cd350f Fix bug with sound when "mibew root" is empty 2014-04-24 13:21:17 +00:00
Dmitriy Simushev
0e2fbf3cf1 Provide js callbacks for invitation events 2014-04-09 08:44:16 +00:00
Mahmood Reza Sajjadi
787f446c31 remove depricated tag 2014-03-27 15:49:30 +04:30
Mahmood Reza Sajjadi
943afd00d1 remove depricated tag 2014-03-27 15:49:24 +04:30
Mahmood Reza Sajjadi
bc33e32ea4 Merge remote-tracking branch 'upstream/master'
Conflicts:
	src/mibew/libs/chat.php
2014-03-25 14:10:16 +04:30
22e055d5e8 Encode the value of Mibew root according to RFC 3986 2014-03-24 11:18:33 +04:00
Mahmood Reza Sajjadi
cf25dbfdf8 add comments 2014-03-23 19:36:20 +04:30
Mahmood Reza Sajjadi
35aa8c4023 compleate comments 2014-03-23 19:00:24 +04:30
Mahmood Reza Sajjadi
4ef272a337 compleate comments 2014-03-23 19:00:18 +04:30
Dmitriy Simushev
bbb5072130 Add "usersUpdateThreadsAlter" event 2014-03-14 15:59:11 +04:00
Dmitriy Simushev
388179bf0b Pass Thread::userId field to the users JS application 2014-03-14 15:42:58 +04:00
Dmitriy Simushev
6faef577e1 Add "ifEven"/"ifOdd" helpers to Handlebars.js 2014-03-11 14:24:55 +00:00
Dmitriy Simushev
1a8035af4f Remove "open_basedir" option.
It brings more problems than profit
2014-03-11 13:13:57 +00:00
Dmitriy Simushev
0299f597ff Update Handlebars.php 2014-03-11 13:11:36 +00:00
Dmitriy Simushev
782aee16b2 Update Marionette.js to v.1.6.4 2014-03-11 13:08:39 +00:00
Dmitriy Simushev
2e492ebd7d Update Backbone.js to v.1.1.2 2014-03-11 13:02:17 +00:00
Dmitriy Simushev
1092d60f79 Fix bug in tools/cat bash script 2014-03-11 11:02:35 +00:00
Dmitriy Simushev
1f4414ba4f Add templates from default js app to chat style 2014-03-07 09:56:16 +00:00
Mahmood Reza Sajjadi
f23f07b05c compleate comments 2014-03-07 12:57:07 +03:30
Mahmood Reza Sajjadi
5178462d64 add depricated tag 2014-03-07 15:44:49 +03:30
Mahmood Reza Sajjadi
bd61854a10 add depricated tag 2014-03-07 15:44:41 +03:30
Mahmood Reza Sajjadi
1af0045997 comments compleated 2014-03-07 14:55:11 +03:30
Dmitriy Simushev
cb3e2ea468 Move some constants from libs/chat.php to libs/common/constants.php 2014-03-06 13:18:55 +00:00
Dmitriy Simushev
c92e0096dd Fix bug with JavaScript plugins options 2014-03-06 11:14:53 +00:00
Dmitriy Simushev
16eac2f8c4 Fix bug with additional localized strings 2014-03-06 11:12:39 +00:00
Dmitriy Simushev
ad20a18317 Fix bug with additional css/js in chat template 2014-03-06 10:57:35 +00:00
Dmitriy Simushev
9069570f0b Inplement singleton pattern in AbstractProcessor 2014-03-05 08:58:10 +00:00
Dmitriy Simushev
f467c35bd3 Use "get" prefix for StyleInterface::defaultStyle 2014-03-04 14:19:43 +00:00
Dmitriy Simushev
8fe93ec779 Use "get" prefix for StyleInterface::currentStyle 2014-03-04 14:15:33 +00:00
Dmitriy Simushev
db710b9e06 Use "get" prfix for AbstractStyle::defaultConfigurations 2014-03-04 14:07:19 +00:00
Dmitriy Simushev
3a01ec4d26 Rename StyleInterface::availableStyles to "getAvailableStyles" 2014-03-04 14:03:48 +00:00
Dmitriy Simushev
2c28a620b9 Rename "StyleInterface::configurations" to "getConfigurations" 2014-03-04 13:56:28 +00:00
Dmitriy Simushev
75703ecadd Rename "StyleInterface::name" method to "getName" 2014-03-04 13:53:10 +00:00
Dmitriy Simushev
2b2139687a Rename StyleInterface::filesPath method to "getFilesPath" 2014-03-04 13:48:56 +00:00
Dmitriy Simushev
869ce50f31 Add \Mibew\Plugin\AbstractPlugin class 2014-03-04 13:41:58 +00:00
Dmitriy Simushev
16d48592cc Extend \Mibew\Plugin\PluginInterface 2014-03-04 13:14:28 +00:00
Dmitriy Simushev
414b5c6b60 Fix documentation for AbstractStyle and StyleInterface 2014-03-04 12:09:27 +00:00
Mahmood Reza Sajjadi
5a7c5aefb9 some comments added 2014-03-02 14:06:29 +03:30
Mahmood Reza Sajjadi
597dc2a91a compleate comments 2014-03-02 14:06:09 +03:30
Mahmood Reza Sajjadi
6658e9e5c3 Merge remote-tracking branch 'upstream/master' 2014-02-28 02:06:42 +03:30
Mahmood Reza Sajjadi
e3cd96c758 comments correction 2014-02-28 01:38:07 +03:30
Mahmood Reza Sajjadi
3315068a30 add comments 2014-02-28 01:37:53 +03:30
Dmitriy Simushev
b8fa2dc338 Fix bug with EventDispatcher and PluginInterface 2014-02-27 15:07:07 +00:00
Dmitriy Simushev
96447cedc1 Fix plugins localization 2014-02-27 09:22:00 +00:00
Dmitriy Simushev
e7261672cc Fix bug with hidding menu when operator's local name is blank 2014-02-26 15:39:02 +00:00
Dmitriy Simushev
f41546b1fd Update Handlebars.php version 2014-02-26 14:33:19 +00:00
Dmitriy Simushev
173eff33c1 Happy new year, 2014 =) 2014-02-26 13:16:02 +00:00
Dmitriy S. Simushev
06ee0e9c3c Merge pull request #24 from faf/master
New tool for headers update
2014-02-26 04:50:27 -08:00
Dmitriy Simushev
66c4355ee0 Change plugins loading logic 2014-02-26 12:35:56 +00:00
Dmitriy Simushev
409c455bd1 Encapsulate PSR-0 in \Mibew\Autoloader class 2014-02-26 12:27:16 +00:00
Dmitriy Simushev
bb4e935303 Use interface instead of abstract classes for plugins 2014-02-26 11:17:33 +00:00
Dmitriy Simushev
9598f0db42 Rename \Mibew\PluginManager to \Mibew\Plugin\Manager 2014-02-25 15:09:02 +00:00
Dmitriy Simushev
522aed6a5e Add "ifEven" and "ifOdd" Handlebars.php helpers 2014-02-25 12:53:35 +00:00
Dmitriy Simushev
dea6f80d24 Fix bug with timers at awaiting users page 2014-02-25 11:18:26 +00:00
Dmitriy Simushev
ee003d6336 Reduce rendering count of visitors view 2014-02-25 11:15:00 +00:00
Dmitriy Simushev
25c267f3df Use correct render method for composit views 2014-02-25 11:11:09 +00:00
Dmitriy Simushev
2e8479383e Update jQuery to v.1.11.0 2014-02-20 13:06:53 +00:00
Dmitriy Simushev
652917cbdf Update Handlebars.js to v.1.3.0 2014-02-20 13:03:00 +00:00
Dmitriy Simushev
667fb0e290 Update Marionette.js to v.1.6.2 2014-02-20 12:52:02 +00:00
Dmitriy Simushev
10aa1a8da0 Update Backbone.js to v.1.1.1 2014-02-20 12:48:27 +00:00
Dmitriy Simushev
3d09666c68 Update Underscore.js to v.1.6.0 2014-02-20 12:35:49 +00:00
Mahmood Reza Sajjadi
540b9aab74 comments correction 2014-02-20 14:10:09 +03:30
c46be46bb8 Update source header and a header in the tool for headers update 2014-02-19 20:13:34 +04:00
c495135e56 Rewrite script for headers update 2014-02-19 20:06:33 +04:00
Dmitriy Simushev
87c5569dab Update access restrictions for pages styles' files 2014-02-19 10:46:21 +00:00
Dmitriy Simushev
92f14d52f3 Update access restrictions for chat style's files 2014-02-19 10:43:56 +00:00
Dmitriy Simushev
7e188d1b05 Fix typos and split long lines in comments 2014-02-19 08:53:20 +00:00
Dmitriy Simushev
21a38d8b00 Merge remote-tracking branch 'mahmood/master' 2014-02-19 08:46:45 +00:00
Dmitriy Simushev
15b494a2ac Remove invitation iframe border in IE<9 2014-02-18 12:32:37 +00:00
Dmitriy Simushev
8c0dca3df7 Use chat style defined params for invitation window 2014-02-18 11:17:35 +00:00
Dmitriy Simushev
aa3435bfd7 Use chat window params from config for button generation 2014-02-18 09:11:47 +00:00
Dmitriy Simushev
f0f612b11a Use correct default config params for page and chat styles 2014-02-18 09:10:03 +00:00
Dmitriy Simushev
0f17cac626 Reduse code duplication in dialogs' client side templates 2014-02-17 10:54:49 +00:00
Mahmood Reza Sajjadi
a89a076db9 comments correction 2014-02-17 14:02:05 +03:30
Dmitriy Simushev
4b28412648 Add favicon to dialog style 2014-02-14 14:37:32 +00:00
Dmitriy Simushev
db2f3367dd Fix extra escaping at the install page 2014-02-14 12:05:49 +00:00
Dmitriy Simushev
c70ad9e6a2 Fix undefined "mibewroot" var (see issue #21) 2014-02-14 12:04:12 +00:00
Dmitriy Simushev
921f382c6a Reorganize dialog style
Move client side templates from "handlebars_templates" to
"templates_src/client_side"
2014-02-14 11:44:14 +00:00
Dmitriy Simushev
9e82414728 Use handlebars.php for dialogs' templates 2014-02-14 10:51:22 +00:00
Dmitriy Simushev
f4702e5381 Rename "layout" template to "_layout" 2014-02-14 10:43:02 +00:00
Dmitriy Simushev
94d5689077 Pass style name to operator pages' templates 2014-02-14 10:29:19 +00:00
Dmitriy Simushev
3ad8bfb380 Rename "header" block to "head" in operator pages' templates 2014-02-14 10:20:04 +00:00
Dmitriy Simushev
3337aa8bb8 Remove unneeded $page variable from PageStyle::render 2014-02-13 13:32:09 +00:00
Dmitriy Simushev
bb5fa8db5b Rename "L10n" handlebars.js helper to "l10n" 2014-02-13 13:02:11 +00:00
Mahmood Reza Sajjadi
f70b40f112 Merge remote-tracking branch 'upstream/master' 2014-02-13 15:17:40 +03:30
Mahmood Reza Sajjadi
1e396a5328 comments added 2014-02-13 15:10:38 +03:30
Dmitriy Simushev
c3f902bfe6 Fix path to the logo in layout.handlebars 2014-02-11 10:17:07 +00:00
Dmitriy Simushev
450f3e5d35 Add custom elements in the header after default ones
Move "header" block in the "default" pages style to the bottom of
header tag.
2014-02-11 09:12:50 +00:00
Dmitriy Simushev
c20f285ca7 Fix tests for JS Mibew API 2014-02-10 15:51:42 +00:00
Dmitriy Simushev
30100a5a31 Move client side templates into pages style 2014-02-10 15:28:35 +00:00
Dmitriy Simushev
47b61f05c0 Use Handlebars.php as template engine 2014-02-10 14:07:31 +00:00
Dmitriy Simushev
5670b19fab Fix AbstractStyle class path (see Issue #19) 2014-02-07 14:25:05 +00:00
Dmitriy Simushev
27f3346435 Do not use HTML entities in "form.field.groupparent.root" local const 2014-02-06 10:44:50 +00:00
Dmitriy Simushev
8d3dcacded Use sanitization for locale constants 2014-01-31 12:59:25 +00:00
Dmitriy Simushev
825da2027f Remove ".idea" folder 2014-01-31 09:44:24 +00:00
Dmitriy Simushev
ca0a4274dc Add Handlebars.php to the project via composer 2014-01-30 09:09:15 +00:00
Dmitriy Simushev
cab8caac90 Use the same declaration for *Processor::call methods 2014-01-29 13:23:18 +00:00
Dmitriy Simushev
7bb7a388b8 Mark API methods in *Processor classes as deprecated 2014-01-29 12:36:41 +00:00
Dmitriy Simushev
b5778a8be2 Add Interaction::mandatoryArguments method
Rename "obligatory" arguments to "mandatory" arguments. Use
Mibew API Interaction "mandatoryArguments" method instead of
"obligatoryArguments" property to increase code reliability.
2014-01-29 12:23:17 +00:00
Dmitriy Simushev
26b2d74cc4 Use method for Interaction::reservedFunctionName
Replace Mibew API Interaction "reservedFunctionName" property
with "getReservedFunctionsNames" method to increase reliability
of the code.
2014-01-29 11:14:55 +00:00
Dmitriy Simushev
128d387ebe Add default value to get_operators_list function's argument 2014-01-28 15:45:43 +00:00
Dmitriy Simushev
98502d9e93 Rename \Mibew\API\Interation\Interaction class to AbstractInteraction 2014-01-28 15:36:13 +00:00
Dmitriy Simushev
93f5b82dec Rename \Mibew\RequestProcessor\Processor class to AbstractProcessor 2014-01-28 15:33:08 +00:00
Dmitriy Simushev
a5ec847ed1 Rename \Mibew\Style\Style class to AbstractStyle 2014-01-28 15:28:22 +00:00
Dmitriy Simushev
57d72e95d0 Fix bug with undefined index 'stylepath' 2014-01-28 14:25:04 +00:00
Dmitriy Simushev
42ff39f4d9 Apply new codding style 2014-01-28 14:17:48 +00:00
Dmitriy Simushev
41f1e0a3bc Remove functions definition from operator/opgroups.php 2014-01-28 14:16:13 +00:00
Dmitriy Simushev
c6b03cfe55 Remove functions definition from operator/userhistory.php 2014-01-28 14:16:13 +00:00
Dmitriy Simushev
d47903a912 Remove functions definition from operator/translate.php 2014-01-28 14:16:13 +00:00
Dmitriy Simushev
489cae7122 Use anonymous functions to sort strings at operator/translate.php 2014-01-28 14:16:13 +00:00
Dmitriy Simushev
0720df1a2e Do not check formatting at operator/translate.php page 2014-01-28 14:16:13 +00:00
Dmitriy Simushev
ff5c620a29 Remove functions definition from operator/threadprocessor.php 2014-01-28 14:16:13 +00:00
Dmitriy Simushev
69304a0c71 Remove functions definition from operator/groupmembers.php 2014-01-28 14:15:56 +00:00
Dmitriy Simushev
f49b53f9d6 Remove functions definition from operator/group.php 2014-01-24 14:12:24 +00:00
Dmitriy Simushev
c2336a753e Remove functions definition from operator/groups.php 2014-01-24 14:01:57 +00:00
74c448d0d0 Add name for the Japanese locale 2014-01-23 18:39:49 +04:00
Dmitriy Simushev
08bb694753 Fix typo in README file 2014-01-23 12:38:14 +00:00
Dmitriy Simushev
4ef067118b Pass page templates data through PageStyle::render method 2014-01-21 11:30:31 +00:00
Dmitriy Simushev
e291836523 Do not use global variables into page views 2014-01-21 11:16:48 +00:00
Dmitriy Simushev
5b964974cd Do not use $menuItemsCount global variable 2014-01-21 10:51:36 +00:00
Dmitriy Simushev
02cda0c1f4 Fix usage of undefined $groupid variable 2014-01-21 10:42:23 +00:00
Dmitriy Simushev
2a1825303a Fix usage of undefined $mibew_encoding variable 2014-01-21 10:41:15 +00:00
Dmitriy Simushev
03797744e2 Do not use $current_locale global variable
Replace $current_locale global var with CURRENT_LOCALE constant
2014-01-21 10:38:34 +00:00
Dmitriy Simushev
7b83f8ca6f Include $errors global variable into $page 2014-01-21 10:03:51 +00:00
Dmitriy Simushev
6da2a33ce3 Do not use $version global variable
Replace $version global var with MIBEW_VERSION constant
2014-01-20 14:57:27 +00:00
Dmitriy Simushev
c1ae7b8eb9 Do not use $featuresversion global variable
Replace $featuresversion global var with FEATURES_VERSION constant
2014-01-20 14:47:00 +00:00
Dmitriy Simushev
e42c3feaa7 Do not use global variable $dbversion
Replace $dbversion global variable with DB_VERSION constant
2014-01-20 14:43:50 +00:00
Dmitriy Simushev
83b029e3b9 Do not use global variable $errors in verifyparam_groupid func 2014-01-20 14:27:35 +00:00
Dmitriy Simushev
3feb32d6c9 Remove global variable $page from setup_redirect_links func 2014-01-20 13:26:23 +00:00
Dmitriy Simushev
155c858fd6 Remove global variable $page from set_form_date func 2014-01-20 13:20:12 +00:00
Dmitriy Simushev
f2f4f7bb12 Remove global variable $page from prepare_menu func 2014-01-20 13:11:16 +00:00
Dmitriy Simushev
ee834e6621 Rewrite pagination functions
Remove global variable $page from pagination functions, refactor
them and add inline documentation.
2014-01-20 11:52:22 +00:00
Dmitriy Simushev
a2451c0575 Use different pagination images for different styles 2014-01-17 14:43:41 +00:00
Dmitriy Simushev
e53314f403 Remove $default_cron_key global variable
Use DEFAULT_CRON_KEY constant instead of global variable
2014-01-17 11:30:43 +00:00
Dmitriy Simushev
1396cbc25f Remove global variable $session_prefix
Use constant SESSION_PREFIX instead of global variable
2014-01-17 11:15:52 +00:00
Dmitriy Simushev
94815071c0 Fix bug with send chat history to email 2014-01-17 10:15:49 +00:00
Dmitriy Simushev
29dd1e8c72 Fix bug with close button in chat window 2014-01-17 09:59:54 +00:00
Dmitriy Simushev
b03e1de0a9 Replace expand* function with TemplateEngine class 2014-01-17 09:25:31 +00:00
Dmitriy Simushev
5661cb318d Do not use global $page variable in form_value_mb func 2014-01-16 15:46:45 +00:00
Dmitriy Simushev
3d907f260e Do not use global $page variable in form_value_cb func 2014-01-16 15:46:20 +00:00
Dmitriy Simushev
d9530d1590 Do not use global $page variable in form_value func 2014-01-16 15:44:16 +00:00
Dmitriy Simushev
9c0348cce3 Add second argument to \Mibew\Style\StyleInterface::render 2014-01-16 10:50:48 +00:00
Dmitriy Simushev
175686aded Do not use global $page array in setup_statistics_tabs func 2014-01-16 09:50:32 +00:00
Dmitriy Simushev
ab56e6f35b Fix documentation
Fix typos and improve documentation for "setup_group_settings_tabs",
"setup_operator_settings_tabs" and "setup_settings_tabs" functions.
2014-01-16 09:41:22 +00:00
Dmitriy Simushev
ab52444bfd Do not use global $page array in setup_settings_tabs func 2014-01-15 15:29:35 +00:00
Dmitriy Simushev
4aff809fcb Do not use global $page array in setup_operator_settings_tabs func 2014-01-15 15:23:49 +00:00
Dmitriy Simushev
3f667e8fa6 Do not use global $page array in setup_group_settings_tabs function 2014-01-15 15:15:07 +00:00
Dmitriy Simushev
70699aeecd Use MIBEW_ENCODING constant
Replace $mibew_encoding global variable with MIBEW_ENCODING constant
2014-01-15 13:57:29 +00:00
Dmitriy Simushev
56c163f6a9 Remove $default_locale and $home_locale globals 2014-01-15 13:35:28 +00:00
Dmitriy Simushev
f48f50e09e Remove $knownAgents global variable 2014-01-15 12:51:45 +00:00
Dmitriy Simushev
24f7bb5a66 Use MIBEW_WEB_ROOT constant
Replace $mibewroot global variable with MIBEW_WEB_ROOT constant
2014-01-15 12:40:35 +00:00
Dmitriy Simushev
12f5b7dbd3 Fix name of the \Mibew\RequestProcessor\ProcessorException class 2014-01-15 09:45:34 +00:00
Dmitriy Simushev
10b8d4b2e4 Use autoload for \Mibew\API\* classes 2013-12-27 15:08:10 +00:00
Dmitriy Simushev
43077feb01 Rename BaseStyle class to Style 2013-12-27 15:08:00 +00:00
Dmitriy Simushev
e6c21582f8 Use autoload for \Mibew\RequestProcessor\* classes 2013-12-27 11:57:09 +00:00
Dmitriy Simushev
cccfb7eac8 Use autoload for \Mibew\Style\* classes 2013-12-27 10:16:23 +00:00
Dmitriy Simushev
532a08763f Use autoload for \Mibew\Tread class 2013-12-26 15:28:34 +00:00
Dmitriy Simushev
bd5d6a277d Do not use plugins at system installation 2013-12-26 15:00:39 +00:00
Dmitriy Simushev
a033d72f20 Use autoload for \Mibew\Plugin class 2013-12-26 14:54:36 +00:00
Dmitriy Simushev
98c96a7c81 Use autoload for \Mibew\PluginManager class 2013-12-26 14:24:34 +00:00
Dmitriy Simushev
c76dbeab05 Use autoload for \Mibew\EventDispatcher class 2013-12-26 13:40:52 +00:00
Dmitriy Simushev
22c222d3cc Use autoload for \Mibew\Database class 2013-12-26 13:23:27 +00:00
Dmitriy Simushev
8256aea4cd Use autoload for \Mibew\Settings class 2013-12-26 12:57:32 +00:00
Dmitriy Simushev
4ea034e92e Add class autoloader function based on PSR-0 2013-12-26 12:36:15 +00:00
Dmitriy Simushev
9f82089d61 Use MIBEW_FS_ROOT const for file system root path 2013-12-26 11:56:16 +00:00
Dmitriy Simushev
5714193eeb Move page style related JS code to separate files 2013-12-25 14:01:06 +00:00
Dmitriy Simushev
086c163db1 Do not define variables in views 2013-12-25 14:00:51 +00:00
Dmitriy Simushev
c9ab51dbb2 Encapsulate default style storage in *Style classes 2013-12-24 09:53:54 +00:00
Dmitriy Simushev
45a70affce Fix bug "Class 'PageStyle' not found" 2013-12-24 09:24:37 +00:00
Dmitriy Simushev
881c3a0f81 Replace 'invitationstyle' config with 'invitation_style' 2013-12-23 15:36:38 +00:00
Dmitriy Simushev
3fc3544f23 Move all function related with invitation styles to InvitationStyle class 2013-12-23 15:29:18 +00:00
Dmitriy Simushev
3627e79fe0 Move all functions related with page styles to PageStyle class 2013-12-23 14:49:21 +00:00
Dmitriy Simushev
b9cf71c6b0 Use 'page style' instead of 'operator pages style' 2013-12-23 13:29:26 +00:00
Dmitriy Simushev
4c51930c25 Group all dialogs related functions in ChatStyle class 2013-12-23 12:50:23 +00:00
Dmitriy Simushev
d406f720d8 Add an ability to select style for operator pages 2013-12-17 15:13:31 +00:00
Dmitriy Simushev
b4ba38d770 Add installation_in_progress function 2013-12-17 15:09:29 +00:00
Dmitriy Simushev
58b89f7ae4 Remove unused file autologin.php 2013-12-17 13:17:45 +00:00
Dmitriy Simushev
5d117fa66c Move all operator page theme files in styles/operator_pages/default 2013-12-17 13:15:42 +00:00
Dmitriy Simushev
94f9d71a66 Create function for views rendering 2013-12-17 11:42:17 +00:00
Dmitriy Simushev
2905446030 Update .gitignore to don't index custom locales 2013-12-16 16:05:31 +00:00
Dmitriy Simushev
87d993da35 Move avatar folder to <mibew_root>/files 2013-12-16 15:27:14 +00:00
80d500413d Set default and safe web server settings 2013-11-14 18:40:42 +04:00
638757879c Disable autocomplete for password fields 2013-11-14 17:35:18 +04:00
64254875f8 Add TODO for future message check 2013-11-14 15:26:30 +04:00
a749b8c000 Improve validation of incoming params 2013-11-07 02:59:24 +04:00
62bb63242b Tiny bugfix 2013-11-07 02:57:27 +04:00
5e28bc91ea Unify UI behaviour for bans management 2013-11-07 02:41:11 +04:00
3215cad462 Increase fixed delay for windows autoclose after save canned messages and translations 2013-11-07 02:39:23 +04:00
5e3eacbb69 Add missed type attribute for embed javascripts 2013-11-07 02:35:27 +04:00
ecb95933aa Add labels for all input fields to improve user experience 2013-11-07 01:17:38 +04:00
f739935096 Add initialization of 'sendmail_from' PHP variable
This is a workaround for some systems that requires this variable to be set explicitly for sending emails (thanks to falcon for the issue)
2013-11-06 23:01:19 +04:00
35cd7c6e67 Switch to the new logo 2013-10-30 20:09:38 +04:00
5fd1b69135 Remove small login form from the login page 2013-10-30 20:04:11 +04:00
88c13f7d7c Fix condition of visibility of the tiny login form 2013-10-29 20:15:49 +04:00
0792bf98bd Implement more secure methods for the generation of tokens 2013-10-29 02:57:43 +04:00
58e8dcd5f6 Make CSRF token more secure 2013-10-29 02:41:17 +04:00
a6d1008242 Mute setting of PHP init parameters 2013-10-29 02:37:31 +04:00
7e4a380320 Secure user session 2013-10-29 02:36:34 +04:00
a4449482e3 Implement additional CSRF checks 2013-10-29 02:27:32 +04:00
7b5caf0e8d Define constants for all cookies' names 2013-10-29 01:44:53 +04:00
5a47fa8074 Secure auth cookie in https mode 2013-10-29 01:03:34 +04:00
b2f43076aa Add missed checks for the failed file openings 2013-10-28 17:42:52 +04:00
a2bfeb72a7 Add new localization constant 2013-10-28 17:23:04 +04:00
12c3e2d60d Sanitize all redirects 2013-10-28 17:10:10 +04:00
4345070720 Secure an avatar's filename 2013-10-28 16:54:55 +04:00
7f4b1fa9cc Secure file paths (second part) 2013-10-28 16:43:24 +04:00
bad9918b98 Improve verification and storing of the values of locale 2013-10-28 16:16:10 +04:00
255ac6220c Secure database tables prefix 2013-10-28 15:54:46 +04:00
0fc7477672 Sanitize mibewroot value 2013-10-28 15:51:11 +04:00
24f1a64fca Restrict opening of files outside the Mibew installation 2013-10-28 15:29:29 +04:00
5de084e63e Update version 2013-10-28 15:15:06 +04:00
8be55e86d7 Secure file paths (use dirname everywhere) 2013-10-28 15:11:38 +04:00
d73922358f Move name of the localization cookie into a variable 2013-10-28 13:10:12 +04:00
5cb3a50642 Switch to a more reliable function for generation of userid 2013-10-22 18:00:40 +04:00
4873d03d42 Improve passwords hashing 2013-10-21 20:14:42 +04:00
c34ce4c17e Improve generation of CAPTCHA images 2013-10-21 20:12:56 +04:00
f1e3006b45 Fix locale code for Norsk nynorsk 2013-10-10 14:13:05 +04:00
b5d74330fe Fix locales' names and codes 2013-10-06 01:51:20 +04:00
5a1c3bf5c8 Remove obsolete whatsnew.txt 2013-09-27 18:54:14 +04:00
401185b953 Update README 2013-09-27 18:43:04 +04:00
Dmitriy Simushev
f133155798 Clean up repository 2013-09-27 17:52:36 +04:00
d310943b0e Add Lithuanian translation (thanks to livechat.lt) 2013-09-26 19:41:44 +04:00
eaba2fb708 Completely wiped out the old application name 2013-09-26 19:33:50 +04:00
a2f78ea9f3 wiped out the old application name 2013-09-26 19:33:17 +04:00
2f42366d0a Unify translations: update localization constants from legacy branch 2013-09-26 18:33:47 +04:00
Dmitriy Simushev
f7f54f8754 Update Dutch translation (thanks to Erik Kerkhoven) 2013-09-22 14:01:34 +04:00
Dmitriy Simushev
90e644e9eb Update Marionette.js to v1.1.0 2013-08-22 14:28:38 +00:00
Dmitriy Simushev
a2b662e2ce Update copyright notice 2013-08-09 11:18:50 +00:00
7016a45312 Mibew Tray 1.1.1 release
Update links to an actual mibew domain in Mibew Tray application (thanks to Nemesis0one)
2013-08-09 09:53:38 +00:00
Dmitriy Simushev
2562abdf4b Pass user_id field of the visitor to the client side 2013-08-06 13:45:20 +00:00
a0a17e6076 Fix steps enumeration in README file 2013-08-06 13:37:43 +00:00
853fecc4a0 Update translations (da, de, fi, it, pt-br) 2013-08-06 13:34:42 +00:00
d62109d72b Improve packaging script 2013-08-06 13:33:26 +00:00
bf860a32ac Update localization constants 2013-08-06 13:32:26 +00:00
Dmitriy Simushev
2565789af7 Fix docs for update_operator function 2013-07-17 08:18:14 +00:00
Dmitriy Simushev
77023f6400 Fix bug with threads queue update
Move user to priority queue when operator has connection problems
2013-07-15 15:09:35 +00:00
Dmitriy Simushev
a899cc2dff Fix bug with old threads closing 2013-07-15 14:33:04 +00:00
Dmitriy Simushev
ab8a889464 Fix bug with docs for chatthread table 2013-07-15 08:51:09 +00:00
Dmitriy Simushev
3c740457f3 Update Marionette.js to v1.0.4 2013-07-14 19:20:19 +00:00
Dmitriy Simushev
6609bf4b16 Update Underscore.js to v1.5.0 2013-07-14 19:17:17 +00:00
Dmitriy Simushev
f4f4e25798 Update jQuery to v1.10.2 2013-07-14 19:12:00 +00:00
Dmitriy Simushev
cbe589f5b7 Fix bug with popup windows with geo info in IE. 2013-07-14 18:51:12 +00:00
Dmitriy Simushev
caa90f9f9c Fix user duplication in visitors and threads lists
User can be either in threads list or in visitors list
but not in both at the same time.
2013-07-12 14:46:31 +00:00
Dmitriy Simushev
862e23e79c Add 'answer' button to invitation 2013-07-12 13:53:37 +00:00
Dmitriy Simushev
bc5c274c8f Fix notice in view/canned.php
Notice was about undefined index 'level' in view/canned.php
on line 48
2013-07-09 09:23:34 +00:00
Dmitriy Simushev
37159eae3b Add 'operatorLogin' and 'operatorLogout' events 2013-07-09 08:43:30 +00:00
Dmitriy Simushev
f96df5ec61 Fix bug with visitors list at operator/users.php page 2013-07-08 14:04:31 +00:00
Dmitriy Simushev
827d9a0b8d Make operator's email unique in the system 2013-07-08 11:04:17 +00:00
Dmitriy Simushev
142d9edb20 Fix bug in operator_by_email function 2013-07-08 10:58:02 +00:00
Dmitriy Simushev
b41405ea09 Make operator's email field required 2013-07-08 10:24:34 +00:00
Dmitriy Simushev
1a0b315365 Add statistics aggregation interval 2013-07-03 08:31:36 +00:00
Dmitriy Simushev
dae493b1a8 Do not use regular expression to check JSON in Mibew API.
It leads to problems with big packages because of limitation on
max backtrack count (see pcre.backtrack_limit for details).
2013-06-25 10:26:17 +00:00
Dmitriy Simushev
13c577d2ae Move plugins' dependences into their classes 2013-06-24 13:01:56 +00:00
Dmitriy Simushev
48ecf35f1a Add field with close timestamp to the Thread class 2013-06-24 11:29:22 +00:00
Dmitriy Simushev
fb6517dc9f Update plugins message system.
Now arbitrary data can be attached to any message.
2013-06-19 14:17:04 +00:00
Dmitriy Simushev
aa38622b8d Add some comments to database structure 2013-06-19 09:52:48 +00:00
Dmitriy Simushev
248847436b Remove messages indexing 2013-06-19 09:15:29 +00:00
Dmitriy Simushev
be536272ca Update Handlebars to v1.0.0 and recompile templates 2013-06-17 13:36:19 +00:00
Dmitriy Simushev
77a3af4d11 Update Marionette.js to v1.0.3 2013-06-17 13:12:31 +00:00
Dmitriy Simushev
7644b9b07c Update jQuery to v1.10.0 2013-06-17 13:02:02 +00:00
Dmitriy Simushev
e01a75faea Add an ability to start chat with specified operator 2013-05-29 15:31:30 +00:00
Dmitriy Simushev
b89e838625 Clean up statistics code 2013-05-29 08:38:23 +00:00
Dmitriy Simushev
62a2176aaa Extend by page statistics 2013-05-28 14:50:13 +00:00
Dmitriy Simushev
734c68a022 Extend by operator statistics 2013-05-28 10:55:58 +00:00
Dmitriy Simushev
cef80ad20b Fix bug with statistics display when there is not enough data 2013-05-28 10:23:42 +00:00
Dmitriy Simushev
475d0e22ae Fix bug with by thread chat statistics 2013-05-28 10:06:25 +00:00
Dmitriy Simushev
08617d41c6 Fix bug with the 1st operator's message in inviation
Now it has correct agentId value
2013-05-28 08:37:39 +00:00
Dmitriy Simushev
b33ccc4a84 Extend by thread statistics 2013-05-27 13:54:30 +00:00
Dmitriy Simushev
18e6862949 Update chat start time when user accept invitation 2013-05-27 09:31:36 +00:00
Dmitriy Simushev
97a76cbd69 Remove unused invitation's localized strings 2013-05-24 12:49:08 +00:00
Dmitriy Simushev
d70ed401cb Send messages about close invitation by timeout 2013-05-24 12:44:24 +00:00
Dmitriy Simushev
644cec05cb Fix bug with invitation state retrieving in widget.php 2013-05-24 12:40:58 +00:00
Dmitriy Simushev
3fc6218332 Update threads history
Do not show threads related with ignored or rejected invitations.
2013-05-24 11:53:12 +00:00
Dmitriy Simushev
bc287f0e11 Update invitation preview 2013-05-24 11:07:09 +00:00
Dmitriy Simushev
545ff7db87 Clean up JavaScript code of the Widget 2013-05-24 10:40:40 +00:00
Dmitriy Simushev
1480519bb2 Fix notice about undefined 'send_shortcut' 2013-05-24 10:17:25 +00:00
Dmitriy Simushev
f7d6971849 Automatically hide invitation popup
Invitation popup will hide if invitation canceled by operator or
closed by timeout.
2013-05-24 10:05:20 +00:00
Dmitriy Simushev
43d731cf72 Update license headers in CSS files 2013-05-23 15:12:27 +00:00
Dmitriy Simushev
3994b924de Completely rewrite invitations 2013-05-23 15:02:10 +00:00
Dmitriy Simushev
a2db90289a Create SoundManager model in Chat JS Application
It help to unbind messages collection view and message form model
2013-05-23 12:12:33 +00:00
Dmitriy Simushev
b3c77aa972 Fix bug with multiple scripts loading by widget 2013-05-21 09:22:48 +00:00
Dmitriy Simushev
11d726867c Fix bug with cookie update in widget
Widget update target site tracking cookie only if it is absent
2013-05-21 08:38:43 +00:00
Dmitriy Simushev
8b025cf8bd Visitors can reject invitations not only hide 2013-05-20 10:25:53 +00:00
Dmitriy Simushev
29baaa700c Upadate widget. It can pass some data to server now 2013-05-20 09:29:14 +00:00
Dmitriy Simushev
9424e48c74 Fix ability to use plugin options at client side 2013-05-17 15:34:58 +00:00
Dmitriy Simushev
d86191d4af Use get_app_location func in cron_get_uri func 2013-05-17 14:51:13 +00:00
Dmitriy Simushev
c64c1a441d Refactor JavaScript invitation and tracking code 2013-05-17 13:59:15 +00:00
Dmitriy Simushev
52f00cbe59 Refactor build_js_response function
Rename it to build_widget_response and move to libs/common/response.php
2013-05-17 09:52:41 +00:00
Dmitriy Simushev
5a3b2916d1 Update license info in license.php 2013-05-16 14:17:28 +00:00
Dmitriy Simushev
6a477d39f0 Update license headers in JavaScript files 2013-05-16 11:12:02 +00:00
Dmitriy Simushev
aa3741a9fa Remove handlebars nested 'if else' bug workaround 2013-05-15 10:06:19 +00:00
Dmitriy Simushev
5c8464520c Update handlebars to v.1.0.0-rc.4 and recompile templates 2013-05-15 09:51:57 +00:00
Dmitriy Simushev
18dd2c01e4 Calculate page statistics that older one day 2013-05-13 09:49:29 +00:00
Dmitriy Simushev
49894f7d9e Calculate operator statistics that older one day 2013-05-13 09:26:45 +00:00
Dmitriy Simushev
1cde50242d Calculate thread statistics that older one day 2013-05-13 09:20:30 +00:00
Dmitriy Simushev
1a4d8e809d Create full statistics description 2013-05-08 11:18:58 +00:00
Dmitriy Simushev
7c648ce829 Force set plugin message id in Chat JS application 2013-05-08 10:54:42 +00:00
Dmitriy Simushev
d77047f62c Add some output to cron.php 2013-05-07 13:38:37 +00:00
Dmitriy Simushev
e6a5f9712d Update notices about cron 2013-05-07 13:20:26 +00:00
Dmitriy Simushev
ba2ede20aa Store time of last cron run 2013-05-07 12:44:16 +00:00
Dmitriy Simushev
663c9119e6 Set Database::throwExceptions back in calculate statistics funcs 2013-05-07 12:18:02 +00:00
Dmitriy Simushev
d3b254fc82 Set Database::throwExceptions back in cron_index_message 2013-05-07 12:17:45 +00:00
Dmitriy Simushev
7bf20e29e7 Update Database::throwException function
Now it returns previous set value.
2013-05-07 11:52:44 +00:00
Dmitriy Simushev
289fb76906 Refactor cron_calculate_statistics function 2013-05-07 11:25:21 +00:00
Dmitriy Simushev
a7ce1ff704 Fix bug with PluginManager in install/dbperform.php 2013-05-07 11:09:08 +00:00
Dmitriy Simushev
c8039ec248 Calculate page statistics by cron 2013-05-07 10:35:38 +00:00
Dmitriy Simushev
b337c689b9 Fix notification about cron at operator/history.php 2013-05-06 14:17:15 +00:00
Dmitriy Simushev
6ad1828079 Calculate threads and operator statistics by cron 2013-05-06 14:12:19 +00:00
Dmitriy Simushev
67de68b28b Add notification about cron to operator/history.php 2013-04-30 14:05:30 +00:00
Dmitriy Simushev
8914f01b3b Create cron_get_uri function 2013-04-30 13:39:49 +00:00
Dmitriy Simushev
ff3bfa545f Update pluginMessageIndex event
Add ability for plugins to alter sender name and operator ID
during message indexing.
2013-04-30 13:20:14 +00:00
Dmitriy Simushev
dfd3b9e615 Create Thread::postPluginMessage method 2013-04-30 13:18:28 +00:00
Dmitriy Simushev
78037e60a3 Update descriptions of ant targets 2013-04-30 10:44:25 +00:00
Dmitriy Simushev
57eb898bfd Remove duplication from install/dbinfo.php 2013-04-30 10:29:36 +00:00
Dmitriy Simushev
fa33342dbc Add messages indexing 2013-04-30 10:22:44 +00:00
Dmitriy Simushev
3594485267 Add ability for plugins to send custom messages 2013-04-29 11:04:17 +00:00
Dmitriy Simushev
00d668a74a Recompile Users JavaScript Application 2013-04-26 13:15:57 +00:00
Dmitriy Simushev
67216c0a83 Fix bug with PluginManager in installation script 2013-04-26 12:47:44 +00:00
Dmitriy Simushev
081c4a88a2 Do not grant all privileges to operators by default 2013-04-26 10:47:32 +00:00
Dmitriy Simushev
2d08fda940 Fix notice about undef $errors in operator/operators.php 2013-04-26 09:57:26 +00:00
Dmitriy Simushev
a23d9fa216 Move update_operator_permissions function to libs/operator.php 2013-04-26 09:39:39 +00:00
Dmitriy Simushev
a31cdfce24 Remove permission related global vars 2013-04-26 09:19:52 +00:00
Dmitriy Simushev
935ad85fd5 Create delete_operator function 2013-04-25 12:39:33 +00:00
Dmitriy Simushev
6954c598a3 Remove default value for id in JS Mibew.Models.Message 2013-04-25 10:01:40 +00:00
Dmitriy Simushev
3c20e8cf5c Update defaults values in JS Mibew.Models.Message 2013-04-24 14:47:49 +00:00
Dmitriy Simushev
5483483031 Update docs for Thread class 2013-04-24 14:00:24 +00:00
Dmitriy Simushev
688591b616 Create 'operatorCheckLoginFail' event, update docs 2013-04-16 11:40:38 +00:00
Dmitriy Simushev
df38a1860f Fix notice about undefined index 'visitorid' in libs/chat.php 2013-04-15 11:59:21 +00:00
Dmitriy Simushev
48d0159a92 Fix notice about undefined index 'visitorid' in client.php 2013-04-15 11:53:45 +00:00
Dmitriy Simushev
c7182e840d Update select_with_pagintation function logic
It always create $page['pagination.items'] as array
2013-04-11 12:46:18 +00:00
Dmitriy Simushev
8ceb695d43 Fix bug with filtration at threads history page 2013-04-11 12:41:57 +00:00
Dmitriy Simushev
d14a778831 Fix bug with history for search in messages 2013-04-11 12:33:49 +00:00
Dmitriy Simushev
545bb19896 Update docs for Thread class 2013-04-11 10:33:05 +00:00
Dmitriy Simushev
5798c2399d Add ability for client-side plugins to use own locale strings 2013-04-11 10:04:19 +00:00
Dmitriy Simushev
438824fa36 Fix bug with flatten global $page array 2013-04-10 15:09:57 +00:00
Dmitriy Simushev
441316b9f5 Add 'threadChanged' event 2013-04-10 13:35:03 +00:00
Dmitriy Simushev
58fd82ca36 Add the ability to add locale strings in plugins 2013-04-10 11:42:42 +00:00
Dmitriy Simushev
803f2ba075 Clean up load_messages function 2013-04-10 10:29:44 +00:00
Dmitriy Simushev
db1b51ae8a Add an ability to run cron job 2013-04-09 15:45:57 +00:00
Dmitriy Simushev
2f89219756 Update Marionette.js to v1.0.2 2013-04-08 15:15:15 +00:00
Dmitriy Simushev
e320d0e84f Stop indexing plugins in git repo 2013-04-08 13:43:41 +00:00
Dmitriy Simushev
9e9dbf8e2a Create default config files and stop indexing actual configs 2013-04-08 13:41:55 +00:00
Dmitriy Simushev
cf412e049f Update Backbone.js to v1.0.0 2013-04-08 12:51:32 +00:00
Dmitriy Simushev
d7c3e297ed Add hidden file to plugins directory to keep it in git 2013-04-08 12:12:58 +00:00
Dmitriy Simushev
8869a560ed Fix bug with client side plugins initialization
Fix prechat survey and leave message page initialization for client
2013-04-08 11:53:37 +00:00
Dmitriy Simushev
71c327f14c Fix bug with client side plugins initialization 2013-04-08 09:59:52 +00:00
Dmitriy Simushev
0f0743bd52 Update JavaScript files in default dialog theme.
Use 'jQuery' instead of '$' in arguments of immediatly
called function.
2013-03-13 15:38:28 +00:00
Dmitriy Simushev
0b5c5d5aba Add ajax loader for Survey and LeaveMessage chat modules 2013-03-13 15:38:28 +00:00
Dmitriy Simushev
a3c6141ab7 Update docs for Mibew.Views.LeaveMessageFrom.submitError 2013-03-13 15:38:28 +00:00
Dmitriy Simushev
3804d26cab Recompile templates for Users JavaScript Application 2013-03-13 15:38:28 +00:00
Dmitriy Simushev
88fffc078b Build select group box at client side 2013-03-13 15:38:28 +00:00
Dmitriy Simushev
f1803662a8 Create some usefull groups functions
Create group_is_online and get_group_description functions.
2013-03-13 15:38:28 +00:00
Dmitriy Simushev
3c080e4725 Fix bug with header for compiled templates in build.xml 2013-03-13 15:38:28 +00:00
Dmitriy Simushev
23ac4ef88a Fix permissions for build scripts 2013-03-13 15:38:27 +00:00
Dmitriy Simushev
4d9c33ed1c Rename ant 'compile_js' task to 'core_js' 2013-03-13 15:38:27 +00:00
Dmitriy Simushev
ff92bca633 Move build scripts to tools dir 2013-03-13 15:38:27 +00:00
Dmitriy Simushev
1cf83dcd34 Move 'compiled_templates_header.txt' to tools dir 2013-03-13 15:38:27 +00:00
Dmitriy Simushev
7091d7b326 Remove old JavaScript compilation script 2013-03-13 15:38:27 +00:00
Dmitriy Simushev
a32cf9128b Update structure of Chat Handlebars templates.
Recompile templates.
2013-03-13 15:38:27 +00:00
Dmitriy Simushev
97ca21d295 Update build system.
Add ability to use complex directory structure of Handlebars
templates in dialog styles.
2013-03-13 15:38:27 +00:00
Dmitriy Simushev
4b7614caec Completely remove prototype.js from Mibew 2013-03-13 15:38:27 +00:00
Dmitriy Simushev
6c1852e094 Update JavaScript code at install pages 2013-03-13 15:38:27 +00:00
Dmitriy Simushev
4f47218a13 Use playSound JS function instead of sound model 2013-03-13 15:38:27 +00:00
Dmitriy Simushev
a4d12d7b65 Add 'msgjs:' and 'pagejs:' prefixies to template engine 2013-03-13 15:38:27 +00:00
Dmitriy Simushev
33f30bd1c6 Add refresh updater after Chat Module started 2013-03-13 15:38:27 +00:00
Dmitriy Simushev
e7f8779ba8 Fix bug with auto start chat chat window resizer 2013-03-13 15:38:26 +00:00
Dmitriy Simushev
2a3a9dec9d Replace 'tplimage' css class by 'tpl-image' 2013-03-13 15:38:26 +00:00
Dmitriy Simushev
a570ed75d0 Update Chat JavaScript Application
Make prechat survey and leave message parts of the Chat
JavaScript Application
2013-03-13 15:38:26 +00:00
Dmitriy Simushev
9436b486f9 Fix bug in groups saving 2013-03-13 15:38:26 +00:00
Dmitriy Simushev
f72a0187be Build system not strip comments from JS templates anymore 2013-03-13 15:38:26 +00:00
Dmitriy Simushev
ba7eb96e8a Update build system in templates compilation.
Use closure compiler instead of handlebars built in minifier and
recompile all templates.
2013-03-13 15:38:26 +00:00
Dmitriy Simushev
709623dfc5 Fix bug with errorCode in Mibew API execution context 2013-03-13 15:38:26 +00:00
Dmitriy Simushev
8fc9b85bfa Do not support old browsers at all 2013-03-13 15:38:26 +00:00
Dmitriy Simushev
d2805afc9f Remove '.bgbody' css class 2013-03-13 15:38:26 +00:00
Dmitriy Simushev
faac427cc7 Remove layout initialization options in Chat JS app 2013-03-13 15:38:26 +00:00
Dmitriy Simushev
372bae4203 Build Chat JavaScript application options mostly not in template 2013-03-13 15:38:26 +00:00
Dmitriy Simushev
9cde3262d6 Use 'chat.user.name' var instead of 'ct.user.name' in templates 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
fead1b65a1 Use 'chat.thread.token' var instead of 'ct.token' in templates 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
f77021b82b Use 'chat.thread.id' var instead of 'ct.chatThreadId' in templates 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
2c9e65b518 Use 'company.*' vars instead of 'ct.company.*' in tempates 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
0cfd1df846 Flatten $page array before expand templates 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
54d5cbdce8 Create array_flatten_recursive function 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
71a0330a0b Update setup_logo function to return data 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
691ce8986c Update Handlebars.js to v1.0.0-rc.3 and recompile templates 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
d2b3fe7746 Add ability to change handlebars path in build.xml 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
1a79be3970 Update chat page JavaScript configs structure 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
f28e65f0cf Update setup_chatview* functions to return data 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
037135cf71 Fix notice in setup_groups_select function 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
f904f05dc9 Update setup_leavemessage function to return data 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
b8b73e82fe Update setup_survey function to return data 2013-03-13 15:38:25 +00:00
Dmitriy Simushev
23812038d9 Add finalizer to chat module in Chat JavaScript application 2013-03-13 15:38:24 +00:00
Dmitriy Simushev
5d0ac36fa4 Update close control view in Chat JavaScript application
Rename close method to closeThread to not override
Marionette.js View.close method.
2013-03-13 15:38:24 +00:00
Dmitriy Simushev
e4844832f1 Create chat module in Chat JavaScript application 2013-03-13 15:38:24 +00:00
Dmitriy Simushev
8f1db81e83 Update resize.js to work with layout system 2013-03-13 15:38:24 +00:00
Dmitriy Simushev
dc25058a05 Create chat layout in Chat JavaScript application 2013-03-13 15:38:24 +00:00
Dmitriy Simushev
f3ea7d790b Update build.xml
Correctly build JavaScript applications with layouts and regions
2013-03-13 15:38:24 +00:00
Dmitriy Simushev
2f5998843e Move creating instance of Chat JS app to init.js 2013-03-13 15:38:24 +00:00
Dmitriy Simushev
eec1d1a352 Add checkEmail function to Mibew.Utils 2013-03-13 15:38:24 +00:00
Dmitriy Simushev
dee2f2ada7 Add new features to JavaScript Server class
Add ability to remove periodically called functions and to
unregister api functions(that can be called by the server)
2013-03-13 15:38:24 +00:00
Dmitriy Simushev
48cc52cf72 Fix docs for UsersProcessor class 2013-03-13 15:38:24 +00:00
Dmitriy Simushev
aaf3bafb02 Add restartAfter method to JavaScript Server object 2013-03-13 15:38:24 +00:00
Dmitriy Simushev
d24daf52eb Completely rewrite Invite JavaScript application 2013-03-13 15:38:24 +00:00
Dmitriy Simushev
d357e505c9 Update Marionette.js to v1.0.0-rc6 2013-03-13 15:38:23 +00:00
Dmitriy Simushev
d065656ff5 Overcome third-party cookies limitation in safari 5 2013-03-13 15:38:23 +00:00
Dmitriy Simushev
7d0a71da64 Change timers update strategy at operator/users.php 2013-03-13 15:38:23 +00:00
Dmitriy Simushev
3fc81ec53e Rename 'silver' dialog style to 'default' one 2013-03-13 15:38:23 +00:00
Dmitriy Simushev
758c727c45 Create 'usersUpdateVisitorsLoad' and 'usersUpdateVisitorsAlter' events 2013-03-13 15:38:23 +00:00
Dmitriy Simushev
a6006211f2 Update build.xml, make some folders not obligatory for JS apps
Folders 'models', 'model_views', 'collections', 'collection_views'
not obligatory for JavaScript applications any more.
2013-03-13 15:38:23 +00:00
Dmitriy Simushev
d2018e1863 Add network problems detection mechanism to operator/users.php 2013-03-13 15:38:23 +00:00
Dmitriy Simushev
52e5075989 Fix bugs with wrong requests sequence in server.js 2013-03-13 15:38:23 +00:00
Dmitriy Simushev
67e901d3d0 Call updateMessages function not from server but from chat window 2013-03-13 15:38:23 +00:00
Dmitriy Simushev
0054423407 There is no KIND_AVATAR message kind any more 2013-03-13 15:38:23 +00:00
Dmitriy Simushev
bf564e55ef Update styles preview system to work with JavaScript applications 2013-03-13 15:38:23 +00:00
Dmitriy Simushev
9a86a61c99 Add license info to compiled handlebars templates 2013-03-13 15:38:23 +00:00
Dmitriy Simushev
fdd7ff70b1 Bring back license info for built JavaScript applications 2013-03-13 15:38:22 +00:00
Dmitriy Simushev
be0e643c57 Update access permissions
Add '-Indexes' option to .htaccess in root folder and remove
.htaccess from plugins folder
2013-03-13 15:38:22 +00:00
Dmitriy Simushev
d19f6814da Update jQuery to v1.9.1 2013-03-13 15:38:22 +00:00
Dmitriy Simushev
f2bd65cae3 Add forgot popup notification to Users JavaScript application 2013-03-13 15:38:22 +00:00
Dmitriy Simushev
3baf24269f Add ablity to extend operator/users.php page with plugins 2013-03-13 15:38:22 +00:00
Dmitriy Simushev
185be59862 Use various page name for agent and user chat 2013-03-13 15:38:22 +00:00
Dmitriy Simushev
c2f3993fc1 Use 'pageAdd*' events instead of special plugins methods 2013-03-13 15:38:22 +00:00
Dmitriy Simushev
b96c9d0a2c Use md5 hashes as request buffer keys 2013-03-13 15:38:22 +00:00
Dmitriy Simushev
d4e51d3dfd Remove some duplicated code in libs/chat.php 2013-03-13 15:38:22 +00:00
Dmitriy Simushev
e731d9869e Change Exception message in UsersProcessor::checkOperator method 2013-03-13 15:38:22 +00:00
Dmitriy Simushev
606de23f8d Create checkOperator method in ThreadProcessor class 2013-03-13 15:38:22 +00:00
Dmitriy Simushev
219aa4c9b1 Update EventDispatcher class
There is no need to register events any more.
2013-03-13 15:38:14 +00:00
Dmitriy Simushev
62728e608d Remove LAB.js from tird-party libraries 2013-03-13 15:32:48 +00:00
Dmitriy Simushev
503c17352c Create Thread Log JavaScript application 2013-03-13 15:32:48 +00:00
Dmitriy Simushev
b4f99c1c18 Change JavaScript files structure
Move message model and view from chat application
to default application. Also move message template and
'allowTags' Handlebars.js helper to default JavaScript application.
2013-03-13 15:32:48 +00:00
Dmitriy Simushev
526d5ad4ae Move message kinds from message view to message model 2013-03-13 15:32:48 +00:00
Dmitriy Simushev
37de991028 Move remove invitations and visitors functionality to corresponding libs 2013-03-13 15:32:48 +00:00
Dmitriy Simushev
0cdd55cdf8 Create prefix for session vars 2013-03-13 15:32:48 +00:00
Dmitriy Simushev
74ebf724cc Update Underscore.js to v1.4.4 2013-03-13 15:32:48 +00:00
Dmitriy Simushev
30b056108f Fix bug at /operator/blocked.php page 2013-03-13 15:32:48 +00:00
Dmitriy Simushev
630bf80f07 Update Marionette.js to v1.0.0-5 2013-03-13 15:32:48 +00:00
Dmitriy Simushev
6b9f2bd789 Completely rewrite User's JavaScript application 2013-03-13 15:32:48 +00:00
Dmitriy Simushev
d2531a526d Move sound template from styles to default JS application 2013-03-13 15:32:48 +00:00
Dmitriy Simushev
a0161a2c72 Fix bug with empty threads 2013-03-13 15:32:48 +00:00
Dmitriy Simushev
7e70d5b14b Add thread status to Mibew.Models.Thread 2013-03-13 15:32:47 +00:00
Dmitriy Simushev
dd79c9aa21 Create base composite view 2013-03-13 15:32:47 +00:00
Dmitriy Simushev
2a656a58d5 Fix bug with redicection user to a group 2013-03-13 15:32:47 +00:00
Dmitriy Simushev
1ecda26d3d Update Marionette.js to v1.0.0-rc4 2013-03-13 15:32:47 +00:00
Dmitriy Simushev
88244a7b09 Update Handlebars.js to v1.0.rc.2 2013-03-13 15:32:47 +00:00
Dmitriy Simushev
0e260d1aaf Fix bug in handlebars 'formatTime' helper 2013-03-13 15:32:47 +00:00
Dmitriy Simushev
d9d01ed7e0 Forbid access to .tpl .handlebars .ini files in dialogs styles 2013-03-13 15:32:47 +00:00
Dmitriy Simushev
edef539707 Remove unnecessary element from $page array in set_chatview_* functions 2013-03-13 15:32:47 +00:00
Dmitriy Simushev
ad4f4e8d8e Create config files for dialogs and core styles 2013-03-13 15:32:47 +00:00
Dmitriy Simushev
abac28fa46 Change history and refresh controls title 2013-03-13 15:32:47 +00:00
Dmitriy Simushev
1f3e727c17 Create model for Thread 2013-03-13 15:32:47 +00:00
Dmitriy Simushev
e1368a3f87 Change parent model for Mibew.Models.User 2013-03-13 15:32:47 +00:00
Dmitriy Simushev
16162499cf Update Marionette.js to v1.0.0-rc3 2013-03-13 15:32:47 +00:00
Dmitriy Simushev
9b54eea039 Update jQuery to v1.9.0 2013-03-13 15:32:46 +00:00
Dmitriy Simushev
d3be5cc087 Update Underscore.js to v1.4.3 2013-03-13 15:32:46 +00:00
Dmitriy Simushev
71b1b70528 Fix bug with push controls to collection 2013-03-13 15:32:46 +00:00
Dmitriy Simushev
62aa4c4639 Update Backbone.js to v0.9.10 2013-03-13 15:32:46 +00:00
Dmitriy Simushev
0f78be2194 Method getModelType not obligatory for collections models any more 2013-03-13 15:32:46 +00:00
Dmitriy Simushev
e4f172e715 Update operator status in cache in notify_operator_alive function 2013-03-13 15:32:46 +00:00
Dmitriy Simushev
fca7c3c7cd Add some comments to libs/operator.php 2013-03-13 15:32:46 +00:00
Dmitriy Simushev
0808bb5ba6 Split user model to default and chat user 2013-03-13 15:32:46 +00:00
Dmitriy Simushev
a40ec07b59 Update ant usage target 2013-03-13 15:32:46 +00:00
Dmitriy Simushev
1524f0899a Move control.handlebars template to default JavaScript application 2013-03-13 15:32:46 +00:00
Dmitriy Simushev
4a23ae7dc4 Update JavaScript application files structure
Move models views and collection views to various directories
2013-03-13 15:32:46 +00:00
Dmitriy Simushev
6172334090 Fix bug in build file and rebuild JavaScript Applications 2013-03-13 15:32:46 +00:00
Dmitriy Simushev
7f35a7488b Update JavaScript application files structure
Move Control related files from chat app to default app
2013-03-13 15:32:45 +00:00
Dmitriy Simushev
9e01c73cae Create separate requests buffers for user and agent 2013-03-13 15:32:45 +00:00
Dmitriy Simushev
46ce6f2a91 Update MibewAPICoreInteraction
Move it to separate file and rename it to MibewAPIChatInteraction
2013-03-13 15:32:45 +00:00
Dmitriy Simushev
de68b862da Update JavaScript documentation 2013-03-13 15:32:45 +00:00
Dmitriy Simushev
a300b99171 Create base class for Client Side Request Processors 2013-03-13 15:32:45 +00:00
Dmitriy Simushev
0933263cc9 Fix bug with wrong exception class 2013-03-13 15:32:45 +00:00
Dmitriy Simushev
a650a35dd6 Move processorCall method to RequestProcessor class 2013-03-13 15:32:45 +00:00
Dmitriy Simushev
95bc033817 Move saveCallback and loadCallback to RequestProcessor class 2013-03-13 15:32:45 +00:00
Dmitriy Simushev
4f199b2f26 Rename MibewAPIWindowInteraction to MibewAPIChatInteraction 2013-03-13 15:32:45 +00:00
Dmitriy Simushev
2695ef98b6 Move all controls to one cell at user waiting page 2013-03-13 15:32:45 +00:00
Dmitriy Simushev
72e58f0959 Fix JavaScript Unit tests 2013-03-13 15:32:45 +00:00
Dmitriy Simushev
47ccc46359 Completely update messenger build system 2013-03-13 15:32:45 +00:00
Dmitriy Simushev
053837d069 Completely rewrite Chat's JavaScript files 2013-03-13 15:32:44 +00:00
Dmitriy Simushev
1565458c26 Move all JavaScript files from /js/$jsver to /js/compiled 2013-03-13 15:32:44 +00:00
Dmitriy Simushev
f085fbc767 Move request.js and invite.js to /js/compiled 2013-03-13 15:32:44 +00:00
Dmitriy Simushev
35162b8906 Move handlebars.js to /js/libs 2013-03-13 15:32:44 +00:00
Dmitriy Simushev
da50f6f6d9 Move json2.js to /js/libs 2013-03-13 15:32:44 +00:00
Dmitriy Simushev
9587ff9b5b Move LAB.js to /js/libs 2013-03-13 15:32:44 +00:00
Dmitriy Simushev
64d7650e54 Update jQuery to 1.8.3 and move it to /js/libs 2013-03-13 15:32:44 +00:00
Dmitriy Simushev
e45a3e489f Use camel case for plugins' classes names 2013-03-13 15:32:44 +00:00
Dmitriy Simushev
9037f69c09 Fix bug with user wait time 2013-03-13 15:32:44 +00:00
Dmitriy Simushev
092e9c2dcf Fix bug with wrong total thread time 2013-03-13 15:32:44 +00:00
Dmitriy Simushev
2d7676fdf6 Fix the ability to call functions at Chat Window side 2013-03-13 15:32:44 +00:00
Dmitriy Simushev
7c661b11c6 Fix undefined groupname in /operator/update.php 2013-03-13 15:32:44 +00:00
Dmitriy Simushev
498a34ae19 Update ThreadProcessor documentation 2013-03-13 15:32:43 +00:00
Dmitriy Simushev
a310180709 Fix reset predefined answers selectbox index 2013-03-13 15:32:43 +00:00
Dmitriy Simushev
14eed1072d Use JavaScript templates for messages 2013-03-13 15:32:43 +00:00
Dmitriy Simushev
3f39164db1 Fix bug with message about user rename 2013-03-13 15:32:43 +00:00
Dmitriy Simushev
4102ce00f3 Fix bug in Handlebars apply helper. Update docs 2013-03-13 15:32:43 +00:00
Dmitriy Simushev
c1b633843f Fix bug with NULL for message's sender name 2013-03-13 15:32:43 +00:00
Dmitriy Simushev
38668789b9 Change keys of array return by Thread::getMessages 2013-03-13 15:32:43 +00:00
Dmitriy Simushev
f5a970e50f Use LAB.js to load JavaScripts to the chat window 2013-03-13 15:32:43 +00:00
Dmitriy Simushev
4cfac7bbef Split chat.js
JavaScript's chat.js library split into several logical parts:
chatcontroller.js, chatview.js and chatinit.js
2013-03-13 15:32:43 +00:00
Dmitriy Simushev
edb40a06d3 Add LAB.js library 2013-03-13 15:32:43 +00:00
Dmitriy Simushev
727625dfc8 Refactor and format JavaScript chat code 2013-03-13 15:32:43 +00:00
Dmitriy Simushev
72d0c3b0a4 Update webim/js/source/build.xml file
Add pluginmanager.js, handlebars.js, handlebars_hrlpers.js to
the webim/js/source/build.xml configuration file
2013-03-13 15:32:43 +00:00
Dmitriy Simushev
d53e1d8020 Move JavaScript's ChatServer class to separate file 2013-03-13 15:32:43 +00:00
Dmitriy Simushev
83636a02ef Add several Handlebars helpers
Add 'apply', 'formatTime' and 'nl2br' Handlebars helpers.
Also add QUnit tests for 'apply' helper.
2013-03-13 15:32:42 +00:00
Dmitriy Simushev
36c8e6c042 Add Handlebars JavaScript template engine 2013-03-13 15:32:42 +00:00
Dmitriy Simushev
56a50c9df4 Add JavaScript's Thread class usage to chat.js 2013-03-13 15:32:42 +00:00
Dmitriy Simushev
ec5ba068bb Create JavaScript's Thread class 2013-03-13 15:32:42 +00:00
Dmitriy Simushev
5ff3a7656d Extend plugin system
Plugins can add custom CSS and JavaScript files to chat window and
implement JavaScript plugins
2013-03-13 15:32:42 +00:00
Dmitriy Simushev
c61789c2d7 Create JavaScript's PluginManager class 2013-03-13 15:32:42 +00:00
Dmitriy Simushev
53e9400dde Add PluginManager::getAllPlugins() method 2013-03-13 15:32:42 +00:00
Dmitriy Simushev
30cb668a73 Implement new chat system 2013-03-13 15:32:42 +00:00
Dmitriy Simushev
f1224a98ee Fix ability to change avatar 2013-03-13 15:32:42 +00:00
Dmitriy Simushev
1528c610d7 Moved themeMessage method from ThreadProcessor to Thread 2013-03-13 15:32:42 +00:00
Dmitriy Simushev
c26fc8bb26 Fix early return from RequestProcessor::processRequest 2013-03-13 15:32:42 +00:00
Dmitriy Simushev
bebe603a9b Add Thread object creation to /operator/history.php
Replace direct work with thread table's fields by Thread object
2013-03-13 15:32:42 +00:00
Dmitriy Simushev
0b2a379dd8 Add Thread object creation to /operator/userhistory.php
Replace direct work with thread table's fields by Thread object
2013-03-13 15:32:42 +00:00
Dmitriy Simushev
898ecc3055 Add Thread object creation to /operator/update.php
Replace direct work with thread table's fields by Thread object
2013-03-13 15:32:42 +00:00
Dmitriy Simushev
f553f42460 Add Thread object creation to /operator/threadprocessor.php
Replace direct work with thread table's fields by Thread object
2013-03-13 15:32:41 +00:00
Dmitriy Simushev
69477cea8d Add ability to create Thread object from DB info 2013-03-13 15:32:41 +00:00
Dmitriy Simushev
8f87a017a1 Fix tests for Thread class
Fix tests that affect auto generation of the last token field
2013-03-13 15:32:41 +00:00
Dmitriy Simushev
f81dad7eae Replace thread related functions by Thread's methods 2013-03-13 15:32:41 +00:00
Dmitriy Simushev
50283a0b21 Move kindToString() method from ThreadProcessor to Thread 2013-03-13 15:32:41 +00:00
Dmitriy Simushev
2ba492d94f Create Thread::connectionLimitReached method 2013-03-13 15:32:41 +00:00
Dmitriy Simushev
9d19afcdf2 Add auto token generate during Thread creation 2013-03-13 15:32:41 +00:00
Dmitriy Simushev
37b8fa7243 Create ThreadProcessor class 2013-03-13 15:32:41 +00:00
Dmitriy Simushev
7b6a433ae6 Create tests for RequestProcessor class 2013-03-13 15:32:41 +00:00
Dmitriy Simushev
24ecf02e7b Remove RequestProcessor::NO_RESULT_FUNCTION constant
RequestProcessor::NO_RESULT_FUNCTION not use any more. Rewrite code
to throw use Mibew API checks for existance of the result function
2013-03-13 15:32:41 +00:00
Dmitriy Simushev
1d4cac01d1 Fix bug with callback's arguments in RequestProcessor class 2013-03-13 15:32:41 +00:00
Dmitriy Simushev
7e49da1999 Fix bug in documentation for RequestProcessor class 2013-03-13 15:32:41 +00:00
Dmitriy Simushev
1613a1052e Add token check to the Thread::load method 2013-03-13 15:32:41 +00:00
Dmitriy Simushev
5c7d525871 Update Plugin class documentation 2013-03-13 15:32:41 +00:00
Dmitriy Simushev
a9380cf307 Modify tests directory structure 2013-03-13 15:32:40 +00:00
Dmitriy Simushev
159a8aa0df Document calback array in the RequestProcessor class 2013-03-13 15:32:40 +00:00
Dmitriy Simushev
69e08359c2 Fix bug in requests handling in RequestProcessor 2013-03-13 15:32:40 +00:00
Dmitriy Simushev
4aa44861b4 Add parameters to the Window-to-Core interaction
Add 'threadId' and 'token' obligatory parameters to the
Window-to-Core interaction type
2013-03-13 15:32:40 +00:00
Dmitriy Simushev
6247d20f95 Object's methods callbacks replaced by functions 2013-03-13 15:32:40 +00:00
Dmitriy Simushev
de2f60bfdc Add some warnings to RequestProcessor class
Request/response methods not abstract any more. To prevent direct
call(without overloading) add error with E_USER_WARNING level
into this methods.
2013-03-13 15:32:40 +00:00
Dmitriy Simushev
551be06d9e Fix bug in users tracking 2013-03-13 15:32:40 +00:00
Dmitriy Simushev
f720da79d0 Fix bug in chat button image's generation script 2013-03-13 15:32:40 +00:00
Dmitriy Simushev
03ffd84e76 Create Thread class and tests for it 2013-03-13 15:32:40 +00:00
Dmitriy Simushev
1a963cff00 Add additional config info to unit tests 2013-03-13 15:32:40 +00:00
Dmitriy Simushev
ce82496013 Create application initialization script 2013-03-13 15:32:40 +00:00
Dmitriy Simushev
89c61a5571 Fix bugs in the installation script 2013-03-13 15:32:40 +00:00
Dmitriy Simushev
29d7f891da Split libs/common.php into separate files 2013-03-13 15:32:40 +00:00
Dmitriy Simushev
17b4327dfb Added warning message in database configuration file in tests. 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
b3d7a7a124 Fixed ability to use persistent database connection with an object of the Database class 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
92019f99a4 Created separate mysql config file for tests 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
0861fd73d2 Removed global variables from the Database class constructor and updated tests for the Database class 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
4db2ce5175 Fixed bug with wrong placeholders count in the 'thread_by_id' function 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
031dbdc2b2 Fixed bug in a SQL query in the libs/pagination.php file 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
31d689aa0d Created a draft of the migration script 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
57f1b175b1 All columns in the databse with 'datetime' type were changed to integer type 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
e5ed85ed3f Added error handling to the RequestProcessor class 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
fd108b1334 Added obligatory argument 'errorCode' to the mibew api 'result' function 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
077eac1c53 Renamed the JavaScript's MibewAPIWindowToCoreInteraction class to the MibewAPICoreInteraction 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
3ec23b5ae5 Added tests for the JavaScript's MibewAPIInteraction class 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
8a88f48d89 Fixed bugs in the JavaScript's MibewAPIInteraction class 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
2752ce5c25 Updated tests for PHP's MibewAPI class to use MibewAPITestInteraction class instance 2013-03-13 15:32:39 +00:00
Dmitriy Simushev
6c6a26225f Added tests for the PHP's MibewAPIInteraction class 2013-03-13 15:32:38 +00:00
Dmitriy Simushev
b0225eadeb Moved MibewAPI related tests 2013-03-13 15:32:38 +00:00
Dmitriy Simushev
344299805c Renamed MibewAPIInteraction::getDefaultObligatoryArguments to MibewAPIinteraction::getObligatoryArgumentsDefaults 2013-03-13 15:32:38 +00:00
Dmitriy Simushev
41d40e3c04 Split mibew_api.php into several files 2013-03-13 15:32:38 +00:00
Dmitriy Simushev
2f18eb65b1 Added ability to specify different obligatory arguments list for different
functions to the PHP and JavaScript MibewAPI library
2013-03-13 15:32:38 +00:00
Dmitriy Simushev
79c4da8b2c Added abstract method RequestProcessor::saveCallback and its implementation CmsconnectorRequestProcessor::saveCallback 2013-03-13 15:32:38 +00:00
Dmitriy Simushev
b2a0a6cebd Created RequestProcessor class 2013-03-13 15:32:30 +00:00
Dmitriy Simushev
e708282a8f Added default value to $existance argument in the MibewAPI::getResultFunction method 2013-03-13 08:21:21 +00:00
Dmitriy Simushev
58d015c247 Added JavaScript version of the Mibew API and tests for it 2013-03-13 08:20:38 +00:00
Dmitriy Simushev
fcba6ec6f4 PHPUnit tests moved to tests/server_side/ 2013-03-13 08:19:54 +00:00
Dmitriy Simushev
460d2d96c2 Added some documentation to the MibewAPI class 2013-03-13 08:19:20 +00:00
Dmitriy Simushev
31b6d96fc9 Added to the Mibew API the ability to use empty string as a signature 2013-03-13 08:18:39 +00:00
Dmitriy Simushev
555898e446 Implemented Mibew API 2013-03-13 08:17:34 +00:00
Dmitriy Simushev
5bd6f22cab Modified PluginManager to store plugins objects and use objects with regular methods instead static one 2013-03-13 08:13:50 +00:00
Dmitriy Simushev
69c54ba37c Fixed display bug at the history page 2013-03-13 08:13:33 +00:00
Dmitriy Simushev
ba5259b36c Fixed regexp bug in the Database class 2013-03-13 08:13:05 +00:00
Dmitriy Simushev
91c5ca45ae Modified plugin name for autoload 2013-03-13 08:12:38 +00:00
Dmitriy Simushev
c9ffa8291d Added some phpdoc documentation to EventDispatcher class 2013-03-13 08:12:11 +00:00
Dmitriy Simushev
f4e87f5303 Pass arguments to EventDispatcher::triggerEvent by reference 2013-03-13 08:11:27 +00:00
Dmitriy Simushev
17369b2f14 Replaced $initalize Plugin class member by static one 2013-03-13 08:10:44 +00:00
Dmitriy Simushev
36547eeeca Fixed cloasing threads by timeout 2013-03-13 08:10:06 +00:00
Dmitriy Simushev
f54acb3ae5 Fixed bug with placeholders and sql functions 2013-03-13 08:08:54 +00:00
Dmitriy Simushev
63ab503077 Fixed update visitors list bug 2013-03-13 08:05:21 +00:00
Dmitriy Simushev
69695e5c3f Replaced plugin interface to plugin abstract class 2013-03-13 08:03:08 +00:00
Dmitriy Simushev
3f95a395c8 Integrate plugin system with mibew 2013-03-13 08:02:33 +00:00
Dmitriy Simushev
66a0d6ddca Added classes that implements plugin system and tests for them 2013-03-13 07:58:12 +00:00
Dmitriy Simushev
3e121c675f Removed old @todo 2013-03-13 07:55:36 +00:00
Dmitriy Simushev
be696ee3da Replaced settings functions with Settings class 2013-03-13 07:52:48 +00:00
Dmitriy Simushev
3929f26791 Created class for work with settings and test case for it 2013-03-13 07:49:50 +00:00
Dmitriy Simushev
ac64783a29 Moved database.php to libs/classes directory and related test case to tests/webim/libs/classes 2013-03-13 07:46:56 +00:00
Dmitriy Simushev
3e4163cbfe Replace database functions with Database class methods 2013-03-13 07:36:01 +00:00
Dmitriy Simushev
12883cfbe2 Created class for work with database and test class for it 2013-03-13 07:26:01 +00:00
Dmitriy Simushev
466cc31f45 Update headers 2013-03-12 21:03:50 +00:00
Dmitriy Simushev
ae149896e7 Merge branch 'v1.6.x' into OSSG/master
Conflicts:
	src/messenger/webim/install/dbperform.php
	src/messenger/webim/js/164/common.js
	src/messenger/webim/libs/common.php
	src/messenger/webim/locales/en/properties
	src/messenger/webim/locales/ru/properties
	src/messenger/webim/operator/canned.php
	src/messenger/webim/operator/operator.php
	src/messenger/webim/operator/operators.php
	src/messenger/webim/operator/performance.php
	src/messenger/webim/operator/settings.php
	src/messenger/webim/operator/translate.php
	src/messenger/webim/operator/update.php
	src/messenger/webim/operator/users.php
	src/messenger/webim/view/agents.php
	src/messenger/webim/view/performance.php
2013-03-11 11:01:35 +00:00
Evgeny Gryaznov
214e52e5c2 format the code; remove comments in the client code; move csrfchecktoken() right after check_login()
Conflicts:

	src/messenger/webim/libs/common.php
	src/messenger/webim/operator/canned.php
	src/messenger/webim/operator/cannededit.php
	src/messenger/webim/operator/operators.php
	src/messenger/webim/operator/settings.php
	src/messenger/webim/operator/translate.php
2012-07-03 15:21:59 +00:00
YuFei Zhu
3a337c3137 add csrf token to translate view 2012-07-03 15:12:36 +00:00
YuFei Zhu
da790fc8d2 add csrf token to performance and features views 2012-07-03 15:12:33 +00:00
YuFei Zhu
69463ded6b update token methods to ensure csrf token is always get setted 2012-07-03 15:12:31 +00:00
YuFei Zhu
c948956779 update comment for avatar csrf, and add csrf token check to permission page 2012-07-03 15:12:27 +00:00
YuFei Zhu
7035c3feba add csrf token check to avatar upload 2012-07-03 15:12:24 +00:00
YuFei Zhu
cb77595747 added auth token for delete offline messages check for csrf 2012-07-03 15:12:12 +00:00
YuFei Zhu
423c1335f4 enable act=del url check for auth tokens for csrf attacks
Conflicts:

	src/messenger/webim/view/agents.php
2012-07-03 15:12:04 +00:00
YuFei Zhu
5e75270cd0 having token checks on POST forms
Conflicts:

	src/messenger/webim/operator/cannededit.php
2012-07-03 15:09:47 +00:00
Evgeny Gryaznov
2d793bcb94 login & reset password pages: default value for login where possible; update ru
Conflicts:

	src/messenger/webim/locales/ru/properties
2012-07-03 15:01:04 +00:00
Dmitriy Simushev
9e871ee587 Fixed bug in visitor's tracking 2012-03-17 14:39:58 +00:00
Dmitriy Simushev
1681690d27 Replaced 'operator_get_all' and 'get_operators_from_adjacent_groups' functions by 'get_operators_list' function 2012-03-15 22:07:09 +00:00
Dmitriy Simushev
00fd2b796c Added sorting at operators page 2012-03-15 21:46:22 +00:00
Dmitriy Simushev
a53ff04192 Modified groups template 2012-03-14 20:47:25 +00:00
Dmitriy Simushev
5016eceae8 Added tabs at statistics page 2012-03-13 20:28:38 +00:00
Dmitriy Simushev
0fc5beb17a Added pergroups settings 2012-03-13 17:26:18 +00:00
Dmitriy Simushev
f9d39a8257 Added ability to select group in leavemessage form. 2012-03-09 19:40:07 +00:00
Dmitriy Simushev
e07756c59f Fixed the Blue Screen in Google Chrome 17+ 2012-03-02 19:59:55 +00:00
Dmitriy Simushev
b006c39c40 Added sorting at groups page 2012-03-01 21:39:19 +00:00
Dmitriy Simushev
6a594f7f72 Added indexes to the 'chatgroupoperator' table 2012-02-26 14:05:14 +00:00
Dmitriy Simushev
354ffafa0b In the installation script added the ability to add indexes to the database without addition of columns. 2012-02-26 14:00:24 +00:00
Dmitriy Simushev
61c52eb127 Added groups isolation 2012-02-25 19:40:05 +00:00
Dmitriy Simushev
a5243fa1f3 Added default value for group weight 2012-02-25 13:43:25 +00:00
Dmitriy Simushev
0802ce8993 Added aggregating groups 2012-02-25 13:43:12 +00:00
Dmitriy Simushev
4f16162665 Forbidden editing groups from profile page, for operators without administrative permissions. 2012-02-18 19:58:46 +00:00
Dmitriy Simushev
fca74ed824 The pre-chat survey in no longer displayed for an invited visitors. 2012-02-16 19:46:23 +00:00
Dmitriy Simushev
cf374158a8 Added groups weight 2012-02-15 13:56:55 +00:00
Dmitriy Simushev
ee756d06b9 Added to blocked visitors page links to blocked visitors chat history 2012-02-14 17:37:55 +00:00
Dmitriy Simushev
35e6787a1e Added company name and company URL to the template of a user's history email 2012-02-13 20:49:46 +00:00
Dmitriy Simushev
c490ea8523 Modified threads search. Added the ability to select search type. 2012-02-13 20:49:31 +00:00
Dmitriy Simushev
82e40ddd84 Added to statistics page link to operator's dialogs 2012-02-11 17:31:13 +00:00
Dmitriy Simushev
678f54ca0c Added the ability to add 'strong' and 'span' tags in chat's system messages 2012-02-11 15:33:18 +00:00
Dmitriy Simushev
4e69fc957d Fixed empty default department description in prechat survey 2012-02-08 13:22:05 +00:00
Dmitriy Simushev
87676a5cee Cleaned up code related to departments' descriptions 2012-02-08 13:18:12 +00:00
Dmitriy Simushev
eaaaff85c2 Fixed the bug with wrong by page statistics 2012-02-08 11:54:39 +00:00
Dmitriy Simushev
5f71deeb36 Added 'visitedpageststistics' table and fixed the bug, related to remove visitors' path during chat time 2012-02-08 11:54:39 +00:00
Dmitriy Simushev
1f4582ab20 Added some string related to threads error to localization 2012-02-08 11:54:39 +00:00
Dmitriy Simushev
96c4727be2 Added email validation in prechat survey. 2012-02-08 11:54:24 +00:00
Dmitriy Simushev
7df57f5506 Added some strings at page groups.php to localization 2012-01-30 15:33:15 +00:00
Dmitriy Simushev
e17909854c Added some strings at pages operator.php and operators.php to localization 2012-01-29 19:22:17 +00:00
Dmitriy Simushev
6b18c2868a Added strings 'Away' and 'Up to date' at users page to localization 2012-01-29 12:46:53 +00:00
Dmitriy Simushev
24deb150d2 Cleaned up code related to close confirmation message 2012-01-29 11:18:45 +00:00
Dmitriy Simushev
6d87e5e1a6 Added short titles for canned messages 2012-01-29 11:18:35 +00:00
Dmitriy Simushev
4ae2ea9a65 Fixed js bug with submit buttons in restore and reset password forms 2012-01-27 18:09:47 +00:00
Dmitriy Simushev
743ebfb9de The strings, related to restoring password, were translated into russian 2012-01-26 22:51:33 +00:00
Dmitriy Simushev
be3efcfad3 Adding canned messages during system installation process 2012-01-26 21:29:26 +00:00
Dmitriy Simushev
c119159be6 Fixed erratum in ru locale 2012-01-26 16:03:32 +00:00
Dmitriy Simushev
177c3f22a7 Cleaned up code, related to canned messages 2012-01-26 16:00:30 +00:00
Dmitriy Simushev
1ca18622c6 Merge branch 'master' of github.com:OSSG/mibew into ossg_master 2012-01-24 22:06:34 +00:00
3864f97270 Fix bug in output of visitor's list 2012-01-24 16:42:15 +04:00
0b32b6a0d6 Fix bug in visitor's tracking 2012-01-24 16:41:54 +04:00
0aaed55634 Fix bug in button code generation 2012-01-24 16:41:15 +04:00
e7d9e59f4d Increase default lifetime of the old threads 2012-01-24 16:40:56 +04:00
c6e5e23057 Fix bug in old threads cleansing 2012-01-24 16:40:11 +04:00
Dmitriy Simushev
2876d9deed Open mibew.org link in the bottom of operators pages in a new window 2012-01-22 22:09:43 +00:00
Dmitriy Simushev
219b593b94 The 'Group' checkbox in system settings do not affect the ability to edit groups of operators, but affects only their actual availability to visitors. 2012-01-21 15:09:49 +00:00
Dmitriy Simushev
87064f2da4 Only administrators can change operators' logins 2012-01-18 10:24:09 +00:00
Dmitriy Simushev
169680eda7 Fixed the bug related with the need to enter passwords when you change the profile of any operator. 2012-01-18 10:11:49 +00:00
Dmitriy Simushev
450e970ed8 When enabled the groups, visitors cannot start a chat, if only operators, who don't relate to any groups, online. 2012-01-15 20:51:12 +00:00
Dmitriy Simushev
13554a8e43 Fixed confirmation dialog before closing chat for operator 2012-01-10 16:35:31 +00:00
8ebe7ce06f Merge pull request #1 from OSSG/master
synchronization of the codebase
2012-01-10 02:04:33 -08:00
Dmitriy Simushev
f2ab19036a Added department description at select department screen 2012-01-03 19:45:49 +00:00
Dmitriy Simushev
2dc674e5d6 Added confirmation before closing chat 2011-12-26 18:39:27 +00:00
Dmitriy Simushev
fbeba2a54f Added ability to disable operator's account 2011-12-19 17:55:22 +00:00
Dmitriy Simushev
7bd3e21ca8 Excluded not started after invitation chats from daily statistics 2011-12-15 19:29:04 +00:00
Dmitriy Simushev
57f742a539 Added invitations styles 2011-12-15 08:14:07 +00:00
Dmitriy Simushev
b2167895e6 Implemented cross-domain invitations 2011-12-15 08:13:40 +00:00
Dmitriy Simushev
04a096fea1 Added Cross-domain javascript requests 2011-12-11 14:37:46 +00:00
Dmitriy Simushev
777b640f8e Added closing threads by timeout 2011-11-25 21:00:22 +00:00
Dmitriy Simushev
7569720a52 Added view times in by page statistics 2011-11-24 16:25:43 +00:00
Evgeny Gryaznov
567f61d7ca update Persian (by Amir Khani) 2011-11-23 10:21:51 +00:00
Evgeny Gryaznov
108c2f7d5c update Hungarian (by Istvan Somlai) 2011-11-23 10:21:39 +00:00
Evgeny Gryaznov
1020716f6a update Simplified Chinese (by Xiaoyu) 2011-11-23 10:21:18 +00:00
Evgeny Gryaznov
81a8bb1d2b update Spanish (by Jesus Plaza) 2011-11-23 10:21:00 +00:00
Evgeny Gryaznov
ef9e3c841e update Portuguese European, pt-pt (by Carlos Silva) 2011-11-23 10:20:43 +00:00
Evgeny Gryaznov
f6844739cf update Indonesian (by Adi Nugroho), without images though 2011-11-23 10:20:20 +00:00
Evgeny Gryaznov
bcb3409cc5 update Italian (Luca Sasdelli) 2011-11-23 10:19:54 +00:00
Evgeny Gryaznov
a7950b3a4e update English (by Olimax) 2011-11-23 10:18:39 +00:00
Evgeny Gryaznov
49be184c50 update Belarusian (by Berasneu) 2011-11-23 10:12:33 +00:00
Evgeny Gryaznov
6cf1baeace update pl (by WebTower), hu, fr 2011-11-23 10:12:26 +00:00
Evgeny Gryaznov
1da924416c fix encoding in operators list 2011-11-23 10:12:18 +00:00
Dmitriy Simushev
12b0883686 Split chatsitevisitor table into chatsitevisitor and visitedpage 2011-11-22 21:57:25 +00:00
Dmitriy Simushev
856123de48 Added Average chat time and Average waiting time statistics 2011-11-21 20:25:59 +00:00
Dmitriy Simushev
863de0057c Added Page statistics 2011-11-21 20:25:49 +00:00
Dmitriy Simushev
82d4e79dc9 Add missed asterisk in /view/ban.php near form.field.ban_comment 2011-11-21 18:21:08 +00:00
Dmitriy Simushev
a923a3cfdc Replaced all mysql_free_result by db_free_result, except for the directory /install 2011-11-21 18:20:46 +00:00
Dmitriy Simushev
ef94a7eaf8 Added wrapper function for mysql_free_result 2011-11-21 18:20:38 +00:00
Dmitriy Simushev
12e7d34929 Replaced all mysql_query by perform_query, except for the directory /install 2011-11-21 18:19:58 +00:00
Dmitriy Simushev
7f31dfa2af Changed perform_query function. It now returns a reference to the query result 2011-11-21 18:19:44 +00:00
Dmitriy Simushev
65404ac1d2 Replaced all mysql_fetch_array by mysql_fetch_assoc or mysql_fetch_row, except for the directory /install 2011-11-21 18:19:04 +00:00
Dmitriy Simushev
b22f5456fc Added wrapper functions for mysql_fetch_assoc and mysql_fetch_row 2011-11-21 18:18:54 +00:00
Dmitriy Simushev
20701ad5da Replaced reciving associative arrays from database by select_multi_assoc function 2011-11-21 18:13:45 +00:00
Dmitriy Simushev
720c4472d3 Replaced all mysql_insert_id by db_insert_id 2011-11-21 18:11:59 +00:00
Dmitriy Simushev
863f6867c6 Added wrapper function for mysql_insert_id 2011-11-21 18:06:53 +00:00
Dmitriy Simushev
3e5834983f Replaced all mysql_error by db_error except for the directory /install 2011-11-21 18:06:04 +00:00
Dmitriy Simushev
51f6af7ced Added wrapper function for mysql_error 2011-11-21 18:05:57 +00:00
Dmitriy Simushev
5a3af46203 Replaced all mysql_real_escape_string by db_escape_string 2011-11-21 18:03:40 +00:00
Dmitriy Simushev
a47e66a6a6 Added wrapper function for mysql_real_escape_string 2011-11-21 17:55:03 +00:00
Dmitriy Simushev
1cd6926f4f Replaced all mysql_close by close_connection, except for the directory /install 2011-11-21 17:52:19 +00:00
Dmitry Simushev
6698601d19 Added wrapper function for mysql_close 2011-11-20 21:12:26 +00:00
Dmitry Simushev
b54cd674e6 Added the ability to use persistent connections 2011-11-20 21:11:27 +00:00
11fa45cb19 Merge branch 'index_fix' 2011-04-18 16:10:28 +04:00
b102988073 Prepare to cut off branch 2011-04-18 16:06:27 +04:00
f0b8fd06c3 Prepare to cut off branch 2011-04-18 16:05:45 +04:00
2a5b6015de Fix check of existance of tables indexes during database upgrade process 2011-04-15 18:57:55 +04:00
d6ac8f443a Create indexes for database tables during installation process 2011-04-15 18:56:57 +04:00
0bb8eeab44 Merge remote branch 'upstream/master' into mibew 2011-04-15 18:30:25 +04:00
dc203af8a0 Fix check of existance of tables indexes during database upgrade process 2011-04-15 17:51:14 +04:00
f3367271f5 Create indexes for database tables during installation process 2011-04-15 17:50:51 +04:00
Haynes
e34b0d1c0d This commit forces the User to set a password for the Administrator before doing anything else after the installation. 2011-04-15 16:47:54 +04:00
Haynes
152c15dde4 This commit forces the User to set a password for the Administrator before doing anything else after the installation. 2011-04-15 16:45:35 +04:00
Evgeny Gryaznov
b1d924c60a redirect to profile page after first login; informational banner when password is blank; do not enforce password change; rename Home -> Dashboard 2011-04-15 16:11:40 +04:00
Evgeny Gryaznov
6e239bbf0f redirect to profile page after first login; informational banner when password is blank; do not enforce password change; rename Home -> Dashboard 2011-04-15 15:52:12 +04:00
Evgeny Gryaznov
84f37eb14c invitation patch by Fedor Fetisov 2011-04-07 10:34:37 +02:00
1008 changed files with 62399 additions and 21503 deletions

50
.gitignore vendored
View File

@ -1,9 +1,55 @@
src/.idea/workspace.xml # IDE folders
.idea
src/mibew/install/package src/mibew/install/package
src/absent_* src/absent_*
src/release* src/release*
src/upload*
src/*.po
# Do not index actual configuration files
src/mibew/configs/config.yml
src/tests/server_side/mibew/libs/config.php
# Do not index avatars
src/mibew/files/avatar/*
!src/mibew/files/avatar/.keep
# Do not index cache files
src/mibew/cache/*
!src/mibew/cache/.keep
!src/mibew/cache/.htaccess
# Do not index plugins
src/mibew/plugins/*
!src/mibew/plugins/.keep
# Do not index custom locales # Do not index custom locales
src/mibew/locales/* src/mibew/locales/*
!src/mibew/locales/en/ !src/mibew/locales/en/
!src/mibew/locales/names/
# Do not index composer files
src/composer.phar
src/composer.lock
# Do not index third-party libraries
src/mibew/vendor
src/mibew/js/vendor
# Do not index node.js modules that are used for building
src/node_modules
src/package-lock.json
# Do not index compiled js files of the core
src/mibew/js/compiled/*
!src/mibew/js/compiled/.keep
# Do not index compiled files of chat styles
src/mibew/styles/chats/*/templates_compiled/client_side/*
!src/mibew/styles/chats/*/templates_compiled/client_side/.keep
src/mibew/styles/chats/*/js/compiled/*
!src/mibew/styles/chats/*/js/compiled/.keep
# Do not index compiled files of page styles
src/mibew/styles/pages/*/templates_compiled/client_side/*
!src/mibew/styles/pages/*/templates_compiled/client_side/.keep

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "src/i18n"]
path = src/i18n
url = git@github.com:Mibew/i18n.git

12
ISSUE_TEMPLATE.md Normal file
View File

@ -0,0 +1,12 @@
### Environment
* Mibew Messenger version:
* OS:
* Web server:
* PHP:
* PHP extensions:
* MySQL:
### Expected behavior
### Actual behavior
### Steps to reproduce the behavior

1
LICENSE Symbolic link
View File

@ -0,0 +1 @@
./src/mibew/LICENSE.txt

8
PULL_REQUEST_TEMPLATE.md Normal file
View File

@ -0,0 +1,8 @@
Fixes # .
Changes proposed in this pull request:
-
-
-
@Mibew/core-developers

BIN
README.md

Binary file not shown.

4
src/.bowerrc Normal file
View File

@ -0,0 +1,4 @@
{
"directory": "./mibew/js/vendor",
"analytics": false
}

27
src/.eslintrc Normal file
View File

@ -0,0 +1,27 @@
{
"extends": "eslint:recommended",
"rules": {
"indent": ["error", 4, {"SwitchCase": 1}],
"no-trailing-spaces": "error",
"semi": ["error", "always"],
"guard-for-in": "error",
"no-unused-vars": ["error", {"caughtErrors": "none", "args": "none"}]
},
"globals": {
"Mibew": true,
"MibewAPI": true,
"MibewAPIInteraction": true,
"MibewAPIChatInteraction": true,
"MibewAPIUsersInteraction": true,
"MibewAPIExecutionContext": true,
"Handlebars": true,
"_": true,
"Backbone": true,
"jQuery": true,
"vex": true,
"validator": true
},
"env":{
"browser": true
}
}

View File

@ -1 +0,0 @@
messenger

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="true" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</value>
</option>
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
<codeStyleSettings language="PHP">
<indentOptions>
<option name="USE_TAB_CHARACTER" value="true" />
</indentOptions>
</codeStyleSettings>
</value>
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</component>
</project>

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false">
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/mibew/locales/be/properties" charset="windows-1251" />
<file url="file://$PROJECT_DIR$/mibew/locales/bg/properties" charset="windows-1251" />
<file url="file://$PROJECT_DIR$/mibew/locales/ca/properties" charset="ISO-8859-1" />
<file url="file://$PROJECT_DIR$/mibew/locales/ru/properties" charset="windows-1251" />
<file url="file://$PROJECT_DIR$/mibew/locales/sp/properties" charset="ISO-8859-1" />
<file url="file://$PROJECT_DIR$/mibew/locales/ua/properties" charset="windows-1251" />
</component>
</project>

View File

@ -1,11 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<option name="myLocal" value="false" />
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
</profile>
</component>

View File

@ -1,7 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="PROJECT_PROFILE" value="Project Default" />
<option name="USE_PROJECT_PROFILE" value="true" />
<version value="1.0" />
</settings>
</component>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library">
<library name="PHP">
<CLASSES />
<SOURCES />
</library>
</orderEntry>
</component>
</module>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectResources">
<default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
</component>
<component name="ProjectRootManager" version="2" />
</project>

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/messenger.iml" filepath="$PROJECT_DIR$/.idea/messenger.iml" />
</modules>
</component>
</project>

View File

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<ADDITIONAL_INDENT_OPTIONS fileType="js">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="jsp">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="php">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="sass">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="sql">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="xml">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="yml">
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
<option name="USE_RELATIVE_INDENTS" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
</value>
</option>
</component>
</project>

View File

@ -1,5 +0,0 @@
<component name="DependencyValidationManager">
<state>
<option name="SKIP_IMPORT_STATEMENTS" value="false" />
</state>
</component>

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

17
src/bower.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "mibew",
"private": true,
"dependencies": {
"underscore": "1.8.2",
"json": "https://github.com/douglascrockford/JSON-js.git#c98948ae1944a28e2e8ebc3717894e580aeaaa05",
"jquery": "1.11.3",
"backbone": "1.1.2",
"marionette": "2.4.1",
"handlebars": "4.3.0",
"vex": "2.3.2",
"validator-js": "3.40.0"
},
"resolutions": {
"underscore": "1.8.2"
}
}

View File

@ -1,56 +0,0 @@
#!/usr/bin/perl
sub read_transl($) {
my($from) = @_;
my %translation = ();
open(IN, "mibew/locales/$from/properties");
while(<IN>) {
chomp;
if(/^([\w\.]+)=(.*)$/) {
if($1 ne "encoding" && $1 ne "output_charset" && $1 ne "output_encoding") {
$translation{$1} = $2;
}
} else {
die "wrong line in $from: $_\n";
}
}
close(IN);
return %translation;
}
%tr_en = read_transl("en");
@all_keys = keys %tr_en;
sub check_transl($%) {
my($name,%tr) = @_;
print "checking $name...\n";
my @totransl = ();
for $key (@all_keys) {
unless(exists $tr{$key}) {
push @totransl, "$key=".$tr_en{$key};
}
}
for $key(keys %tr) {
unless(exists $tr_en{$key}) {
print "unknown key in $name: $key\n";
}
}
if($#totransl >= 0) {
print "@{[$#totransl+1]} lines absent in locales/$name/properties\n";
open(OUT, "> absent_$name");
for(sort @totransl) {
print OUT "$_\n";
}
close(OUT);
}
}
check_transl("ru", read_transl("ru"));
check_transl("fr", read_transl("fr"));
check_transl("de", read_transl("de"));
check_transl("sp", read_transl("sp"));
check_transl("it", read_transl("it"));
check_transl("pl", read_transl("pl"));
check_transl("zh-tw", read_transl("zh-tw"));

View File

@ -1,5 +0,0 @@
#!/bin/sh
cd mibew/js/source
ant
rm -rf bin

51
src/composer.json Normal file
View File

@ -0,0 +1,51 @@
{
"name": "mibew/mibew",
"version": "3.6.0",
"description": "Mibew Messenger - open-source live support application",
"type": "project",
"homepage": "https://mibew.org",
"license": "Apache-2.0",
"authors": [
{
"name": "Mibew Messenger Project",
"homepage": "https://mibew.org/credits"
}
],
"support": {
"email": "support@mibew.org",
"issues": "https://github.com/mibew/mibew/issues",
"forum": "https://mibew.org/forums",
"source": "https://github.com/mibew/mibew"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/mibew/handlebars.php"
},
{
"type": "vcs",
"url": "https://github.com/mibew/handlebars.php-helpers"
}
],
"require": {
"mibew/handlebars.php": "~0.10.5",
"mibew/handlebars.php-helpers": "1.*",
"symfony/http-foundation": "4.4.*",
"symfony/routing": "4.4.*",
"symfony/config": "4.4.*",
"symfony/yaml": "^5.2",
"symfony/translation": "2.6.*",
"tedivm/stash": "0.12.*",
"mibew/html5": "1.1.*",
"vierbergenlars/php-semver": "3.0.*",
"swiftmailer/swiftmailer": "~5.4.0",
"ua-parser/uap-php": "^3.9",
"true/punycode": "~1.1"
},
"require-dev": {
"squizlabs/php_codesniffer": "3.*"
},
"config": {
"vendor-dir": "mibew/vendor"
}
}

View File

@ -1,245 +0,0 @@
#!/usr/bin/perl
use Digest::MD5 qw(md5 md5_hex md5_base64);
@rules = (
["redirect(ed)?\\.tpl", 1],
["\\.tpl", 0],
["view/license.php", 0],
["view/themes.php", 2],
["view/translate.php", 2],
["view/translatelist.php", 2],
["view/settings.php", 2],
["view/updates.php", 2],
["view/features.php", 2],
["view/performance.php", 2],
["view/avatar.php", 2],
["view/permissions.php", 2],
["view/agent.php", 2],
["view/agents.php", 2],
["view/group.php", 2],
["view/groupmembers.php", 2],
["view/groups.php", 2],
["view/operator_groups.php", 2],
["view/gen_button.php", 2],
["view/install_err.php", 2],
["view/install_index.php", 2],
["view/.*\\.php", 1],
["install/.*\\.php", 2],
["operator/themes.php", 2],
["operator/translate.php", 2],
["operator/settings.php", 2],
["operator/updates.php", 2],
["operator/features.php", 2],
["operator/performance.php", 2],
["operator/avatar.php", 2],
["operator/permissions.php", 2],
["operator/operator.php", 2],
["operator/operators.php", 2],
["operator/group.php", 2],
["operator/groupmembers.php", 2],
["operator/groups.php", 2],
["operator/opgroups.php", 2],
["operator/getcode.php", 2],
["operator/.*\\.php", 1],
["mibew/client.php", 0],
["mibew/leavemessage.php", 0],
["mibew/captcha.php", 0],
["mibew/license.php", 0],
["mibew/mail.php", 0],
["libs/operator_settings.php", 2],
["mibew/libs/chat.php", 0],
["libs/pagination.php", 1],
["libs/settings.php", 2],
["libs/groups.php", 2],
["libs/demothread.php", 2],
["mibew/thread.php", 0],
["mibew/b.php", 0],
["mibew/button.php", 0],
["mibew/index.php", 0],
["mibew/libs/.*\\.php", 1],
);
%messagekeys = (
"localeid" => 0,
"output_charset" => 0,
"output_encoding" => 0,
"harderrors.header" => 0,
"errors.required" => 0,
"errors.wrong_field" => 0,
"errors.file.move.error" => 2,
"errors.invalid.file.type" => 2,
"errors.file.size.exceeded" => 2,
"permission.admin" => 1,
"permission.takeover" => 1,
"permission.viewthreads" => 1,
"chat.thread.state_chatting_with_agent" => 1,
"chat.thread.state_closed" => 1,
"chat.thread.state_loading" => 1,
"chat.thread.state_wait" => 1,
"chat.thread.state_wait_for_another_agent" => 1,
"clients.queue.chat" => 1,
"clients.queue.prio" => 1,
"clients.queue.wait" => 1,
);
$mibewPath = "mibew";
%urls = ();
%usermessages = ();
%operatormessages = ();
$current_level = 0;
sub usemsg($) {
my ($m) = @_;
$messagekeys{$m} = exists $messagekeys{$m} && $messagekeys{$m} < $current_level ? $messagekeys{$m} : $current_level;
if($current_level == -1) {
print " .. $m\n";
}
}
sub file_content($) {
my $input = $_[0];
open( IN1, "< $input" ) or die "cannot find file $input";
my $oldslash = $/;
$/ = EOI;
$content = <IN1>;
close( IN1 );
if($content =~ s/\r//g) {
open( OUT1, "> $input") or die "cannot fix $input";
print OUT1 $content;
close(OUT1);
}
$/ = $oldslash;
return $content;
}
sub process_tpl($) {
my ($filename) = @_;
my $m = file_content($filename);
while( $m =~ /\${msg:([\w\.]+)(,[\w\.]+)?}/g ) {
usemsg($1);
}
while( $m =~ /\${url:([\w\.]+)(,[\w\.]+)?}/g ) {
usemsg($1);
$urls{"%$1"} = 1;
}
}
sub process_php($) {
my ($source) = @_;
my $content = file_content($source);
$content =~ s/<\?xml version=\\"1\.0\\" encoding=\\"UTF-8\\"\?>//;
while( $content =~ s/<\?(?!xml)(.*?)\?>//s ) {
my $inner = $1;
while($inner =~ s/(getlocal|getstring|no_field)2?_?\((.*?)[,\)]//s) {
my $firstarg = $2;
if( $firstarg =~ /^["']([\w\.]+)['"]$/) {
usemsg($1);
} elsif($firstarg =~ /^\$\w+$/ || $firstarg eq '"$var.header"' || $firstarg eq '"permission.$permid"' || $firstarg eq '$threadstate_key[$thread[\'istate\']]') {
# skip
} else {
print "> unknown: $firstarg\n";
}
}
}
}
sub file_checksum($) {
my ($source) = @_;
if($source =~ /\.(png|gif|jpg|ico|wav)$/ || $source =~ /config\.php$/) {
return "-";
}
my $content = file_content($source);
return md5_hex($content);
}
@allsources = ();
sub process_one($) {
my($source) = @_;
push @allsources, $source unless $source =~ /$mibewPath\/locales/ && $source !~ /$mibewPath\/locales\/(en|names)/ || $source =~ /\/package$/;
if($source !~ /\.(php|tpl)$/) {
return;
}
$current_level = -1;
A: foreach $rule (@rules) {
my $key = $$rule[0];
if($source =~ /$key/) {
$current_level = $$rule[1];
last A;
}
}
if($current_level < 0 || $current_level > 2) {
print "not detected for: $source\n";
$current_level = 0;
}
if($source =~ /\.php$/) {
# print "$source ($current_level)\n";
process_php($source);
} elsif($source =~ /\.tpl$/) {
process_tpl($source);
} else {
#print ". $source\n";
}
}
sub process_files($) {
my($from) = @_;
opendir(DIR, $from) || die "can't opendir $from: $!";
my @content = readdir(DIR);
closedir DIR;
for(grep { -f "$from/$_" && ($_ !~ /^\./ || $_ eq ".htaccess") } @content) {
process_one("$from/$_");
}
for(grep { -d "$from/$_" && $_ !~ /^\./ } @content) {
process_files("$from/$_");
}
}
process_files($mibewPath);
# fix
$messagekeys{'page.analysis.userhistory.title'} = 1;
$messagekeys{'errors.failed.uploading.file'} = 2;
open( OUT, "> $mibewPath/locales/names/level1") or die "cannot write file, $!";
for $key(sort grep { $messagekeys{$_} == 0 } keys %messagekeys) {
print OUT "$key\n";
}
close( OUT );
open( OUT, "> $mibewPath/locales/names/level2") or die "cannot write file, $!";
for $key(sort grep { $messagekeys{$_} == 1 } keys %messagekeys) {
print OUT "$key\n";
}
close( OUT );
open( OUT, "> $mibewPath/install/package") or die "cannot write file, $!";
for $key(sort @allsources) {
$digest = file_checksum($key);
$key =~ s/$mibewPath\///;
print OUT "$key $digest\n";
}
close( OUT );

743
src/gulpfile.js Normal file
View File

@ -0,0 +1,743 @@
// Initialize requirements
var fs = require('fs'),
https = require('https'),
exec = require('child_process').exec,
eventStream = require('event-stream'),
runSequence = require('gulp4-run-sequence'),
through = require('through2'),
lodash = require('lodash'),
PoFile = require('pofile'),
strftime = require('strftime'),
del = require('del'),
bower = require('bower'),
gulp = require('gulp'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
phpcs = require('gulp-phpcs'),
order = require('gulp-order'),
handlebars = require('gulp-handlebars'),
handlebarsEngine = require('handlebars'),
defineModule = require('gulp-define-module'),
header = require('gulp-header'),
zip = require('gulp-zip'),
tar = require('gulp-tar'),
gzip = require('gulp-gzip'),
chmod = require('gulp-chmod'),
xgettext = require('gulp-xgettext'),
concatPo = require('gulp-concat-po'),
rename = require('gulp-rename'),
eslint = require('gulp-eslint'),
removeDuplicateHeaders = require('mibew-gulp-greh'),
mkdirp = require('mkdirp');
// Set global configuration
var config = {
mibewPath: 'mibew',
configsPath: 'mibew/configs',
phpVendorPath: 'mibew/vendor',
jsVendorPath: 'mibew/js/vendor',
pluginsPath: 'mibew/plugins',
avatarsPath: 'mibew/files/avatar',
cachePath: 'mibew/cache',
jsPath: 'mibew/js',
chatStylesPath: 'mibew/styles/chats',
pageStylesPath: 'mibew/styles/pages',
i18nPath: 'i18n',
i18nPrefix: 'mibew-i18n-',
releasePath: 'release',
uploadPath: 'upload',
compiledTemplatesHeader: fs.readFileSync('tools/compiled_templates_header.txt'),
getComposerUrl: 'https://getcomposer.org/installer',
phpBin: 'php -d "suhosin.executor.include.whitelist = phar" -d "memory_limit=512M"',
package: require('./composer.json'),
msginit: 'msginit',
msgcat: 'msgcat'
}
config.i18nSuffix = '-' + config.package.version + '-' + strftime('%Y%m%d');
// Tasks for cleaning //////////////////
// Cleans all built files
gulp.task('clean', function(callback) {
return del([
config.releasePath,
'composer.lock',
config.phpVendorPath,
config.jsVendorPath,
config.jsPath + '/compiled/**/*',
'!' + config.jsPath + '/compiled/.keep',
config.chatStylesPath + '/*/templates_compiled/client_side/*.js',
config.chatStylesPath + '/*/js/compiled/*.js',
config.pageStylesPath + '/*/templates_compiled/client_side/*.js'
], callback);
});
// Cleans temporary English translation in the release dir
gulp.task('clean-tmp-po', function(callback) {
return del([config.releasePath + '/translation.po'], callback);
});
// Cleans temporary files of translations in the release dir
gulp.task('clean-tmp-i18n-files', function(callback) {
return del([
config.releasePath + '/**/*',
'!' + config.releasePath + '/*.zip',
'!' + config.releasePath + '/*.tar.gz',
'!' + config.releasePath + '/*.pot'
], callback);
});
// Cleans all files prepared for uploading to CDN
gulp.task('clean-upload', function(callback) {
return del([config.uploadPath], callback);
});
// Cleans everything
gulp.task('clean-all', function(callback) {
runSequence( ['clean', 'clean-upload'],
callback );
});
// Watcher tasks ///////////////////////
// Watch styles
gulp.task('watch', function() {
gulp.watch(config.pageStylesPath + '/**/*.handlebars', gulp.series('page-styles'));
gulp.watch(config.chatStylesPath + '/**/js/source/**/*.js', gulp.series('chat-styles-js'));
gulp.watch(config.chatStylesPath + '/**/*.handlebars', gulp.series('chat-styles-handlebars'));
});
// Service tasks //////////////////
// Get and install PHP Composer
gulp.task('get-composer', function(callback) {
// Check whether Composer is already in place
if (fs.existsSync('./composer.phar')) {
callback(null);
return;
}
// Get installer from the Internet
https.get(config.getComposerUrl, function(response) {
// Run PHP to install Composer
var php = exec(config.phpBin, function(error, stdout, stderr) {
callback(error ? stderr : null);
});
// Pass installer code to PHP via STDIN
response.pipe(php.stdin);
});
});
// Install Composer dependencies excluding development ones
gulp.task('composer-install', gulp.series('get-composer', function(callback) {
exec(config.phpBin + ' composer.phar install --no-dev',
function(error, stdout, stderr) {
callback(error ? stderr : null);
});
}));
// Install all Composer dependencies
gulp.task('composer-install-dev', gulp.series('get-composer', function(callback) {
exec(config.phpBin + ' composer.phar install',
function(error, stdout, stderr) {
callback(error ? stderr : null);
});
}));
// Installs bower dependencies
gulp.task('bower-install', function(callback) {
bower.commands.install([], {}, {})
.on('error', function(error) {
callback(error);
})
.on('end', function() {
// We should manually minify JavaScript files that was not minified
// by bower packages' authors
// TODO: This is a temproary workaround and should be removed once
// the packages will be fixed
var stream = eventStream.merge(
gulp.src(config.jsVendorPath + '/backbone/backbone.js',
{base: config.jsVendorPath})
.pipe(uglify({preserveComments: 'some'}))
// There are neither "@license" tag nor "!preserve" in the
// header. Add the header manually
.pipe(header(
"// Backbone.js 1.1.2\n"
+ "// (c) 2010-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n"
+ "// Backbone may be freely distributed under the MIT license.\n"
+ "// For all details and documentation:\n"
+ "// http://backbonejs.org\n"
))
.pipe(rename('backbone/backbone-min.js')),
gulp.src(config.jsVendorPath + '/json/json2.js',
{base: config.jsVendorPath})
.pipe(uglify({preserveComments: 'some'}))
// There are neither "@license" tag nor "!preserve" in the
// header, add the header manually
.pipe(header("// json2.js. Public Domain. See http://www.JSON.org/js.html\n"))
.pipe(rename('json/json2.min.js'))
)
.pipe(gulp.dest(config.jsVendorPath));
stream
.on('error', callback)
.on('end', callback);
});
});
// Tasks for checking //////////////////
// Checks all PHP files with PHP Code Sniffer
gulp.task('phpcs', gulp.series('composer-install-dev', function() {
return gulp.src([
config.mibewPath + '/**/*.php',
'!' + config.phpVendorPath + '/**/*.*',
'!' + config.pluginsPath + '/**/*.*',
'!' + config.cachePath + '/**/*.*'
], {
// Content of the cache directory is readable only for webserver.
// Thus we must to set "strict" option to false to prevent "EACCES"
// errors. At the same we need to see all errors that take place.
strict: false,
silent: false
})
.pipe(phpcs({
bin: config.phpVendorPath + '/bin/phpcs',
standard: 'PSR2',
warningSeverity: 0
}))
.pipe(phpcs.reporter('log'))
.pipe(phpcs.reporter('fail'));
}));
// Checks all JavaScript Source files with ESLint
gulp.task('eslint', function() {
return gulp.src(config.jsPath + '/source/**/*.js')
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});
// Restore empty English translation in the source code
gulp.task('post-pack-cleanup', function(callback) {
gulp.src('translation.po')
.pipe(gulp.dest(config.mibewPath + '/locales/en/'));
del(['translation.po', config.releasePath + '/translation.po'], callback);
});
// Tasks of compiling //////////////////
// Compile all JavaScript files of the Mibew Messenger Core
gulp.task('js', function() {
return eventStream.merge(
getClientSideApp('default'),
getClientSideApp('chat'),
getClientSideApp('thread_log'),
getClientSideApp('users'),
gulp.src(config.jsPath + '/source/**/*.js')
)
.pipe(uglify({preserveComments: 'some'}))
.pipe(removeDuplicateHeaders())
.pipe(gulp.dest(config.jsPath + '/compiled'));
});
// Compile and concatenate Handlebars templates for all chat styles
gulp.task('chat-styles-handlebars', function() {
return getChildDirs(config.chatStylesPath)
.then(function (dirs) {
return Promise.all(dirs.map(function (dir) {
return new Promise(function(resolve, reject) {
gulp.src(config.chatStylesPath + '/' + dir
+ '/templates_src/client_side/**/*.handlebars')
.pipe(handlebars({
// Use specific version of Handlebars.js
handlebars: handlebarsEngine
}))
.pipe(wrapHandlebarsTemplate())
.pipe(concat('templates.js'))
.pipe(uglify({preserveComments: 'some'}))
.pipe(header(config.compiledTemplatesHeader))
.pipe(gulp.dest(config.chatStylesPath + '/' + dir
+ '/templates_compiled/client_side'))
.on('end', resolve)
.on('error', reject);
});
}));
});
});
// Compile and concatenate js files for all chat styles
gulp.task('chat-styles-js', function() {
return getChildDirs(config.chatStylesPath)
.then(function (dirs) {
return Promise.all(dirs.map(function (dir) {
return new Promise(function(resolve, reject) {
gulp.src(config.chatStylesPath + '/' + dir
+ '/js/source/**/*.js')
.pipe(concat('scripts.js'))
.pipe(uglify({preserveComments: 'some'}))
.pipe(gulp.dest(config.chatStylesPath + '/' + dir
+ '/js/compiled'))
.on('end', resolve)
.on('error', reject);
});
}));
});
});
// Performs all job related to pages styles
gulp.task('page-styles', function() {
return getChildDirs(config.pageStylesPath)
.then(function (dirs) {
return Promise.all(dirs.map(function (dir) {
return new Promise(function(resolve, reject){
gulp.src(config.pageStylesPath + '/' + dir
+ '/templates_src/client_side/**/*.handlebars')
.pipe(handlebars({
// Use specific version of Handlebars.js
handlebars: handlebarsEngine
}))
.pipe(wrapHandlebarsTemplate())
.pipe(concat('templates.js'))
.pipe(uglify({preserveComments: 'some'}))
.pipe(header(config.compiledTemplatesHeader))
.pipe(gulp.dest(config.pageStylesPath + '/' + dir
+ '/templates_compiled/client_side'))
.on('end', resolve)
.on('error', reject);
});
}));
});
});
// Performs all job related to chat styles
gulp.task('chat-styles', gulp.series('chat-styles-handlebars', 'chat-styles-js'));
// Prepares ready to use development version of Mibew Messenger without
// packing or validating it
gulp.task('rebuild', function(callback) {
runSequence(
'clean',
['js', 'chat-styles', 'page-styles', 'composer-install',
'bower-install'],
callback
);
});
// Tasks for localization issues ///////
// Generate POT-file based upon the source code
gulp.task('generate-pot', function() {
return eventStream.merge(
gulp.src([
config.mibewPath + '/**/*.php',
'!' + config.phpVendorPath + '/**/*.*',
'!' + config.pluginsPath + '/**/*.*',
'!' + config.cachePath + '/**/*.*'
], {
// Content of the cache directory is readable only for
// webserver. Thus we must to set "strict" option to false
// to prevent "EACCES" errors. At the same we need to see all
// errors that take place.
strict: false,
silent: false
})
.pipe(xgettext({
language: 'PHP',
keywords: [
{name: 'getlocal'},
{name: 'no_field'},
{name: 'wrong_field'},
{name: 'failed_uploading_file', singular: 2}
]
})),
gulp.src(config.jsPath + '/source/**/*.js', {base: config.mibewPath})
.pipe(xgettext({
language: 'JavaScript',
keywords: [
{name: 'trans'}
]
})),
gulp.src([
config.chatStylesPath + '/default/templates_src/**/*.handlebars',
config.pageStylesPath + '/default/templates_src/**/*.handlebars'
], {base: config.mibewPath})
.pipe(xgettextHandlebars())
)
.pipe(concatPo(config.i18nPrefix + 'translation'
+ config.i18nSuffix + '.pot',
{
headers: {
'Project-Id-Version': 'Mibew Messenger '
+ config.package.version,
'Report-Msgid-Bugs-To': config.package.support.email,
'POT-Creation-Date': strftime('%Y-%m-%d %H:%M%z'),
'PO-Revision-Date': '',
'Last-Translator': '',
'Language-Team': '',
'Content-Type': 'text/plain; charset=UTF-8'
}
})
)
.pipe(gulp.dest(config.releasePath));
});
// Generate temporary English translation to be used in the release
gulp.task('generate-tmp-po', gulp.series('generate-pot', function(callback) {
return exec(config.msginit + ' --no-translator --no-wrap -i '
+ config.releasePath + '/' + config.i18nPrefix + 'translation'
+ config.i18nSuffix + '.pot' + ' -l en -o '
+ config.releasePath + '/translation.po',
function(error, stdout, stderr) {
callback(error ? stderr : null);
});
}));
// Generate complete translations (that includes missed strings) to be used
// in the release
gulp.task('generate-pos', gulp.series('generate-tmp-po', function(callback) {
return getChildDirs(config.i18nPath + '/translations')
.then(function (dirs) {
return Promise.all(dirs.map(function (dir) {
return new Promise(function(resolve, reject) {
mkdirp(config.releasePath + '/' + dir, function (error) {
if (error) {
reject(error);
}
});
exec(config.msgcat + ' ' + config.i18nPath + '/translations/'
+ dir + '/translation.po ' + config.releasePath
+ '/translation.po --no-location --no-wrap --use-first'
+ ' -o ' + config.releasePath + '/' + dir
+ '/translation.po',
function(error, stdout, stderr) {
if (error) {
reject(error);
}
});
var sources = [
config.i18nPath + '/translations/' + dir + '/**/*',
'!' + config.i18nPath + '/translations/' + dir
+ '/translation.po'
];
gulp.src(sources)
.pipe(gulp.dest(config.releasePath + '/' + dir))
.on('error', reject)
.on('end', resolve);
});
}));
});
}));
// Packaging tasks /////////////////////
// Pack sources for release as .zip and .tar.gz archives
gulp.task('pack-sources', gulp.series('composer-install', 'bower-install', function() {
gulp.src(config.mibewPath + '/locales/en/translation.po')
.pipe(gulp.dest('.'));
gulp.src(config.releasePath + '/translation.po')
.pipe(gulp.dest(config.mibewPath + '/locales/en/'));
var sources = [
config.mibewPath + '/**/*',
// Exclude user's config
'!' + config.configsPath + '/config.yml',
// Exclude cache files but not the ".keep" file.
'!' + config.cachePath + '/**/!(.keep)',
// Exclude avatars but not the ".keep" file.
'!' + config.avatarsPath + '/!(.keep)',
// Exclude plugins but not the ".keep" file.
'!' + config.pluginsPath + '/!(.keep)',
'!' + config.pluginsPath + '/*/**/*',
// Exclude Git repositories that can be shipped with third-party libs
'!' + config.phpVendorPath + '/**/.git',
'!' + config.phpVendorPath + '/**/.git/**/*',
// Exclude vendors binaries
'!' + config.phpVendorPath + '/bin/**/*',
// Exclude JavaScript sources
'!' + config.jsPath + '/source/**/*',
// Actually we does not need backbone.babysitter and backbone.wreqr
// dependencies because they embed into marionette.js. So we exclude
// "backbone.babysitter" and "backbone.wreqr" directories and all their
// contents.
'!' + config.jsVendorPath + '/backbone.babysitter{,/**}',
'!' + config.jsVendorPath + '/backbone.wreqr{,/**}',
// Exclude dot files within third-party JS libraries.
'!' + config.jsVendorPath + '/**/.*',
// Exclude config files of various package systems
'!' + config.jsVendorPath + '/**/{bower,component,package,composer}.json',
// Exclude config files of various build systems
'!' + config.jsVendorPath + '/**/Gruntfile.*',
'!' + config.jsVendorPath + '/**/gulpfile.*',
'!' + config.jsVendorPath + '/**/Makefile',
// Exclude HTML files from third-party JS libraries. Such files can be
// used for docs or for tests, we need none of them.
'!' + config.jsVendorPath + '/**/*.html',
// There are too many useless files in Vex.js library. Exclude them.
'!' + config.jsVendorPath + '/vex/sass{,/**}',
'!' + config.jsVendorPath + '/vex/docs{,/**}',
'!' + config.jsVendorPath + '/vex/docs{,/**}',
'!' + config.jsVendorPath + '/vex/coffee{,/**}'
];
var srcOptions = {
// Dot files (.htaccess, .keep, etc.) must be included in the package
dot: true,
// Content of the cache directory is readable only for webserver. Thus
// we must to set "strict" option to false to prevent "EACCES" errors.
// At the same we need to see all errors that take place.
strict: false,
silent: false,
// Preserve root directory name (i.e. 'mibew/')
base: '.'
}
var version = config.package.version;
return eventStream.merge(
gulp.src(sources, srcOptions)
.pipe(zip('mibew-' + version + '.zip')),
gulp.src(sources, srcOptions)
.pipe(tar('mibew-' + version + '.tar'))
.pipe(gzip())
)
.pipe(chmod(644))
.pipe(gulp.dest(config.releasePath));
}));
// Pack translations for release as .zip and .tar.gz archives
gulp.task('pack-i18n', function(callback) {
return getChildDirs(config.i18nPath + '/translations')
.then(function (dirs) {
return Promise.all(dirs.map(function (dir) {
return new Promise(function(resolve, reject) {
var srcOptions = {
base: config.releasePath
};
eventStream.merge(
gulp.src(config.releasePath + '/' + dir
+ '/**/*', srcOptions)
.pipe(zip(config.i18nPrefix + dir
+ config.i18nSuffix + '.zip')),
gulp.src(config.releasePath + '/' + dir
+ '/**/*', srcOptions)
.pipe(tar(config.i18nPrefix + dir
+ config.i18nSuffix + '.tar'))
.pipe(gzip())
)
.pipe(chmod(644))
.pipe(gulp.dest(config.releasePath))
.on('error', reject)
.on('end', resolve);
});
}));
});
});
// Tasks of releasing //////////////////
// Prepare release of Mibew Messenger
gulp.task('prepare-release', function(callback) {
runSequence(
'clean',
['phpcs', 'js', 'chat-styles', 'page-styles', 'generate-pot',
'generate-tmp-po'],
'pack-sources',
'post-pack-cleanup',
callback
);
});
// Prepare releases of translations for Mibew Messenger
gulp.task('prepare-i18n-release', function(callback) {
runSequence( 'clean-tmp-po',
'generate-pos',
'pack-i18n',
'clean-tmp-i18n-files',
callback
);
});
// Mirror prepared releases of Mibew Messenger and its translations in a form
// intended for uploading into the CDN
gulp.task('prepare-for-upload', function(callback) {
gulp.src(config.releasePath + '/mibew-' + config.package.version + '.*')
.pipe(gulp.dest(config.uploadPath + '/core/' + config.package.version + '/'));
gulp.src(config.releasePath + '/mibew-i18n-translation-' + config.package.version + '-*.pot')
.pipe(gulp.dest(config.uploadPath + '/i18n/_pot/' + config.package.version + '/'));
return getChildDirs(config.i18nPath + '/translations')
.then(function (dirs) {
return Promise.all(dirs.map(function (dir) {
return new Promise(function(resolve, reject) {
gulp.src(config.releasePath + '/mibew-i18n-' + dir + '-' + config.package.version + '-*.*')
.pipe(gulp.dest(config.uploadPath + '/i18n/' + dir + '/' + config.package.version + '/'))
.on('error', reject)
.on('end', resolve);
});
}));
});
});
// Perform all preparations before uploading the release of Mibew Messenger and
// its translations into the CDN
gulp.task('prepare-all', function(callback) {
runSequence('clean-all', 'prepare-release', 'prepare-i18n-release',
'prepare-for-upload', callback);
});
// Prepare release archives of the development version of Mibew Messenger
gulp.task('default', function(callback) {
runSequence(
'clean',
['js', 'chat-styles', 'page-styles', 'generate-tmp-po'],
'pack-sources',
['post-pack-cleanup', 'clean-tmp-po'],
callback
);
});
/**
* Loads and prepare js file for a client side application with the specified
* name.
*
* @param {String} name Application name.
* @returns A files stream that can be piped to any gulp plugin.
*/
var getClientSideApp = function(name) {
var appSource = config.jsPath + '/source/' + name;
return gulp.src(appSource + '/**/*.js')
.pipe(order(
[
appSource + '/init.js',
// The following line is equivalent to
// gulp.src([appSource + '/*.js', '!' + appSource + '/app.js']);
appSource + '/!(app).js',
appSource + '/models/**/base*.js',
appSource + '/models/**/*.js',
appSource + '/collections/**/base*.js',
appSource + '/collections/**/*.js',
appSource + '/model_views/**/base*.js',
appSource + '/model_views/**/*.js',
appSource + '/collection_views/**/base*.js',
appSource + '/collection_views/**/*.js',
appSource + '/regions/**/base*.js',
appSource + '/regions/**/*.js',
appSource + '/layouts/**/base*.js',
appSource + '/layouts/**/*.js',
appSource + '/**/base*.js',
// The following line is equivalent to
// gulp.src([appSource + '/**/*.js', '!' + appSource + '/app.js']);
'!' + appSource + '/app.js',
appSource + '/app.js'
],
{base: process.cwd()}
))
.pipe(concat(name + '_app.js'));
}
/**
* Wraps a handlebars template with a function and attach it to the
* Handlebars.templates object.
*
* @returns {Function} A function that can be used in pipe() method of a file
* stream right after gulp-handlebars plugin.
*/
var wrapHandlebarsTemplate = function() {
return defineModule('plain', {
wrapper: '(function() {\n'
+ 'var templates = Handlebars.templates = Handlebars.templates || {};\n'
+ 'Handlebars.templates["<%= relative %>"] = <%= handlebars %>;\n'
+ '})()',
context: function(context) {
return {relative: context.file.relative.replace(/\.js$/, '').replace(/\\/g, '/')};
}
});
}
/**
* Extracts gettext messages from handlebars templates.
*
* @returns {Function} A function that can be used in pipe() method of a file
* stream.
*/
var xgettextHandlebars = function() {
var helperRegExp = /\{{2}l10n\s*('|")(.*?[^\\])\1.*?\}{2}/g;
return through.obj(function (file, enc, callback) {
var po = new PoFile();
match = false,
contents = file.contents.toString();
while (match = helperRegExp.exec(contents)) {
// Try to find item in the .po file by its name
var item = lodash.find(po.items, function(item) {
return match[2] === item.msgid;
});
var line = contents.substr(0, match.index).split(/\r?\n|\r/g).length;
if (!item) {
// There is no such item, create new one
item = new PoFile.Item();
item.msgid = match[2].replace(/\\'/g, "'").replace(/\\"/g, '"');
po.items.push(item);
}
// Add new reference
item.references.push(file.relative + ':' + line);
}
// Update file contents
file.contents = Buffer.from(po.toString());
this.push(file);
callback();
});
}
/**
* Retrieves list of all dirs which are placed in the specified one.
*
* @param {String} srcDir A dir to search.
* @returns Promise A promise which will be resolved with list of child dirs or
* rejected with the occured error.
*/
var getChildDirs = function(srcDir) {
return (new Promise(function(resolve, reject) {
fs.readdir(srcDir, function (err, files) {
if (err) {
reject(err);
} else {
resolve(files);
}
});
})).then(function (files) {
// Replace all files that are not a directory with nulls.
return Promise.all(files.map(function (file) {
return new Promise(function (resolve, reject) {
fs.lstat(srcDir + '/' + file, function (err, stat) {
if (err) {
reject(err);
} else {
resolve(stat.isDirectory() ? file : null);
}
});
});
}));
}).then(function(dirs) {
// Remove all nulls from the array.
return dirs.filter(function (dir) {
return null !== dir;
});
});
}

1
src/i18n Submodule

@ -0,0 +1 @@
Subproject commit 55868d9973f531c3550575481bde4233cc625b91

View File

@ -1,12 +1,14 @@
# Set default handler for incoming requests
DirectoryIndex index.php
# Disable directory listing # Disable directory listing
Options -Indexes Options -Indexes
# Follow symbolic links in the directory # Follow symbolic links in the directory
Options +FollowSymLinks Options +FollowSymLinks
<IfModule mod_negotiation.c>
# Forbid apache to guess file extensions
Options -MultiViews
</IfModule>
# Disable mod_security for Apache 1.x # Disable mod_security for Apache 1.x
<IfModule mod_security.c> <IfModule mod_security.c>
SecFilterEngine Off SecFilterEngine Off
@ -23,3 +25,40 @@ Options +FollowSymLinks
php_value mbstring.http_output pass php_value mbstring.http_output pass
php_flag session.auto_start off php_flag session.auto_start off
</IfModule> </IfModule>
# Redirect requests to the front controller
<IfModule mod_rewrite.c>
# Use the front controller as a default handler
DirectoryIndex index.php
RewriteEngine On
# Use separate front controller for the system installator
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^install(/(.*))?$ install.php [QSA,L]
# Rewrite all other requests for files and directories that do not exist to
# the main front controller
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<IfModule !mod_rewrite.c>
# There is no mod_rewrite in the system. For the root Mibew Messenger
# directory index_fallback.php should be loaded first to activate
# old-fashioned URLs. For all other directories index.php is just a
# directory index file.
DirectoryIndex index_fallback.php index.php
</IfModule>
# Deny access to internal system files
<FilesMatch "\.(yml|po|ini|handlebars|keep)$">
Deny from all
</FilesMatch>
# Deny access to CLI cron worker from the outside
<Files "cron.php">
Deny from all
</Files>

View File

@ -1,41 +0,0 @@
Mibew Messenger
Copyright 2005-2014 the original author or authors.
REQUIREMENTS
* Apache web server 1.3.34 or above
* MySQL database 5.0 or above
* PHP 4.x or above with MySQL support
INSTALLATION
1. Create folder with name 'mibew' in the root of your website.
2. Upload all the files contained in this archive (retaining the directory structure) into created folder.
Be sure to chmod the mibew folder to 755 and the install folder to 644.
3. Add a MySQL database with the name 'mibew'
4. Edit /mibew/libs/config.php to the information needed to connect to the database
5. Using your web browser visit http://<yourdomain>/mibew/install/ and
hit 'Create tables'
6. Remove /mibew/install/ directory from your server
7. Logon as
user: admin
password: <empty>
8. Get button code and setup it on your site.
9. Change your password and name.
10. Wait for your visitors on 'Pending users' page.
On unix/linux platforms change the owner of /mibew/images/avatar folder
to the user, under which the web server is running (for instance, www).
The owner should have all rights on the folder /mibew/images/avatar
(chmod 700 /mibew/images/avatar).
UPDATE
1. Backup your /mibew/libs/config.php
2. Backup your /mibew/images/avatar folder.
3. Delete the items in the mibew folder on the server.
4. Upload all the files contained in the downloaded archive (retaining the directory structure) into mibew folder.
5. Re-edit the MySQL database settings you config.php
6. Visit http://<yourdomain>/mibew/install/ and follow the instructions to update database (if needed).
7. Remove /mibew/install/ directory from your server
8. Restore contents of /mibew/images/avatar folder.

56
src/mibew/README.txt Normal file
View File

@ -0,0 +1,56 @@
Mibew Messenger
Copyright 2005-2023 the original author or authors.
REQUIREMENTS
* Apache web server 1.3.34 or above with the ability to use local .htaccess
files (mod_rewrite module is optional, but recommended)
* MySQL database 5.0 or above
* PHP 7.2.5 or above with PDO, pdo_mysql, cURL, mbstring and gd extensions
INSTALLATION
1. Create folder with name 'mibew' in the root of your website.
2. Upload all the files contained in this archive (retaining the directory
structure) into created folder.
Be sure to chmod the mibew folder to 0755.
3. Add a MySQL database with the name 'mibew'
4. Copy /mibew/configs/default_config.yml to /mibew/configs/config.yml
5. Edit /mibew/configs/config.yml to the information needed to connect to the database
6. Using your web browser visit http://<yourdomain>/mibew/install and
perform step-by-step installation.
7. Remove /mibew/install.php file from your server
8. Logon as
user: admin
password: <your password>
9. Get button code and setup it on your site.
10. Configure periodically running tasks by setting up an automated
process to visit the page http://<yourdomain>/cron?cron_key=<key>
The full URL including the secret "cron key" used to protect against
unauthorized access can be seen on the 'General' tab at the 'Settings' page.
11. Change your name.
12. Wait for your visitors on 'Pending users' page.
On unix/linux platforms change the owner of /mibew/files/avatar and
/mibew/cache folders to the user, under which the web server is running
(for instance, www). The owner should have all rights on the folders
/mibew/files/avatar and /mibew/cache
(chmod 0700 /mibew/files/avatar && chmod 0700 /mibew/cache).
UPDATE
1. Backup your actual installation (i.e. code and database).
2. Disable all plugins.
3. Delete all items in your Mibew Messenger directory on the server.
4. Unpack the archive with the official distrubition in that directory.
5. Remove install.php file.
6. Restore configuration (configs/ directory), plugins (plugins/ directory),
(maybe) custom styles (if you have any), (maybe) additional
locales (if you use any), and avatars (files/avatar/ directory) from the
backup you've made at the step 1.
7. Visit http://<yourdomain>/<path to your Mibew Messenger>/update and follow
the instructions to update the database tables (if needed).
8. Enable disabled plugins.

View File

@ -1 +0,0 @@
Mibew/1.6.9

1
src/mibew/VERSION.txt Normal file
View File

@ -0,0 +1 @@
Mibew/3.6.0

View File

@ -1,74 +0,0 @@
<?php
/*
* Copyright 2005-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require_once('libs/common.php');
require_once('libs/chat.php');
require_once('libs/operator.php');
require_once('libs/groups.php');
$referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "";
if($referer && isset($_SESSION['threadid'])) {
$link = connect();
$thread = thread_by_id_($_SESSION['threadid'], $link);
if ($thread && $thread['istate'] != $state_closed) {
$msg = getstring2_("chat.client.visited.page", array($referer), $thread['locale'], true);
post_message_($thread['threadid'], $kind_for_agent,$msg,$link);
}
mysql_close($link);
}
$image = verifyparam(isset($_GET['image']) ? "image" : "i", "/^\w+$/", "mibew");
$lang = verifyparam(isset($_GET['language']) ? "language" : "lang", "/^[\w-]{2,5}$/", "");
if(!$lang || !locale_pattern_check($lang) || !locale_exists($lang)) {
$lang = $current_locale;
}
$groupid = verifyparam( "group", "/^\d{1,10}$/", "");
if($groupid) {
loadsettings();
if($settings['enablegroups'] == '1') {
$group = group_by_id($groupid);
if(!$group) {
$groupid = "";
}
} else {
$groupid = "";
}
}
$image_postfix = has_online_operators($groupid) ? "on" : "off";
$filename = dirname(__FILE__) . "/locales/${lang}/button/${image}_${image_postfix}.gif";
if (!file_exists($filename)) {
die("no image");
}
$fp = fopen($filename, 'rb') or die("unable to get image");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: image/gif");
header("Content-Length: ".filesize($filename));
if(function_exists('fpassthru')){
@fpassthru($fp);
} else {
while( (!feof($fp)) && (connection_status()==0)){
print(fread($fp, 1024*8));
flush();
}
fclose($fp);
}
exit;
?>

View File

@ -1,182 +0,0 @@
<?php
/*
* Copyright 2005-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require_once('libs/common.php');
require_once('libs/chat.php');
require_once('libs/operator.php');
require_once('libs/groups.php');
require_once('libs/expand.php');
require_once('libs/captcha.php');
require_once('libs/notify.php');
loadsettings();
if($settings['enablessl'] == "1" && $settings['forcessl'] == "1") {
if(!is_secure_request()) {
$requested = $_SERVER['PHP_SELF'];
if($_SERVER['REQUEST_METHOD'] == 'GET' && $_SERVER['QUERY_STRING']) {
header("Location: ".get_app_location(true,true)."/client.php?".$_SERVER['QUERY_STRING']);
} else {
die("only https connections are handled");
}
exit;
}
}
if( !isset($_GET['token']) || !isset($_GET['thread']) ) {
$thread = NULL;
if( isset($_SESSION['threadid']) ) {
$thread = reopen_thread($_SESSION['threadid']);
}
if( !$thread ) {
$groupid = "";
$groupname = "";
if($settings['enablegroups'] == '1') {
$groupid = verifyparam( "group", "/^\d{1,10}$/", "");
if($groupid) {
$group = group_by_id($groupid);
if(!$group) {
$groupid = "";
} else {
$groupname = get_group_name($group);
}
}
}
$visitor = visitor_from_request();
if(isset($_POST['survey']) && $_POST['survey'] == 'on') {
$firstmessage = getparam("message");
$info = getparam("info");
$email = getparam("email");
$referrer = urldecode(getparam("referrer"));
if ($settings["surveyaskcaptcha"] == "1") {
$captcha = getparam('captcha');
$original = isset($_SESSION["mibew_captcha"])
? $_SESSION["mibew_captcha"]
: "";
$survey_captcha_failed = empty($original)
|| empty($captcha)
|| $captcha != $original;
unset($_SESSION['mibew_captcha']);
}
if($settings['usercanchangename'] == "1" && isset($_POST['name'])) {
$newname = getparam("name");
if($newname != $visitor['name']) {
$data = strtr(base64_encode(myiconv($mibew_encoding,"utf-8",$newname)), '+/=', '-_,');
setcookie($namecookie, $data, time()+60*60*24*365);
$visitor['name'] = $newname;
}
}
} else {
$firstmessage = NULL;
$info = getgetparam('info');
$email = getgetparam('email');
$referrer = isset($_GET['url']) ? $_GET['url'] :
(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "");
if(isset($_GET['referrer']) && $_GET['referrer']) {
$referrer .= "\n".$_GET['referrer'];
}
}
if(!has_online_operators($groupid)) {
$page = array();
setup_logo();
setup_leavemessage($visitor['name'],$email,$firstmessage,$groupid,$groupname,$info,$referrer,can_show_captcha());
expand("styles", getchatstyle(), "leavemessage.tpl");
exit;
}
$show_survey = $settings['enablepresurvey'] == '1'
&& (
!(isset($_POST['survey']) && $_POST['survey'] == 'on')
|| ($settings["surveyaskcaptcha"] == "1" && !empty($survey_captcha_failed))
);
if($show_survey) {
$page = array();
setup_logo();
if (!empty($survey_captcha_failed)) {
$errors[] = getlocal('errors.captcha');
}
setup_survey($visitor['name'], $email, $groupid, $info, $referrer, can_show_captcha());
expand("styles", getchatstyle(), "survey.tpl");
exit;
}
$remoteHost = get_remote_host();
$userbrowser = $_SERVER['HTTP_USER_AGENT'];
$link = connect();
if(!check_connections_from_remote($remoteHost, $link)) {
mysql_close($link);
die("number of connections from your IP is exceeded, try again later");
}
$thread = create_thread($groupid,$visitor['name'], $remoteHost, $referrer,$current_locale,$visitor['id'], $userbrowser,$state_loading,$link);
$_SESSION['threadid'] = $thread['threadid'];
if( $referrer ) {
post_message_($thread['threadid'],$kind_for_agent,getstring2('chat.came.from',array($referrer),true),$link);
}
post_message_($thread['threadid'],$kind_info,getstring('chat.wait', true),$link);
if($email) {
post_message_($thread['threadid'],$kind_for_agent,getstring2('chat.visitor.email',array($email),true),$link);
}
if($info) {
post_message_($thread['threadid'],$kind_for_agent,getstring2('chat.visitor.info',array($info),true),$link);
}
if($firstmessage) {
$postedid = post_message_($thread['threadid'],$kind_user,$firstmessage,$link,$visitor['name']);
if ($postedid) {
commit_thread( $thread['threadid'], array('shownmessageid' => intval($postedid)), $link);
}
}
notify_operators($thread, $firstmessage, $link);
mysql_close($link);
}
$threadid = $thread['threadid'];
$token = $thread['ltoken'];
$level = get_remote_level($_SERVER['HTTP_USER_AGENT']);
$chatstyle = verifyparam( "style", "/^\w+$/", "");
header("Location: $mibewroot/client.php?thread=$threadid&token=$token&level=$level".($chatstyle ? "&style=$chatstyle" : ""));
exit;
}
$token = verifyparam( "token", "/^\d{1,10}$/");
$threadid = verifyparam( "thread", "/^\d{1,10}$/");
$level = verifyparam( "level", "/^(ajaxed|simple|old)$/");
$thread = thread_by_id($threadid);
if( !$thread || !isset($thread['ltoken']) || $token != $thread['ltoken'] ) {
die("wrong thread");
}
setup_chatview_for_user($thread, $level);
$pparam = verifyparam( "act", "/^(mailthread)$/", "default");
if( $pparam == "mailthread" ) {
expand("styles", getchatstyle(), "mail.tpl");
} else if( $level == "ajaxed" ) {
expand("styles", getchatstyle(), "chat.tpl");
} else if( $level == "simple" ) {
expand("styles", getchatstyle(), "chatsimple.tpl");
} else if( $level == "old" ) {
expand("styles", getchatstyle(), "nochat.tpl");
}
?>

View File

@ -0,0 +1,336 @@
# This file contains current database schema that is used for installation.
# Do not change anything in this file unless you know what you are doing!
# Contains information about chat groups. This table cannot be named just
# "group" because it is reserved SQL word.
opgroup:
fields:
groupid: "int NOT NULL auto_increment PRIMARY KEY"
parent: "int DEFAULT NULL"
vcemail: "varchar(64)"
vclocalname: "varchar(64) NOT NULL"
vccommonname: "varchar(64) NOT NULL"
vclocaldescription: "varchar(1024) NOT NULL"
vccommondescription: "varchar(1024) NOT NULL"
iweight: "int NOT NULL DEFAULT 0"
vctitle: "varchar(255) DEFAULT ''"
vcchattitle: "varchar(255) DEFAULT ''"
vclogo: "varchar(255) DEFAULT ''"
vchosturl: "varchar(255) DEFAULT ''"
indexes:
parent: [parent]
# Contains info about chat threads
thread:
fields:
# ID of the thread.
threadid: "int NOT NULL auto_increment PRIMARY KEY"
# Name of the user in chat.
username: "varchar(64) NOT NULL"
# ID of the user. This field is foreign key for {sitevisitor}.userid
userid: "varchar(255)"
# Name of the operator who took place in the chat.
agentname: "varchar(64)"
# ID of the operator who took place in the chat.
agentid: "int NOT NULL DEFAULT 0"
# Unix timestamp of the moment when the thread was created.
dtmcreated: "int NOT NULL DEFAULT 0"
# Unix timestamp of the moment when chat actually started.
dtmchatstarted: "int NOT NULL DEFAULT 0"
# Unix timestamp of the last thread modification.
dtmmodified: "int NOT NULL DEFAULT 0"
# Unix timestamp of the moment when the thread was closed.
dtmclosed: "int NOT NULL DEFAULT 0"
# ID of the last thread revision.
lrevision: "int NOT NULL DEFAULT 0"
# State of the thread. It is one of Thread::STATE_* constants.
istate: "int NOT NULL DEFAULT 0"
# State of invitation related with the thread. It is one of
# Thread::INVITATION_* constants.
invitationstate: "int NOT NULL DEFAULT 0"
# Last token of the thread.
ltoken: "int NOT NULL"
# IP address of the user.
remote: "varchar(255)"
# Page from which chat thread was started.
referer: "text"
# ID of the operator who will next in the chat.
nextagent: "int NOT NULL DEFAULT 0"
# Code of chat locale.
locale: "varchar(8)"
# Unix timestamp of the last request from user's window to server.
lastpinguser: "int NOT NULL DEFAULT 0"
# Unix timestamp of the last request from operator's window to server.
lastpingagent: "int NOT NULL DEFAULT 0"
# Indicates if user typing or not. It can take two values 0 and 1.
usertyping: "int DEFAULT 0"
# Indicates if operator typing or not. It can take two values 0 and 1.
agenttyping: "int DEFAULT 0"
# ID of shown message in the chat.
shownmessageid: "int NOT NULL DEFAULT 0"
# User agent description that took from 'User-Agent' HTTP header.
useragent: "varchar(255)"
# Total count of user's messages related with the thread.
messagecount: "varchar(16)"
# ID of the group at Mibew Messenger side related with the thread.
groupid: "int references {opgroup}(groupid)"
# Contains "by thread" statistics
threadstatistics:
fields:
statid: "int NOT NULL auto_increment PRIMARY KEY"
date: "int NOT NULL DEFAULT 0"
threads: "int NOT NULL DEFAULT 0"
missedthreads: "int NOT NULL DEFAULT 0"
sentinvitations: "int NOT NULL DEFAULT 0"
acceptedinvitations: "int NOT NULL DEFAULT 0"
rejectedinvitations: "int NOT NULL DEFAULT 0"
ignoredinvitations: "int NOT NULL DEFAULT 0"
operatormessages: "int NOT NULL DEFAULT 0"
usermessages: "int NOT NULL DEFAULT 0"
averagewaitingtime: "FLOAT(10, 1) NOT NULL DEFAULT 0"
averagechattime: "FLOAT(10, 1) NOT NULL DEFAULT 0"
requestbuffer:
fields:
requestid: "int NOT NULL auto_increment PRIMARY KEY"
# Use MD5 hashes as keys
requestkey: "char(32) NOT NULL"
request: "text NOT NULL"
indexes:
requestkey: [requestkey]
requestcallback:
fields:
callbackid: "int NOT NULL auto_increment PRIMARY KEY"
token: "varchar(64) NOT NULL DEFAULT ''"
func: "varchar(64) NOT NULL"
arguments: "varchar(1024)"
indexes:
token: [token]
# Contains updated translations
translation:
fields:
translationid: "int NOT NULL auto_increment PRIMARY KEY"
locale: "varchar(5) NOT NULL"
context: "varchar(256) NOT NULL DEFAULT ''"
source: "text COLLATE utf8_bin"
translation: "text"
# An artificial unique key for the record. It is needed to avoid
# duplication of translation strings. The field contains SHA-1 hash of
# combination of locale, context and source fields. Native MySQL unique
# keys cannot be applied to them because "source" field has text data
# type.
hash: "char(40) NOT NULL"
unique_keys:
hash: [hash]
# Contains locales info
locale:
fields:
# Artificial primary key.
localeid: "int NOT NULL auto_increment PRIMARY KEY"
# Locale code
code: "varchar(5) NOT NULL"
# Human readable name of the locale.
name: "varchar(128) NOT NULL DEFAULT ''"
# Indicates if the locale is enabled or not.
enabled: "tinyint NOT NULL DEFAULT 0"
# Indicates if the locale uses RTL writing.
rtl: "tinyint NOT NULL DEFAULT 0"
# Name of the locale which is used with PHP's setlocale to format dates.
time_locale: "varchar(128) NOT NULL DEFAULT 'en_US'"
# Serialized array of various date formats.
date_format: "text"
unique_keys:
# Make sure locale code can be duplicated
code: [code]
# Contains localized mail templates
mailtemplate:
fields:
# Artificial primary key
templateid: "int NOT NULL auto_increment PRIMARY KEY"
# Locale code a template belongs to
locale: "varchar(5) NOT NULL"
# Machine name of a template
name: "varchar(256) NOT NULL"
# Mail subject
subject: "varchar(1024) NOT NULL"
# Mail body
body: "text"
# Store chat thread messages
message:
fields:
# Message ID.
messageid: "int NOT NULL auto_increment PRIMARY KEY"
# ID of the thread related with the message.
threadid: "int NOT NULL references {thread}(threadid)"
# Message kind. It is one of Thread::KIND_* constants.
ikind: "int NOT NULL"
# ID of operator who sent the message. This value will be ignored for
# system messages and messages which sent by users.
agentid: "int NOT NULL DEFAULT 0"
# Message text body.
tmessage: "text NOT NULL"
# Name of the plugin which sent the message. If message was not sent by
# a plugin this field equals to an empty string.
plugin: "varchar(256) NOT NULL DEFAULT ''"
# Arbitrary serialized data related with message.
data: "text"
# Unix timestamp when message was created.
dtmcreated: "int NOT NULL DEFAULT 0"
# Name of the message sender.
tname: "varchar(64)"
indexes:
idx_agentid: [agentid]
# Contains info about operators
operator:
fields:
operatorid: "int NOT NULL auto_increment PRIMARY KEY"
vclogin: "varchar(64) NOT NULL"
vcpassword: "varchar(64) NOT NULL"
vclocalename: "varchar(64) NOT NULL"
vccommonname: "varchar(64) NOT NULL"
vcemail: "varchar(64)"
dtmlastvisited: "int NOT NULL DEFAULT 0"
# Current status of an operator: 0 - online, 1 - away
istatus: "int DEFAULT 0"
idisabled: "int DEFAULT 0"
vcavatar: "varchar(255)"
# Operators privileges bitmask.
iperm: "int DEFAULT 0"
dtmrestore: "int NOT NULL DEFAULT 0"
vcrestoretoken: "varchar(64)"
# Use to start chat with specified operator.
code: "varchar(64) DEFAULT ''"
# Contains "by operator" statistics
operatorstatistics:
fields:
statid: "int NOT NULL auto_increment PRIMARY KEY"
date: "int NOT NULL DEFAULT 0"
operatorid: "int NOT NULL"
threads: "int NOT NULL DEFAULT 0"
messages: "int NOT NULL DEFAULT 0"
averagelength: "FLOAT(10, 1) NOT NULL DEFAULT 0"
sentinvitations: "int NOT NULL DEFAULT 0"
acceptedinvitations: "int NOT NULL DEFAULT 0"
rejectedinvitations: "int NOT NULL DEFAULT 0"
ignoredinvitations: "int NOT NULL DEFAULT 0"
indexes:
operatorid: [operatorid]
revision:
fields:
id: "INT NOT NULL PRIMARY KEY"
# Contains relations between operators and groups
operatortoopgroup:
fields:
groupid: "int NOT NULL references {opgroup}(groupid)"
operatorid: "int NOT NULL references {operator}(operatorid)"
indexes:
groupid: [groupid]
operatorid: [operatorid]
# Contains banned visitors
ban:
fields:
banid: "INT NOT NULL auto_increment PRIMARY KEY"
dtmcreated: "int NOT NULL DEFAULT 0"
dtmtill: "int NOT NULL DEFAULT 0"
address: "varchar(255)"
comment: "varchar(255)"
# Contains dynamic configs
config:
fields:
id: "INT NOT NULL auto_increment PRIMARY KEY"
vckey: "varchar(255)"
vcvalue: "varchar(255)"
# Contains canned messages
cannedmessage:
fields:
id: "INT NOT NULL auto_increment PRIMARY KEY"
locale: "varchar(8)"
groupid: "int references {opgroup}(groupid)"
vctitle: "varchar(100) NOT NULL DEFAULT ''"
vcvalue: "varchar(1024) NOT NULL"
sitevisitor:
fields:
visitorid: "INT NOT NULL auto_increment PRIMARY KEY"
userid: "varchar(255) NOT NULL"
username: "varchar(64)"
firsttime: "int NOT NULL DEFAULT 0"
lasttime: "int NOT NULL DEFAULT 0"
entry: "text NOT NULL"
details: "text NOT NULL"
invitations: "INT NOT NULL DEFAULT 0"
chats: "INT NOT NULL DEFAULT 0"
threadid: "INT references {thread}(threadid) on delete set null"
indexes:
threadid: [threadid]
visitedpage:
fields:
pageid: "INT NOT NULL auto_increment PRIMARY KEY"
address: "varchar(1024)"
visittime: "int NOT NULL DEFAULT 0"
visitorid: "INT"
# Indicates if path included in 'by page' statistics
calculated: "tinyint NOT NULL DEFAULT 0"
indexes:
visitorid: [visitorid]
# Contains "by page" statistics
visitedpagestatistics:
fields:
pageid: "INT NOT NULL auto_increment PRIMARY KEY"
date: "int NOT NULL DEFAULT 0"
address: "varchar(1024)"
visits: "int NOT NULL DEFAULT 0"
chats: "int NOT NULL DEFAULT 0"
sentinvitations: "int NOT NULL DEFAULT 0"
acceptedinvitations: "int NOT NULL DEFAULT 0"
rejectedinvitations: "int NOT NULL DEFAULT 0"
ignoredinvitations: "int NOT NULL DEFAULT 0"
# Contains info about installed plugins
plugin:
fields:
# Artificial ID
id: "INT NOT NULL auto_increment PRIMARY KEY"
# Plugin name in "<Vendor>:<Name>" format.
name: "varchar(255) NOT NULL"
# Installed version of the plugin.
version: "varchar(255) NOT NULL"
# Indicates if the plugin is installed or not.
installed: "tinyint NOT NULL DEFAULT 0"
# Indicates if the plugin is enabled or not.
enabled: "tinyint NOT NULL DEFAULT 0"
# Indicates if the plugin is initialized or not.
initialized: "tinyint NOT NULL DEFAULT 0"
unique_keys:
name: [name]
# Contains info about all available updates
availableupdate:
fields:
# Artificial ID
id: "INT NOT NULL auto_increment PRIMARY KEY"
# Can be either "core" or fully qualified plugin's name
target: "varchar(255) NOT NULL"
# The latest available version of the plugin
version: "varchar(255) NOT NULL"
# A URL where the new version can be downloaded
url: "text"
# Description of the update
description: "text"
unique_keys:
target: [target]

View File

@ -0,0 +1,98 @@
# IMPORTANT: Before install Mibew Messenger copy this file to config.yml and
# fill it with your own settings!
# MySQL Database parameters
database:
host: ""
port: 3306
db: ""
login: ""
pass: ""
tables_prefix: ""
use_persistent_connection: false
# Mail
## This value will be used as sender address in all e-mails Mibew Messenger send.
mailbox: mibew@yourdomain.com
## Mailer parameters
mailer:
# This value determines what kind of mailer will be used. Possible values
# are "mail" and "smtp".
#
# To use standard PHP mail function just set this option to "mail". No
# additional configs are required in this case.
#
# To use SMTP-based solution set this option "smtp". This approach require
# some extra configuration to be done (see below).
transport: mail
# The lines below represents default SMTP mailer configurations. They will
# be used only if the "transport" option is set to "smtp".
host: localhost
port: 25
user: user
pass: ""
# The following option determines what kind of encryption should be used.
# false means no encyption at all. Another values once can use are "ssl" and
# "tls".
encryption: false
# Cache subsystem
cache:
# This value determines where the cached data will be stored. Possible
# values are "none", "file_system" and "memcached".
#
# If "none" is used the caching will be disabled. This option should be used
# only if none of the other options works.
#
# If "file_system" is used the cached data will be stored in files within
# the "cache/" directory. Notice, that the file system storage does not work
# on NFS systems bucause exclusive file locks are not supported where.
#
# If "memcached" is used the cached data will be stored in Memcached
# storage. Before using this kind of storage make sure PHP's memcached
# extension is installed and enabled.
storage: file_system
# The lines below represents default Memcached server configurations. They
# will be used only if the "storage" option is set to "memcached".
memcached_servers:
- host: localhost
port: 11211
# The "weight" field is optional and can be omitted and it's only positive int number.
weight: 1
# Actually, one can use any number of memcached servers he wants. Just
# add servers description like the one above.
# Locales
## Native name will be used in this locale
home_locale: en
## If user does not provide known lang
default_locale: en
# A timezone to use. Leave this value empty to use the default timezone from the
# system settings. For the details about available timezones see
# http://php.net/manual/en/timezones.php
timezone: ""
# List of proxy's IP Mibew Messenger should trust. You should set this option
# if you use Mibew Messenger with a load balancer or behind a proxy.
trusted_proxies: []
# Here is an example of what values this option can take:
# trusted_proxies:
# - 127.0.0.1
# - ::1
# - 10.0.0.0/8
# Plugins
plugins: []
## Example of plugins configuration
# plugins:
# "VendorName:PluginName":
# weight: 100
# some_configurable_value: value
# "VendorName:AnotherPluginName":
# very_important_value: "$3.50"

View File

@ -0,0 +1,829 @@
# Chat actions
chat_thread_update:
path: /thread/update
defaults:
_controller: Mibew\Controller\Chat\ThreadController::updateAction
## Operator's chat
chat_operator:
path: /operator/chat/{thread_id}/{token}
defaults:
_controller: Mibew\Controller\Chat\OperatorChatController::indexAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
requirements:
thread_id: \d{1,10}
token: \d{1,10}
chat_operator_redirect:
path: /operator/chat/{thread_id}/{token}/redirect
defaults:
_controller: Mibew\Controller\Chat\RedirectController::redirectAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
requirements:
thread_id: \d{1,10}
token: \d{1,10}
chat_operator_start:
path: /operator/chat/{thread_id}
defaults:
_controller: Mibew\Controller\Chat\OperatorChatController::startAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
requirements:
thread_id: \d{1,10}
chat_operator_redirection_links:
path: /operator/chat/{thread_id}/{token}/redirection-links
defaults:
_controller: Mibew\Controller\Chat\RedirectController::showRedirectionLinksAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
requirements:
thread_id: \d{1,10}
token: \d{1,10}
## User's chat
chat_user:
path: /chat/{thread_id}/{token}
defaults:
_controller: Mibew\Controller\Chat\UserChatController::indexAction
requirements:
thread_id: \d{1,10}
token: \d{1,10}
chat_user_check:
path: /chat/{thread_id}/{token}/check
defaults:
_controller: Mibew\Controller\Chat\UserChatController::checkAction
requirements:
thread_id: \d{1,10}
token: \d{1,10}
chat_user_invitation:
path: /chat/invitation
defaults:
_controller: Mibew\Controller\Chat\UserChatController::invitationAction
chat_user_mail:
path: /chat/{thread_id}/{token}/mail
defaults:
_controller: Mibew\Controller\Chat\MailController::showFormAction
requirements:
thread_id: \d{1,10}
token: \d{1,10}
methods: [GET]
chat_user_mail_send:
path: /chat/{thread_id}/{token}/mail
defaults:
_controller: Mibew\Controller\Chat\MailController::submitFormAction
requirements:
thread_id: \d{1,10}
token: \d{1,10}
methods: [POST]
chat_user_popup_style:
path: /chat/style/popup/{style}
defaults:
_controller: Mibew\Controller\Chat\StyleController::loadPopupStyleAction
style: ""
requirements:
style: "[0-9A-Za-z_]*"
chat_user_popup_style_force_secure:
path: /chat/style/popup/{style}/force_secure
defaults:
_controller: Mibew\Controller\Chat\StyleController::loadPopupStyleAction
style: ""
force_secure: on
requirements:
style: "[0-9A-Za-z_]*"
chat_user_start:
path: /chat
defaults:
_controller: Mibew\Controller\Chat\UserChatController::startAction
chat_user_cookie_set_permission:
path: /chat/cookies-set-permission
defaults:
_controller: Mibew\Controller\Chat\UserChatController::cookieSetPermissionAction
# Pages that are available for all users
button:
path: /b
defaults: { _controller: Mibew\Controller\ButtonController::indexAction }
captcha:
path: /captcha
defaults: { _controller: Mibew\Controller\CaptchaController::drawAction }
cron:
path: /cron
defaults: { _controller: Mibew\Controller\CronController::runAction }
# A set of localization constants for the client side applications is generated
# dynamically
js_translation:
path: /locales/{locale}/translation.js
defaults:
_controller: Mibew\Controller\Localization\JsTranslationController::indexAction
widget_gateway:
path: /widget
defaults: { _controller: Mibew\Controller\WidgetController::indexAction }
# Operators' pages
## About page
about:
path: /operator/about
defaults:
_controller: Mibew\Controller\AboutController::indexAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
## Banned visitors
ban_add:
path: /operator/ban/add
defaults:
_controller: Mibew\Controller\BanController::showEditFormAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
methods: [GET]
ban_add_save:
path: /operator/ban/add
defaults:
_controller: Mibew\Controller\BanController::submitEditFormAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
methods: [POST]
ban_delete:
path: /operator/ban/{ban_id}/delete
defaults:
_controller: Mibew\Controller\BanController::deleteAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
requirements:
ban_id: \d{1,10}
ban_edit:
path: /operator/ban/{ban_id}/edit
defaults:
_controller: Mibew\Controller\BanController::showEditFormAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
requirements:
ban_id: \d{1,10}
methods: [GET]
ban_edit_save:
path: /operator/ban/{ban_id}/edit
defaults:
_controller: Mibew\Controller\BanController::submitEditFormAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
requirements:
ban_id: \d{1,10}
methods: [POST]
bans:
path: /operator/ban
defaults:
_controller: Mibew\Controller\BanController::indexAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
## Button code
button_code:
path: /operator/button-code
defaults:
_controller: Mibew\Controller\ButtonCodeController::generateAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
## Canned messages
canned_message_add:
path: /operator/canned-message/add
defaults:
_controller: Mibew\Controller\CannedMessageController::showEditFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [GET]
canned_message_add_save:
path: /operator/canned-message/add
defaults:
_controller: Mibew\Controller\CannedMessageController::submitEditFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [POST]
canned_message_delete:
path: /operator/canned-message/{message_id}/delete
defaults:
_controller: Mibew\Controller\CannedMessageController::deleteAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
message_id: \d{1,10}
canned_message_edit:
path: /operator/canned-message/{message_id}/edit
defaults:
_controller: Mibew\Controller\CannedMessageController::showEditFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
message_id: \d{1,10}
methods: [GET]
canned_message_edit_save:
path: /operator/canned-message/{message_id}/edit
defaults:
_controller: Mibew\Controller\CannedMessageController::submitEditFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
message_id: \d{1,10}
methods: [POST]
canned_messages:
path: /operator/canned-message
defaults:
_controller: Mibew\Controller\CannedMessageController::indexAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
## Groups
group_add:
path: /operator/group/add
defaults:
_controller: Mibew\Controller\Group\SettingsController::showFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [GET]
group_add_save:
path: /operator/group/add
defaults:
_controller: Mibew\Controller\Group\SettingsController::submitFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [POST]
group_delete:
path: /operator/group/{group_id}/delete
defaults:
_controller: Mibew\Controller\Group\ManagementController::deleteAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
group_id: \d{1,10}
group_edit:
path: /operator/group/{group_id}/edit
defaults:
_controller: Mibew\Controller\Group\SettingsController::showFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
group_id: \d{1,10}
methods: [GET]
group_edit_save:
path: /operator/group/{group_id}/edit
defaults:
_controller: Mibew\Controller\Group\SettingsController::submitFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
group_id: \d{1,10}
methods: [POST]
group_members:
path: /operator/group/{group_id}/members
defaults:
_controller: Mibew\Controller\Group\MembersController::showFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
group_id: \d{1,10}
methods: [GET]
group_members_save:
path: /operator/group/{group_id}/members
defaults:
_controller: Mibew\Controller\Group\MembersController::submitFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
group_id: \d{1,10}
methods: [POST]
groups:
path: /operator/group
defaults:
_controller: Mibew\Controller\Group\ManagementController::indexAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
## History
history:
path: /operator/history
defaults:
_controller: Mibew\Controller\HistoryController::indexAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
history_thread:
path: /operator/history/thread/{thread_id}
defaults:
_controller: Mibew\Controller\HistoryController::threadAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
requirements:
thread_id: \d{1,10}
history_user:
path: /operator/history/user/{user_id}
defaults:
_controller: Mibew\Controller\HistoryController::userAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
requirements:
user_id: .{0,63}
history_user_track:
path: /operator/history/user-track
defaults:
_controller: Mibew\Controller\HistoryController::userTrackAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
## Home
home:
path: /
defaults:
_controller: Mibew\Controller\HomeController::redirectAction
home_operator:
path: /operator
defaults:
_controller: Mibew\Controller\HomeController::dashboardAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
## Invitations
invite:
path: /operator/invite
defaults:
_controller: Mibew\Controller\InvitationController::inviteAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
## Locales
locale_disable:
path: /operator/locale/{locale}/disable
defaults:
_controller: Mibew\Controller\Localization\LocaleController::disableAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
locale: "[a-z\\-]{2,5}"
locale_edit:
path: /operator/locale/{locale}/edit
defaults:
_controller: Mibew\Controller\Localization\LocaleController::showEditFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
locale: "[a-z\\-]{2,5}"
methods: [GET]
locale_edit_save:
path: /operator/locale/{locale}/edit
defaults:
_controller: Mibew\Controller\Localization\LocaleController::submitEditFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
locale: "[a-z\\-]{2,5}"
methods: [POST]
locale_enable:
path: /operator/locale/{locale}/enable
defaults:
_controller: Mibew\Controller\Localization\LocaleController::enableAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
locale: "[a-z\\-]{2,5}"
locales:
path: /operator/locale
defaults:
_controller: Mibew\Controller\Localization\LocaleController::indexAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
## Log in
login:
path: /operator/login
defaults:
_controller: Mibew\Controller\LoginController::showFormAction
methods: [GET]
login_submit:
path: /operator/login
defaults:
_controller: Mibew\Controller\LoginController::submitFormAction
methods: [POST]
## Log out
logout:
path: /operator/logout
defaults:
_controller: Mibew\Controller\LogoutController::logoutAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
## Mail templates
mail_template_edit:
path: /operator/mail-template/{name}/edit
defaults:
_controller: Mibew\Controller\MailTemplateController::showEditFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [GET]
requirements:
name: "[A-Za-z0-9_]+"
mail_template_edit_save:
path: /operator/mail-template/{name}/edit
defaults:
_controller: Mibew\Controller\MailTemplateController::submitEditFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [POST]
requirements:
name: "[A-Za-z0-9_]+"
mail_templates:
path: /operator/mail-template
defaults:
_controller: Mibew\Controller\MailTemplateController::indexAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
## Operators
operator_add:
path: /operator/operator/add
defaults:
_controller: Mibew\Controller\Operator\ProfileController::showFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [GET]
operator_add_save:
path: /operator/operator/add
defaults:
_controller: Mibew\Controller\Operator\ProfileController::submitFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [POST]
operator_avatar:
path: /operator/operator/{operator_id}/avatar
defaults:
_controller: Mibew\Controller\Operator\AvatarController::showFormAction
_access_check: Mibew\AccessControl\Check\OperatorViewCheck
requirements:
operator_id: \d{1,10}
methods: [GET]
operator_avatar_delete:
path: /operator/operator/{operator_id}/avatar/delete
defaults:
_controller: Mibew\Controller\Operator\AvatarController::deleteAction
_access_check: Mibew\AccessControl\Check\OperatorEditCheck
requirements:
operator_id: \d{1,10}
operator_avatar_save:
path: /operator/operator/{operator_id}/avatar
defaults:
_controller: Mibew\Controller\Operator\AvatarController::submitFormAction
_access_check: Mibew\AccessControl\Check\OperatorEditCheck
requirements:
operator_id: \d{1,10}
methods: [POST]
operator_edit:
path: /operator/operator/{operator_id}/edit
defaults:
_controller: Mibew\Controller\Operator\ProfileController::showFormAction
_access_check: Mibew\AccessControl\Check\OperatorViewCheck
requirements:
operator_id: \d{1,10}
methods: [GET]
operator_edit_save:
path: /operator/operator/{operator_id}/edit
defaults:
_controller: Mibew\Controller\Operator\ProfileController::submitFormAction
_access_check: Mibew\AccessControl\Check\OperatorEditCheck
requirements:
operator_id: \d{1,10}
methods: [POST]
operator_enable:
path: /operator/operator/{operator_id}/enable
defaults:
_controller: Mibew\Controller\Operator\ManagementController::enableAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
operator_id: \d{1,10}
operator_delete:
path: /operator/operator/{operator_id}/delete
defaults:
_controller: Mibew\Controller\Operator\ManagementController::deleteAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
operator_id: \d{1,10}
operator_disable:
path: /operator/operator/{operator_id}/disable
defaults:
_controller: Mibew\Controller\Operator\ManagementController::disableAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
operator_id: \d{1,10}
operator_groups:
path: /operator/operator/{operator_id}/groups
defaults:
_controller: Mibew\Controller\Operator\GroupsController::showFormAction
_access_check: Mibew\AccessControl\Check\OperatorViewCheck
requirements:
operator_id: \d{1,10}
methods: [GET]
operator_groups_save:
path: /operator/operator/{operator_id}/groups
defaults:
_controller: Mibew\Controller\Operator\GroupsController::submitFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
operator_id: \d{1,10}
methods: [POST]
operator_permissions:
path: /operator/operator/{operator_id}/permissions
defaults:
_controller: Mibew\Controller\Operator\PermissionsController::showFormAction
_access_check: Mibew\AccessControl\Check\OperatorViewCheck
requirements:
operator_id: \d{1,10}
methods: [GET]
operator_permissions_save:
path: /operator/operator/{operator_id}/permissions
defaults:
_controller: Mibew\Controller\Operator\PermissionsController::submitFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
operator_id: \d{1,10}
methods: [POST]
operators:
path: /operator/operator
defaults:
_controller: Mibew\Controller\Operator\ManagementController::indexAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
## Password recovery
password_recovery:
path: /operator/password-recovery
defaults:
_controller: Mibew\Controller\PasswordRecoveryController::indexAction
password_recovery_reset:
path: /operator/password-recovery/reset
defaults:
_controller: Mibew\Controller\PasswordRecoveryController::resetAction
## Plugins
plugin_enable:
path: /operator/plugin/{plugin_name}/enable
defaults:
_controller: Mibew\Controller\PluginController::enableAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
plugin_disable:
path: /operator/plugin/{plugin_name}/disable
defaults:
_controller: Mibew\Controller\PluginController::disableAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
plugin_uninstall:
path: /operator/plugin/{plugin_name}/uninstall
defaults:
_controller: Mibew\Controller\PluginController::uninstallAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
plugin_update:
path: /operator/plugin/{plugin_name}/update
defaults:
_controller: Mibew\Controller\PluginController::updateAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
plugins:
path: /operator/plugin
defaults:
_controller: Mibew\Controller\PluginController::indexAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
## Settings
settings_common:
path: /operator/settings
defaults:
_controller: Mibew\Controller\Settings\CommonController::showFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [GET]
settings_common_save:
path: /operator/settings
defaults:
_controller: Mibew\Controller\Settings\CommonController::submitFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [POST]
settings_features:
path: /operator/settings/features
defaults:
_controller: Mibew\Controller\Settings\FeaturesController::showFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [GET]
settings_features_save:
path: /operator/settings/features
defaults:
_controller: Mibew\Controller\Settings\FeaturesController::submitFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [POST]
settings_performance:
path: /operator/settings/performance
defaults:
_controller: Mibew\Controller\Settings\PerformanceController::showFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [GET]
settings_performance_save:
path: /operator/settings/performance
defaults:
_controller: Mibew\Controller\Settings\PerformanceController::submitFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [POST]
## Statistics
statistics:
path: /operator/statistics/{type}
defaults:
type: "by-date"
_controller: Mibew\Controller\StatisticsController::indexAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_VIEWSTATISTICS]
requirements:
type: by-date|by-operator|by-page
## Styles
style_preview:
path: /operator/style/{type}/preview
defaults:
_controller: Mibew\Controller\StyleController::previewAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
type: chat|invitation|page
## Translation
translation_edit:
path: /operator/translation/{string_id}/edit
defaults:
_controller: Mibew\Controller\Localization\TranslationController::showEditFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
string_id: "\\d{1,10}"
methods: [GET]
translation_edit_save:
path: /operator/translation/{string_id}/edit
defaults:
_controller: Mibew\Controller\Localization\TranslationController::submitEditFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
requirements:
string_id: "\\d{1,10}"
methods: [POST]
translation_export:
path: /operator/translation/export
defaults:
_controller: Mibew\Controller\Localization\TranslationExportController::showFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [GET]
translation_export_process:
path: /operator/translation/export
defaults:
_controller: Mibew\Controller\Localization\TranslationExportController::submitFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [POST]
translation_import:
path: /operator/translation/import
defaults:
_controller: Mibew\Controller\Localization\TranslationImportController::showFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [GET]
translation_import_process:
path: /operator/translation/import
defaults:
_controller: Mibew\Controller\Localization\TranslationImportController::submitFormAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
methods: [POST]
translations:
path: /operator/translation
defaults:
_controller: Mibew\Controller\Localization\TranslationController::indexAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
## Updates
update:
path: /update
defaults:
_controller: Mibew\Controller\UpdateController::indexAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
update_run:
path: /update/run
defaults:
_controller: Mibew\Controller\UpdateController::runUpdateAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
update_check:
path: /update/check
defaults:
_controller: Mibew\Controller\UpdateController::checkUpdatesAction
_access_check: Mibew\AccessControl\Check\PermissionsCheck
_access_permissions: [CAN_ADMINISTRATE]
## Users (visitors avaiting page)
users:
path: /operator/users
defaults:
_controller: Mibew\Controller\UsersController::indexAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
users_update:
path: /operator/users/update
defaults:
_controller: Mibew\Controller\UsersController::updateAction
_access_check: Mibew\AccessControl\Check\LoggedInCheck
# System routes and includes
# The following route is a fake and is used only to load plugins routes. It can
# have any unique name.
_include_pluign_routes:
# Resource name has no meaning and can be any value.
resource: .
# The type actually indicates that plugins routes should be included.
type: plugin
# Remove trailing slashes. This route is the last one because previous rotes can
# (but definitely should not) have trailing slashes.
remove_trailing_slash:
path: /{url}
defaults:
_controller: Mibew\Controller\RedirectController::removeTrailingSlashAction
requirements:
url: .*/$
methods: [GET]

View File

@ -0,0 +1,60 @@
# The following route is a fake and is used only to load routes of the core. It
# can have any unique name.
_include_core_routes:
resource: routing.yml
type: yaml
# Override the home route to allow users use <mibew root>/install.php path to
# the installer.
home:
path: /
defaults:
_controller: Mibew\Controller\InstallController::indexAction
install:
path: /install
defaults:
_controller: Mibew\Controller\InstallController::indexAction
install_check_requirements:
path: /install/check-requirements
defaults:
_controller: Mibew\Controller\InstallController::checkRequirementsAction
_access_check: Mibew\AccessControl\Check\CanInstallCheck
install_check_connection:
path: /install/check-connection
defaults:
_controller: Mibew\Controller\InstallController::checkConnectionAction
_access_check: Mibew\AccessControl\Check\CanInstallCheck
install_create_tables:
path: /install/create-tables
defaults:
_controller: Mibew\Controller\InstallController::createTablesAction
_access_check: Mibew\AccessControl\Check\CanInstallCheck
install_set_password:
path: /install/set-password
defaults:
_controller: Mibew\Controller\InstallController::showPasswordFormAction
_access_check: Mibew\AccessControl\Check\CanInstallCheck
methods: [GET]
install_set_password_submit:
path: /install/set-password
defaults:
_controller: Mibew\Controller\InstallController::submitPasswordFormAction
_access_check: Mibew\AccessControl\Check\CanInstallCheck
methods: [POST]
install_import_locales:
path: /install/import-locales
defaults:
_controller: Mibew\Controller\InstallController::importLocalesAction
_access_check: Mibew\AccessControl\Check\CanInstallCheck
install_done:
path: /install/done
defaults:
_controller: Mibew\Controller\InstallController::doneAction

52
src/mibew/cron.php Normal file
View File

@ -0,0 +1,52 @@
<?php
/*
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Initialize libraries
require_once(dirname(__FILE__) . '/libs/init.php');
use Mibew\Cache\CacheFactory;
use Mibew\Maintenance\CronWorker;
use Mibew\Plugin\PluginManager;
$configs = load_system_configs();
// Prepare the cache. It is initialized in the same way as in index.php
$cache_factory = new CacheFactory($configs['cache']);
// For now directory for cache files cannot be changed via the configs file.
$cache_factory->setOption('path', MIBEW_FS_ROOT . '/cache/stash');
// Run plugins
if (get_maintenance_mode() === false) {
$plugin_manager = PluginManager::getInstance();
$plugin_manager->setCache($cache_factory->getCache());
$plugin_manager->loadPlugins($configs['plugins']);
}
// Do the job.
$worker = new CronWorker($cache_factory->getCache());
$success = $worker->run();
if ($success) {
echo("All cron jobs done\n");
} else {
echo("Cron job failed. Here are the errors:\n");
foreach ($worker->getErrors() as $error) {
echo(' ' . $error . "\n");
}
}

View File

@ -1,921 +0,0 @@
/*
* Copyright 2005-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* reset all */
html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, blockquote, pre, form, fieldset, table, th, td { margin: 0; padding: 0; }
table { border-collapse:collapse; border-spacing:0; }
fieldset,img { border:0; }
ol,ul { list-style:none; }
h1,h2,h3,h4,h5,h6 { font-size:100%; font-weight:normal; }
q:before,q:after { content:''; }
body {
background: #FFFFFF url(images/header.gif) repeat-x;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 0.8em;
line-height: 140%;
color: #333333;
}
/* 100% height with footer, 200 px sidebar */
html, body {
height: 100%;
}
body {
min-width: 750px;
}
a {
color: #2f7599;
}
#wrap400, #wrap700, #fixedwrap {
position:relative;
margin: 0px auto -41px;
height:auto !important;
height:100%;
min-height:100%;
}
#wrap400 {
width: 100%;
min-width:450px;
}
#wrap700 {
width: 100%;
min-width:750px;
}
#fixedwrap {
width: 750px;
}
.contentdiv {
float:left;
width: 100%;
}
.contentinner {
margin-right: 210px;
padding: 10px 60px 10px 20px;
overflow: hidden;
}
.contentnomenu {
padding: 10px 60px 10px 20px;
}
.empty_inner {
height:40px;
}
#footer {
background: white url(images/footer.gif) bottom repeat-x;
font-size:11px;
position:relative;
min-height: 40px;
height:40px;
vertical-align:middle;
width:100%;
text-align: center;
}
#legal {
clear: both;
line-height: 30px;
padding-top:10px;
text-align: center;
color: #375C69;
margin-bottom: 0px;
}
#footer .flink {
color: #2f7599;
text-decoration: underline;
}
#togglediv {
float:right;
padding-right:10px;
}
/* Header */
#header {
width: 100%;
height: 32px;
margin: 0px -2px 10px 0px;
padding-top: 10px;
padding-bottom: 10px;
background: url(images/graydot.gif) repeat-x left bottom;
display: block;
}
#header {
float: left;
}
img.left {
float: left;
margin-right: 15px;
}
img.logo {
margin-top: 2px;
}
#header h1 {
font-size: 2em;
line-height: 32px;
color: #494949;
margin-left: 40px;
}
#header h1 a {
color: #494949;
}
#header a {
text-decoration: none;
}
#title {
float: left;
display: inline;
}
#path {
float: right;
padding: 10px 20px 0px 0px;
line-height: 22px;
display: inline;
}
/* Sidebar */
#sidebar {
float: left;
width: 185px;
margin-left: -210px;
margin-top: 20px;
position:relative;
line-height: 180%
}
#sidebar ul {
margin: 0;
padding: 0;
list-style: none;
}
#sidebar li {
margin-bottom: 20px;
}
#sidebar li ul {
}
#sidebar li li {
margin: 0;
}
#sidebar h2 {
text-transform: lowercase;
margin-bottom: 10px;
background: url(images/graydot.gif) repeat-x left bottom;
font-size: 1.3em;
font-weight: bold;
}
.locales a {
color: #2f7599;
font-size: 1em;
text-decoration: none;
}
.locales .active a {
color: #555;
}
.locales a:hover {
text-decoration: underline;
}
.submenu a {
padding-left: 15px;
color: #2f7599;
font-size: 1em;
text-decoration: none;
}
.submenu a.inner { padding-left: 0px; }
.submenu span.small { font-size: 80%; padding-left: 5px; }
.submenu .active a {
background: url(images/li.gif) no-repeat left 1px;
color: #555;
}
.submenu .active a.inner {
background: none;
}
.submenu a:hover {
text-decoration: underline;
}
/* form, tabbed form */
.mform {
background: url(images/loginbg.gif);
clear: both;
width: 100%;
}
.tabs {
float: right;
margin-left: 15px;
display: inline;
margin-right: 15px;
}
.tabs li {
display: inline;
}
.tabs a {
display: block;
float: left;
padding: 2px 9px 3px 9px;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #2f7599;
}
.tabs li.active a {
background: url(images/loginbg.gif);
border-left:1px solid #bbbbbb;border-top:1px solid #bbbbbb;border-right:1px solid #bbbbbb;
color: #000;
text-decoration: none;
}
.formtop, .formbottom, .formtopi, .formbottomi { height: 15px;}
.formtop { background: url(images/logincrnrt.gif) no-repeat top right;}
.formtopi { background: url(images/logincrnlt.gif) no-repeat top left; }
.formbottom { background: url(images/logincrnrb.gif) no-repeat bottom right; }
.formbottomi { background: url(images/logincrnlb.gif) no-repeat bottom left; }
.forminner { margin: 0px 15px;}
.forminner p { margin-bottom: 1em; }
/* fieldForm */
.fieldForm {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
width: 100%;
}
.packedFormField {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
float:left;
margin-right:25px;
margin-bottom:8px;
}
.packedFormField select {
min-width: 130px;
}
div.errinfo {
color: #c13030;
}
.field {
width: 100%;
margin-top: 5px;
}
.flabel {
position: relative;
margin: 8px auto 2px;
color: black;
}
.fleftlabel {
float: left;
width: 11em;
}
.flabel span.required {
font-size:8.0pt;
color:red;
font-weight: bold;
}
.field .subfield {
padding-left: 30px;
background: url(images/subitem.gif) no-repeat 10px 2px;
}
.fieldinrow {
min-width: 300px;
display: inline;
float:left;
width: 45%;
}
.fvalue {
float: left;
}
.fvaluewithta {
float: left;
width: 67%;
}
.fvaluewithta textarea {
width: 100%;
}
.fvaluenodesc {
}
.fvalueframe {
overflow: auto;
width: 100%;
}
.fvalueframe iframe {
border: solid 1px #999;
}
.fdescr {
float:left;
padding-left:10px;
color: #676767;
font-size: 10px;
min-width: 200px;
}
.fbutton {
background: url(images/formline.gif) repeat-x;
margin-top: 20px;
padding-top: 10px;
}
.fbutton .links {
float: right;
margin-top: 5px;
}
.fbutton .submitbutton {
float: left;
}
.formauth {
}
textarea.wide {
border:1px solid #878787;
overflow:auto;
width: 95%;
}
input.formauth {
border: 1px solid #878787;
color: #333;
margin-right:15px;
padding-right: 0px;
}
#formmessage {
border: 1px solid #4C96D4;
background-color: #E7F1F9;
padding: 8px 11px;
font-size: 0.85em;
font-weight:bold;
max-width: 700px;
margin: -10px 2px 10px;
color: #515151;
}
#offwarn {
border: 1px solid #4CD496;
background-color: #E7F9F1;
color: #515151;
padding: 8px 11px;
font-size: 0.85em;
font-weight:bold;
line-height: 140%;
margin: 0px;
}
#offwarn img {
margin-top: .4em;
float: left;
padding-right: 10px;
}
.asterisk {
padding: 10px 20px;
}
/* tables */
.tabletool {
float: right;
}
.tabletool a {
color: #296685;
vertical-align: top;
padding-left: 4px;
}
.tabletitle {
background: url(images/graydot.gif) repeat-x left bottom;
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size: 1.4em;
margin: 10px 0px 20px;
padding-bottom: 10px;
color: #1D485E;
font-weight: bold;
}
table.list, table.translate, table.statistics {
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
background: #fff;
width: 100%;
border-collapse: collapse;
text-align: left;
}
table.list th, table.translate th, table.statistics th {
font-size: 1.2em;
font-weight: normal;
padding: 10px 8px;
border-bottom: 2px solid #2F7598;
}
table.list th, table.translate th { color: #1D485E; }
table.statistics th { color: #2F7598; }
table.list td, table.statistics td {
color: #2f7599;
padding: 10px 8px;
border-bottom: 1px solid #ccc;
}
table.translate td {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #515151;
padding: 2px 8px;
border-bottom: 1px solid #ccc;
}
table.list td a.man {
background: url(images/tbliclogin.gif) no-repeat left center;
padding-left: 15px;
}
table.list td a.mail {
background: url(images/mail.png) no-repeat left center;
padding-left: 24px;
}
table.list td a.xmpp {
background: url(images/xmpp.png) no-repeat left center;
padding-left: 24px;
}
table.list tbody tr:hover td, table.list tbody tr:hover td a, table.statistics tbody tr:hover td {
color: #1D485E;
}
/* awaiting */
table.awaiting {
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
background: #fff;
width: 100%;
border-collapse: collapse;
text-align: left;
}
table.awaiting th {
font-size: 1.2em;
font-weight: normal;
color: #1D485E;
padding: 10px 8px;
border-bottom: 2px solid #2F7598;
text-align: center;
}
table.awaiting th.first {
text-align: left;
}
table.awaiting table.inner {
border: none;
width: 100%;
}
table.awaiting table.inner .icon {
width: 30px;
text-align: center;
}
table.awaiting td.visitor {
color: #296685;
border-bottom: 1px solid #ccc;
padding: 10px 8px;
margin: 0px;
}
.awaiting .visitor a { color: #296685; }
.awaiting tr:hover .visitor, .awaiting tr:hover .visitor a { color: #1D485E; }
.awaiting tr.ban .visitor, .awaiting tr.ban .visitor a { color: #9AC8E0; }
.awaiting tr.ban:hover .visitor, .awaiting tr.ban:hover .visitor a { color: #4C9CC8; }
.awaiting tr.inwait .visitor, .awaiting tr.inwait a { font-weight: bold; }
.awaiting tr.inprio .visitor, .awaiting tr.inprio a { font-weight: bold; font-size: 1.05em; }
.awaiting tr.inchat .visitor, .awaiting tr.inchat .visitor a { color: #777; }
.awaiting tr.inchat:hover .visitor, .awaiting tr.inchat:hover .visitor a { color: #444; }
.awaiting tr.inchat a { text-decoration: none; }
.firstmessage {
text-align: right;
font-size: 0.8em;
padding-right: 10px;
}
.firstmessage a {
text-decoration: none;
}
.firstmessage a:hover {
text-decoration: underline;
}
#connstatus {
float:right;
margin: 10px 10px;
}
#connlinks {
margin: 10px 10px;
}
#connlinks a {
color: #777;
text-decoration: none;
}
#connlinks a:hover {
text-decoration: underline;
}
/* online operators */
#onlineoperators {
padding-right: 10px;
float: right;
}
/* search */
#searchtext {
float:left;
display: inline;
margin:7px 20px 5px 0px;
width:75%;
padding-right:5px;
}
.searchctrl {
float: left;
margin:7px 20px 5px 0px;
padding-right:5px;
display: inline;
}
#searchtext input {
width: 100%;
margin: 0px;
}
#searchbutton {
float:left;
}
/* login */
#loginsmallpane {
float: right;
padding: 10px 15px 0px 0px;
margin-right: 0px;
line-height: 22px;
display: inline;
}
#loginsmallpane input {
margin: 0px 3px;
padding: 0px 2px;
}
#loginsmallpane .butt {
height: 1.3em;
border: 0px;
background: none;
}
#loginsmallpane .butt:hover {
background: #aaa;
}
#loginintro {
width: 400px;
margin: 10px 30px;
}
#loginpane {
width: 400px;
margin: 30px 30px;
}
#loginpane .header h2 {
font-size: 2em;
margin-bottom: 0.9em;
padding-bottom: 0.8em;
border-bottom: 2px solid #2F7598;
}
/* nice button */
#confirmpane {
width:450px;
margin:0px auto 5px;
padding-top: 70px;
}
.nicebutton {
border: none;
float: left;
margin-left: 30px;
}
.submit a {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
line-height: 35px;
color: #000000;
text-decoration: none;
}
.submit {
background: url(images/submitbg.gif) repeat-x;
vertical-align: top;
}
/* thread log */
.logpane {
margin: 10px 0px;
line-height: 150%;
}
.logpane .header {
padding-bottom: 0.8em;
border-bottom: 2px solid #2F7598;
}
.logpane .wlabel {
width: 10em;
float: left;
margin-right:10px;
}
.logpane .wvalue {
float: left;
}
/* dashboard */
#dashboard {
width: 100%;
}
.dashitem {
width:33%;
margin: 0px 2em 5em 0px;
padding: 5px 2em 5em;
vertical-align: top;
}
.dashitem:hover {
}
.dashitem a {
padding-top:2px;
padding-bottom: 10px;
display: block;
}
.dashitem img, #dashlocalesPopup h2 img {
float: left;
padding-right:10px;
width: 24px;
height: 24px;
}
#dashlocalesPopup h2 img {
margin-top: -3px;
}
#dashlocalesPopup .locales {
line-height: 180%;
margin-left:10px;
}
#dashlocalesPopup h2 {
font-size: 1.5em;
margin-bottom: 0.9em;
padding: 5px 30px 0.8em 0px;
border-bottom: 2px solid #2F7598;
}
#dashlocalesPopupClose {
float: right;
position:absolute;
right:5px;
top:5px;
}
#dashlocalesPopup {
display:none;
position:fixed;
_position:absolute; /* ie6*/
background:#FFFFFF;
border:2px solid #2F7598;
z-index:110;
padding:1em 1em;
font-size:1em;
}
#backgroundPopup{
display:none;
position:fixed;
_position:absolute; /* ie6*/
height:100%;
opacity: .5;
width:100%;
top:0;
left:0;
background:#000000;
border:1px solid #cecece;
z-index:101;
}
/* install */
#install li {
list-style-type: circle;
list-style-position: inside;
margin-left: 2em;
}
#check-nv, #check-nm {
color: #2f7599;
text-decoration: none;
}
#check-nv:hover, #check-nm:hover {
text-decoration: underline;
}
/* chat */
.message {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #4F4F4F;
padding: 15px 0px 0px 0px;
line-height: 17px;
}
.message span.time {
color: #000000;
}
.message span.nuser {
color: #B11E23;
font-weight: bold;
}
.message span.nagent {
font-weight: bold;
}
.message span.minf {
color: #1E48B1;
font-size: 11px;
}
.message span.mevent {
color: #A1A1A1;
font-size: 11px;
}
.message span.mhidden {
color: #A1A1A1;
font-size: 11px;
}
.message span.mconn {
color: #A1A1A1;
font-size: 11px;
}
/* updates */
#news {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
margin-bottom:15px;
padding:4px;
}
.newstext {
margin-bottom:1em;
}
/* rtl rules */
.lrtl .dashitem img, .lrtl #dashlocalesPopup h2 img, .lrtl #offwarn img {
float: right;
padding-right:0px;
padding-left:10px;
}
.lrtl .fleftlabel {
float: right;
width: 11em;
}
.lrtl .fdescr {
float:right;
padding-right:10px;
}
.lrtl .field .subfield {
padding-right: 30px;
background: url(images/subitem_rtl.gif) no-repeat 99% 2px;
}
.lrtl .fvalue {
float: right;
}
.lrtl .logpane .wlabel {
float: right;
margin-left:10px;
}
.lrtl .logpane .wvalue {
float: right;
}
.lrtl .fvaluewithta {
float: right;
}
.lrtl #togglediv {
float:left;
padding-left:10px;
}

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,19 +0,0 @@
"34aL volume 3.1" icons set
Ammount of icons:
60
Colors:
Colored, grey
Icon Sizes:
24x24
File Types:
.ico (RGBA, 256 color, 16 color),
.tiff (RGBA)
.gif (indexed)
.bmp (RGB - 1 color background),
.png (RGBA)
Note: These icons are free for use.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 B

View File

@ -1,6 +1,8 @@
<?php <?php
/* /*
* Copyright 2005-2014 the original author or authors. * This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -15,7 +17,58 @@
* limitations under the License. * limitations under the License.
*/ */
header("Location: operator/index.php"); // Initialize libraries
exit; require_once(dirname(__FILE__) . '/libs/init.php');
?> use Mibew\Application;
use Mibew\Authentication\AuthenticationManager;
use Mibew\Cache\CacheFactory;
use Mibew\Mail\MailerFactory;
use Mibew\Plugin\PluginManager;
use Mibew\Routing\Router;
use Mibew\Routing\Loader\CacheLoader;
use Mibew\Routing\Loader\PluginLoader;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Loader\LoaderResolver;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Loader\YamlFileLoader;
$configs = load_system_configs();
// Prepare the cache
$cache_factory = new CacheFactory($configs['cache']);
// For now directory for cache files cannot be changed via the configs file.
// TODO: Evaluate possibility of using custom cache directory.
$cache_factory->setOption('path', MIBEW_FS_ROOT . '/cache/stash');
// Run plugins
if (get_maintenance_mode() === false) {
$plugin_manager = PluginManager::getInstance();
$plugin_manager->setCache($cache_factory->getCache());
$plugin_manager->loadPlugins($configs['plugins']);
}
// The main route loader which loads nothig but works as a cache proxy for other
// loaders.
$route_loader = new CacheLoader($cache_factory->getCache());
// Real loaders are attached via the resolver.
$loader_resolver = new LoaderResolver(array(
$route_loader,
new YamlFileLoader(new FileLocator(array(MIBEW_FS_ROOT))),
new PluginLoader(),
));
$router = new Router($route_loader, 'configs/routing.yml');
$application = new Application($router, new AuthenticationManager());
$application->setCache($cache_factory->getCache());
// Use custom config-dependent mailer factory
$application->setMailerFactory(new MailerFactory($configs['mailer']));
// Process request
$request = Request::createFromGlobals();
$response = $application->handleRequest($request);
// Send response to the user
$response->send();

View File

@ -0,0 +1,23 @@
<?php
/*
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Force the user to specify the entry point. This should be done only when
// mod_rewrite is not used by apache.
header('HTTP/1.0 301 Moved Permanently');
header('Location: index.php');

50
src/mibew/install.php Normal file
View File

@ -0,0 +1,50 @@
<?php
/*
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
define('MAINTENANCE_MODE', 'install');
// Initialize libraries
require_once(dirname(__FILE__) . '/libs/init.php');
use Mibew\Application;
use Mibew\Authentication\DummyAuthenticationManager;
use Mibew\Routing\Loader\DummyPluginLoader;
use Mibew\Routing\Router;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Loader\LoaderResolver;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Loader\YamlFileLoader;
// Prepare router
$file_locator = new FileLocator(array(MIBEW_FS_ROOT));
$route_loader = new YamlFileLoader($file_locator);
$loader_resolver = new LoaderResolver(array(
$route_loader,
new DummyPluginLoader(),
));
$router = new Router($route_loader, 'configs/routing_install.yml');
$application = new Application($router, new DummyAuthenticationManager());
// Process request
$request = Request::createFromGlobals();
$response = $application->handleRequest($request);
// Send response to the user
$response->send();

View File

@ -1,229 +0,0 @@
<?php
/*
* Copyright 2005-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
$dbtables = array(
"${mysqlprefix}chatgroup" => array(
"groupid" => "int NOT NULL auto_increment PRIMARY KEY",
"vcemail" => "varchar(64)",
"vclocalname" => "varchar(64) NOT NULL",
"vccommonname" => "varchar(64) NOT NULL",
"vclocaldescription" => "varchar(1024) NOT NULL",
"vccommondescription" => "varchar(1024) NOT NULL",
),
"${mysqlprefix}chatthread" => array(
"threadid" => "int NOT NULL auto_increment PRIMARY KEY",
"userName" => "varchar(64) NOT NULL",
"userid" => "varchar(255)",
"agentName" => "varchar(64)",
"agentId" => "int NOT NULL DEFAULT 0",
"dtmcreated" => "datetime DEFAULT 0",
"dtmmodified" => "datetime DEFAULT 0",
"lrevision" => "int NOT NULL DEFAULT 0",
"istate" => "int NOT NULL DEFAULT 0",
"ltoken" => "int NOT NULL",
"remote" => "varchar(255)",
"referer" => "text",
"nextagent" => "int NOT NULL DEFAULT 0",
"locale" => "varchar(8)",
"lastpinguser" => "datetime DEFAULT 0",
"lastpingagent" => "datetime DEFAULT 0",
"userTyping" => "int DEFAULT 0",
"agentTyping" => "int DEFAULT 0",
"shownmessageid" => "int NOT NULL DEFAULT 0",
"userAgent" => "varchar(255)",
"messageCount" => "varchar(16)",
"groupid" => "int references ${mysqlprefix}chatgroup(groupid)",
),
"${mysqlprefix}chatmessage" => array(
"messageid" => "int NOT NULL auto_increment PRIMARY KEY",
"threadid" => "int NOT NULL references ${mysqlprefix}chatthread(threadid)",
"ikind" => "int NOT NULL",
"agentId" => "int NOT NULL DEFAULT 0",
"tmessage" => "text NOT NULL",
"dtmcreated" => "datetime DEFAULT 0",
"tname" => "varchar(64)"
),
"${mysqlprefix}chatoperator" => array(
"operatorid" => "int NOT NULL auto_increment PRIMARY KEY",
"vclogin" => "varchar(64) NOT NULL",
"vcpassword" => "varchar(64) NOT NULL",
"vclocalename" => "varchar(64) NOT NULL",
"vccommonname" => "varchar(64) NOT NULL",
"vcemail" => "varchar(64)",
"dtmlastvisited" => "datetime DEFAULT 0",
"istatus" => "int DEFAULT 0", /* 0 - online, 1 - away */
"vcavatar" => "varchar(255)",
"vcjabbername" => "varchar(255)",
"iperm" => "int DEFAULT 65535",
"inotify" => "int DEFAULT 0", /* 0 - none, 1 - jabber */
"dtmrestore" => "datetime DEFAULT 0",
"vcrestoretoken" => "varchar(64)",
),
"${mysqlprefix}chatrevision" => array(
"id" => "INT NOT NULL"
),
"${mysqlprefix}chatgroupoperator" => array(
"groupid" => "int NOT NULL references ${mysqlprefix}chatgroup(groupid)",
"operatorid" => "int NOT NULL references ${mysqlprefix}chatoperator(operatorid)",
),
"${mysqlprefix}chatban" => array(
"banid" => "INT NOT NULL auto_increment PRIMARY KEY",
"dtmcreated" => "datetime DEFAULT 0",
"dtmtill" => "datetime DEFAULT 0",
"address" => "varchar(255)",
"comment" => "varchar(255)",
"blockedCount" => "int DEFAULT 0"
),
"${mysqlprefix}chatconfig" => array(
"id" => "INT NOT NULL auto_increment PRIMARY KEY",
"vckey" => "varchar(255)",
"vcvalue" => "varchar(255)",
),
"${mysqlprefix}chatresponses" => array(
"id" => "INT NOT NULL auto_increment PRIMARY KEY",
"locale" => "varchar(8)",
"groupid" => "int references ${mysqlprefix}chatgroup(groupid)",
"vcvalue" => "varchar(1024) NOT NULL",
),
"${mysqlprefix}chatnotification" => array(
"id" => "INT NOT NULL auto_increment PRIMARY KEY",
"locale" => "varchar(8)",
"vckind" => "varchar(16)",
"vcto" => "varchar(256)",
"dtmcreated" => "datetime DEFAULT 0",
"vcsubject" => "varchar(256)",
"tmessage" => "text NOT NULL",
"refoperator" => "int NOT NULL references ${mysqlprefix}chatoperator(operatorid)",
),
);
$dbtables_indexes = array(
"${mysqlprefix}chatmessage" => array(
"idx_agentid" => "agentid"
)
);
$memtables = array();
$dbtables_can_update = array(
"${mysqlprefix}chatthread" => array("agentId", "userTyping", "agentTyping", "messageCount", "nextagent", "shownmessageid", "userid", "userAgent", "groupid"),
"${mysqlprefix}chatmessage" => array("agentId"),
"${mysqlprefix}chatoperator" => array("vcavatar", "vcjabbername", "iperm", "istatus", "vcemail", "dtmrestore", "vcrestoretoken", "inotify"),
"${mysqlprefix}chatban" => array(),
"${mysqlprefix}chatgroup" => array("vcemail"),
"${mysqlprefix}chatgroupoperator" => array(),
"${mysqlprefix}chatresponses" => array(),
"${mysqlprefix}chatnotification" => array(),
);
function show_install_err($text)
{
global $page, $version, $errors, $mibewroot;
$page = array(
'version' => $version,
'localeLinks' => get_locale_links("$mibewroot/install/index.php")
);
$errors = array($text);
start_html_output();
require('../view/install_err.php');
exit;
}
function create_table($id, $link)
{
global $dbtables, $dbtables_indexes, $memtables, $dbencoding, $mysqlprefix;
if (!isset($dbtables[$id])) {
show_install_err("Unknown table: $id, " . mysql_error($link));
}
$query =
"CREATE TABLE $id\n" .
"(\n";
foreach ($dbtables[$id] as $k => $v) {
$query .= " $k $v,\n";
}
if (isset($dbtables_indexes[$id])) {
foreach ($dbtables_indexes[$id] as $k => $v) {
$query .= " INDEX $k ($v),\n";
}
}
$query = preg_replace("/,\n$/", "", $query);
$query .= ") charset $dbencoding";
if (in_array($id, $memtables)) {
$query .= " ENGINE=MEMORY";
} else {
$query .= " ENGINE=InnoDb";
}
mysql_query($query, $link) or show_install_err(' Query failed: ' . mysql_error($link));
if ($id == "${mysqlprefix}chatoperator") {
create_operator_("admin", "", "", "", "Administrator", "Administrator", 0, "", $link);
} else if ($id == "${mysqlprefix}chatrevision") {
perform_query("INSERT INTO ${mysqlprefix}chatrevision VALUES (1)", $link);
}
}
function get_tables($link)
{
global $mysqldb, $errors;
$result = mysql_query("SHOW TABLES FROM `$mysqldb`", $link);
if ($result) {
$arr = array();
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$arr[] = $row[0];
}
mysql_free_result($result);
return $arr;
} else {
$errors[] = "Cannot get tables from database. Error: " . mysql_error($link);
return false;
}
}
function get_columns($tablename, $link)
{
global $errors;
$result = mysql_query("SHOW COLUMNS FROM $tablename", $link);
if ($result) {
$arr = array();
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$arr[] = $row[0];
}
mysql_free_result($result);
return $arr;
} else {
$errors[] = "Cannot get columns from table \"$tablename\". Error: " . mysql_error($link);
return false;
}
}
?>

View File

@ -1,168 +0,0 @@
<?php
/*
* Copyright 2005-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require_once('../libs/common.php');
require_once('../libs/operator.php');
require_once('dbinfo.php');
function runsql($query, $link)
{
$res = mysql_query($query, $link) or show_install_err(' Query failed: ' . mysql_error($link));
return $res;
}
$act = verifyparam("act", "/^(silentcreateall|createdb|ct|dt|addcolumns)$/");
$link = @mysql_connect($mysqlhost, $mysqllogin, $mysqlpass)
or show_install_err('Could not connect: ' . mysql_error());
if ($act == "silentcreateall") {
mysql_query("CREATE DATABASE $mysqldb", $link) or show_install_err(' Query failed: ' . mysql_error($link));
foreach ($dbtables as $id) {
create_table($id, $link);
}
} else if ($act == "createdb") {
mysql_query("CREATE DATABASE $mysqldb", $link) or show_install_err(' Query failed: ' . mysql_error($link));
} else {
mysql_select_db($mysqldb, $link)
or show_install_err('Could not select database');
if ($force_charset_in_connection) {
mysql_query("SET character set $dbencoding", $link);
}
if ($act == "ct") {
$curr_tables = get_tables($link);
if ($curr_tables === false) {
show_install_err($errors[0]);
}
$tocreate = array_diff(array_keys($dbtables), $curr_tables);
foreach ($tocreate as $id) {
create_table($id, $link);
}
} else if ($act == "dt") {
# comment this line to be able to drop tables
show_install_err("For security reasons, removing tables is disabled by default");
foreach (array_keys($dbtables) as $id) {
mysql_query("DROP TABLE IF EXISTS $id", $link) or show_install_err(' Query failed: ' . mysql_error($link));
}
} else if ($act == "addcolumns") {
$absent = array();
foreach ($dbtables as $id => $columns) {
$curr_columns = get_columns($id, $link);
if ($curr_columns === false) {
show_install_err($errors[0]);
}
$tocreate = array_diff(array_keys($columns), $curr_columns);
foreach ($tocreate as $v) {
$absent[] = "$id.$v";
}
}
if (in_array("${mysqlprefix}chatmessage.agentId", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatmessage ADD agentId int NOT NULL DEFAULT 0 AFTER ikind", $link);
runsql("update ${mysqlprefix}chatmessage, ${mysqlprefix}chatoperator set agentId = operatorid where agentId = 0 AND ikind = 2 AND (vclocalename = tname OR vccommonname = tname)", $link);
}
if (in_array("${mysqlprefix}chatthread.agentId", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatthread ADD agentId int NOT NULL DEFAULT 0 AFTER agentName", $link);
runsql("update ${mysqlprefix}chatthread, ${mysqlprefix}chatoperator set agentId = operatorid where agentId = 0 AND (vclocalename = agentName OR vccommonname = agentName)", $link);
}
if (in_array("${mysqlprefix}chatthread.agentTyping", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatthread ADD agentTyping int DEFAULT 0", $link);
}
if (in_array("${mysqlprefix}chatthread.userTyping", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatthread ADD userTyping int DEFAULT 0", $link);
}
if (in_array("${mysqlprefix}chatthread.messageCount", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatthread ADD messageCount varchar(16)", $link);
runsql("ALTER TABLE ${mysqlprefix}chatmessage ADD INDEX idx_threadid_ikind (threadid, ikind)", $link);
runsql("UPDATE ${mysqlprefix}chatthread t SET t.messageCount = (SELECT COUNT(*) FROM ${mysqlprefix}chatmessage WHERE ${mysqlprefix}chatmessage.threadid = t.threadid AND ikind = 1)", $link);
runsql("ALTER TABLE ${mysqlprefix}chatmessage DROP INDEX idx_threadid_ikind", $link);
}
if (in_array("${mysqlprefix}chatthread.nextagent", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatthread ADD nextagent int NOT NULL DEFAULT 0", $link);
}
if (in_array("${mysqlprefix}chatthread.shownmessageid", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatthread ADD shownmessageid int NOT NULL DEFAULT 0", $link);
}
if (in_array("${mysqlprefix}chatthread.userid", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatthread ADD userid varchar(255) DEFAULT \"\"", $link);
}
if (in_array("${mysqlprefix}chatoperator.iperm", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD iperm int DEFAULT 65535", $link);
}
if (in_array("${mysqlprefix}chatoperator.istatus", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD istatus int DEFAULT 0", $link);
}
if (in_array("${mysqlprefix}chatoperator.inotify", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD inotify int DEFAULT 0", $link);
}
if (in_array("${mysqlprefix}chatoperator.vcavatar", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD vcavatar varchar(255)", $link);
}
if (in_array("${mysqlprefix}chatoperator.vcjabbername", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD vcjabbername varchar(255)", $link);
}
if (in_array("${mysqlprefix}chatoperator.vcemail", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD vcemail varchar(64)", $link);
}
if (in_array("${mysqlprefix}chatoperator.dtmrestore", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD dtmrestore datetime DEFAULT 0", $link);
}
if (in_array("${mysqlprefix}chatoperator.vcrestoretoken", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatoperator ADD vcrestoretoken varchar(64)", $link);
}
if (in_array("${mysqlprefix}chatthread.groupid", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatthread ADD groupid int references ${mysqlprefix}chatgroup(groupid)", $link);
}
if (in_array("${mysqlprefix}chatthread.userAgent", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatthread ADD userAgent varchar(255)", $link);
}
if (in_array("${mysqlprefix}chatgroup.vcemail", $absent)) {
runsql("ALTER TABLE ${mysqlprefix}chatgroup ADD vcemail varchar(64)", $link);
}
$res = mysql_query("select null from information_schema.statistics where table_schema = '$mysqldb' and table_name = '${mysqlprefix}chatmessage' and index_name = 'idx_agentid'", $link);
if ($res && mysql_num_rows($res) == 0) {
runsql("ALTER TABLE ${mysqlprefix}chatmessage ADD INDEX idx_agentid (agentid)", $link);
}
}
}
mysql_close($link);
header("Location: $mibewroot/install/index.php");
exit;
?>

View File

@ -1,312 +0,0 @@
<?php
/*
* Copyright 2005-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require_once('../libs/common.php');
require_once('../libs/settings.php');
require_once('dbinfo.php');
$page = array(
'version' => $version,
'localeLinks' => get_locale_links("$mibewroot/install/index.php")
);
$page['done'] = array();
$page['nextstep'] = false;
$page['nextnotice'] = false;
$page['soundcheck'] = false;
$errors = array();
function check_mibewroot()
{
global $page, $errors, $mibewroot;
$requestUri = $_SERVER["REQUEST_URI"];
if (!preg_match('/^(.*)\\/install(\\/[^\\/\\\\]*)?$/', $requestUri, $matches)) {
$errors[] = "Cannot detect application location: $requestUri";
return false;
}
$applocation = $matches[1];
if ($applocation != $mibewroot) {
$errors[] = "Please, check file ${applocation}/libs/config.php<br/>Wrong value of \$mibewroot variable, should be \"$applocation\"";
$mibewroot = $applocation;
return false;
}
$page['done'][] = getlocal2("install.0.app", array($applocation));
return true;
}
function fpermissions($file)
{
$perms = fileperms($file);
if (($perms & 0x8000) == 0x8000) {
$info = '-';
} elseif (($perms & 0x4000) == 0x4000) {
$info = 'd';
} else {
$info = '?';
}
// Owner
$info .= (($perms & 0x0100) ? 'r' : '-');
$info .= (($perms & 0x0080) ? 'w' : '-');
$info .= (($perms & 0x0040) ?
(($perms & 0x0800) ? 's' : 'x') :
(($perms & 0x0800) ? 'S' : '-'));
// Group
$info .= (($perms & 0x0020) ? 'r' : '-');
$info .= (($perms & 0x0010) ? 'w' : '-');
$info .= (($perms & 0x0008) ?
(($perms & 0x0400) ? 's' : 'x') :
(($perms & 0x0400) ? 'S' : '-'));
// World
$info .= (($perms & 0x0004) ? 'r' : '-');
$info .= (($perms & 0x0002) ? 'w' : '-');
$info .= (($perms & 0x0001) ?
(($perms & 0x0200) ? 't' : 'x') :
(($perms & 0x0200) ? 'T' : '-'));
return $info;
}
function check_files()
{
global $page, $errors, $mibewroot;
$packageFile = dirname(__FILE__) . "/package";
$fp = @fopen($packageFile, "r");
if ($fp === FALSE) {
$errors[] = getlocal2("install.cannot_read", array("$mibewroot/install/package"));
if (file_exists($packageFile)) {
$errors[] = getlocal2("install.check_permissions", array(fpermissions($packageFile)));
}
return false;
}
$knownFiles = array();
while (!feof($fp)) {
$line = fgets($fp, 4096);
$keyval = preg_split("/ /", $line, 2);
if (isset($keyval[1])) {
$knownFiles[$keyval[0]] = trim($keyval[1]);
}
}
fclose($fp);
foreach ($knownFiles as $file => $sum) {
$relativeName = dirname(__FILE__) . "/../$file";
if (!is_readable($relativeName)) {
if (file_exists($relativeName)) {
$errors[] = getlocal2("install.cannot_read", array("$mibewroot/$file"));
$errors[] = getlocal2("install.check_permissions", array(fpermissions($relativeName)));
} else {
$errors[] = getlocal2("install.no_file", array("$mibewroot/$file"));
}
return false;
}
if ($sum != "-") {
$result = md5_file($relativeName);
if ($result != $sum) {
// try without \r
$result = md5(str_replace("\r", "", file_get_contents($relativeName)));
}
if ($result != $sum) {
$errors[] = getlocal2("install.bad_checksum", array("$mibewroot/$file"));
$errors[] = getlocal("install.check_files");
return false;
}
}
}
$page['done'][] = getlocal("install.0.package");
return true;
}
function check_connection()
{
global $mysqlhost, $mysqllogin, $mysqlpass, $page, $errors, $mibewroot;
$link = @mysql_connect($mysqlhost, $mysqllogin, $mysqlpass);
if ($link) {
$result = mysql_query("SELECT VERSION() as c", $link);
if ($result && $ver = mysql_fetch_array($result, MYSQL_ASSOC)) {
$page['done'][] = getlocal2("install.1.connected", array($ver['c']));
mysql_free_result($result);
} else {
$errors[] = "Version of your SQL server is unknown. Please check. Error: " . mysql_error($link);
mysql_close($link);
return null;
}
return $link;
} else {
$errors[] = getlocal2("install.connection.error", array(mysql_error()));
return null;
}
}
function check_database($link)
{
global $mysqldb, $force_charset_in_connection, $dbencoding, $page, $mibewroot;
if (mysql_select_db($mysqldb, $link)) {
$page['done'][] = getlocal2("install.2.db_exists", array($mysqldb));
if ($force_charset_in_connection) {
mysql_query("SET character set $dbencoding", $link);
}
return true;
} else {
$page['nextstep'] = getlocal2("install.2.create", array($mysqldb));
$page['nextnotice'] = getlocal("install.2.notice");
$page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=createdb";
}
return false;
}
function check_tables($link)
{
global $dbtables, $page, $mibewroot;
$curr_tables = get_tables($link);
if ($curr_tables !== false) {
$tocreate = array_diff(array_keys($dbtables), $curr_tables);
if (count($tocreate) == 0) {
$page['done'][] = getlocal("install.3.tables_exist");
return true;
} else {
$page['nextstep'] = getlocal("install.3.create");
$page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=ct";
}
}
return false;
}
function check_columns($link)
{
global $dbtables, $dbtables_can_update, $errors, $page, $mibewroot;
$need_to_create_columns = false;
foreach ($dbtables as $id => $columns) {
$curr_columns = get_columns($id, $link);
if ($curr_columns === false) {
return false;
}
$tocreate = array_diff(array_keys($columns), $curr_columns);
if (count($tocreate) != 0) {
$cannot_update = array_diff($tocreate, $dbtables_can_update[$id]);
if (count($cannot_update) != 0) {
$errors[] = "Key columns are absent in table `$id'. Unable to continue installation.";
$page['nextstep'] = getlocal("install.kill_tables");
$page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=dt";
$page['nextnotice'] = getlocal("install.kill_tables.notice");
return false;
}
$need_to_create_columns = true;
}
}
if ($need_to_create_columns) {
$page['nextstep'] = getlocal("install.4.create");
$page['nextstepurl'] = "$mibewroot/install/dbperform.php?act=addcolumns";
$page['nextnotice'] = getlocal("install.4.notice");
return false;
}
$page['done'][] = getlocal("install.4.done");
return true;
}
function check_sound()
{
global $page;
$page['soundcheck'] = true;
$page['done'][] = getlocal2("install.5.text", array(
"<a id=\"check-nv\" href=\"javascript:void(0)\">" . getlocal("install.5.newvisitor") . "</a>",
"<a id=\"check-nm\" href=\"javascript:void(0)\">" . getlocal("install.5.newmessage") . "</a>"
));
}
function check_admin($link)
{
global $mysqlprefix;
$result = mysql_query("select * from ${mysqlprefix}chatoperator where vclogin = 'admin'", $link);
if ($result) {
$line = mysql_fetch_array($result, MYSQL_ASSOC);
mysql_free_result($result);
return $line['vcpassword'] != md5('');
}
return false;
}
function check_status()
{
global $page, $mibewroot, $settings, $dbversion;
$page['done'][] = getlocal2("install.0.php", array(phpversion()));
if (!check_mibewroot()) {
return;
}
if (!check_files()) {
return;
}
$link = check_connection();
if (!$link) {
return;
}
if (!check_database($link)) {
mysql_close($link);
return;
}
if (!check_tables($link)) {
mysql_close($link);
return;
}
if (!check_columns($link)) {
mysql_close($link);
return;
}
check_sound();
$page['done'][] = getlocal("installed.message");
if (!check_admin($link)) {
$page['nextstep'] = getlocal("installed.login_link");
$page['nextnotice'] = getlocal2("installed.notice", array("${mibewroot}/install/"));
$page['nextstepurl'] = "$mibewroot/operator/login.php?login=admin";
}
$page['show_small_login'] = true;
mysql_close($link);
loadsettings();
$settings['dbversion'] = $dbversion;
update_settings();
}
check_status();
start_html_output();
require('../view/install_index.php');
?>

View File

@ -1,217 +0,0 @@
1.6.9
-----
[!] multiple bugfixes
[!] multiple security fixes (thanks to X Chen)
[+] new permission for operators to see Notifications (thanks to Borja Rubio)
1.6.8
-----
[!] multiple bugfixes
[!] several security fixes
[+] new logo
[!] switch to standard codes for several locales
1.6.7
-----
[+] add https links highlighting (thanks to falcon)
[!] fix several bugs related to specific environments
1.6.6
-----
[+] add captcha image to pre-chat survey
[+] improve localization (add new constants)
[!] completely abandon old application name (i.e. webim)
[!] switch to more safe hashing alrgorithms for passwords and tokens
[!] switch to more safe generation of user IDs
[!] make important cookies more safe
[!] multiple XSS fixes
[!] multiple SQL Injection fixes
[!] multiple file path manipulation fixes
[!] CSRF fixes
1.6.5
-----
[+] Apache 2 license
[+] switched to google closure compiler for Javascript compression, jQuery 1.4.2
[+] improve database schema (add indexes, fix compatibility with MySQL 5.5)
[+] silver skin (thanks to Alekin Pavel)
[+] informational banner on empty password of administrator
[!] CSRF fixes
[!] close old threads by timeout
1.6.4
-----
[+] core UI improvements, "you are offline" and "new features" notification panels
[+] online/away operators list (on "awaiting visitors" page) by Andrew Armstrong
[+] several instances of mibew in one DB ($mysqlprefix variable)
[+] ability to override notification email for group
[!] various compatibility fixes: button image, captcha, check webimroot variable (installation)
[!] check file permissions/checksum (installation)
[!] fix speed of history search, fix redirection to groups
[!] fix sound issues in windows
1.6.3
-----
[+] password restore functionality for agent
[+] new Blue logo; new buttons: mgreen, mblue
[!] fixed: button code conflicts with spam filters and mod_security
[!] workarounds if some functions are disabled in php
[!] compatibility with PHP 5.3.0
[+] new domain: mibew.org
1.6.2
-----
[+] bi-licensed: EPL / GPL
[+] operator is away status, show status on redirect/survey/operators pages
[+] Captcha - Leave Message
[+] groups page: last active column
[+] pre-chat survey, redirect page: show group status - online/offline/away
[!] do not show empty groups in redirect/survey
[!] compatibility with the latest mod_security rules
[+] performance options in settings: update intervals, operator online time threshold
[+] information messages: visitor navigated to ...
[!] html code in templates, better appearance in Safari
1.6.1
-----
[!] 404 installation problem
[+] new permission: "Ability to modify profile"
[+] new project name: Mibew Messenger
[!] fixed localization of dates for all languages, nice formatting: Today/Yesterday
[!] fixed online/offline image for groups
[+] ability to delete operators, confirmation dialog when deleting group/operator/blocked address
[+] Information about last activity for operators: Online, Today at 22, 01 Jan.., or Never
[+] new theme: simplicity (by Sheldmandu)
[!] chat templates are fixed according to html standards
1.6.0
-----
[+] completely new layout of all administrator pages, XHTML 1.0
[+] New awaiting users and chat log pages
[+] right menu, show/hide menu on awaiting users page, nice locale chooser
[+] main page: warning if database is outdated (after install)
[+] "Updates": news, link to the latest version
[+] Operator's profile page
[+] Configurable pre-chat survey
[+] Create/edit/remove groups
[+] Canned messages page
[+] Statistics page
[+] Popup dialog notification of the new visitor (turned off by default)
[+] Send message option: enter vs ctrl-enter
[!] Slow loading of awating visitors page
1.5.2
-----
[+] Ability to disable sound notifications for chat (toolbar button)
[+] Switch to SSL in chat (should be enabled in "Settings -> Optional Services")
[!] lost query parameters after login redirect
[+] added referrer into button code
[+] ability to add text for operator into button code, define visitor's name and email
[!] geolocation on IPs in history
[!] Translation UI: added sorting, filters, fixed several problems
[+] New chat buttons
1.5.1
-----
[!] significant optimization of chat window (both themes), reduced number of images and their sizes
[+] tabs in settings: Optional Services, Themes preview
[+] better French and Spanish translations, additional languages are stored separately
[+] detect Chrome browser, show its version
[!] reverted order in title, removed available_locales variable from config.php (detect automatically)
[!] return English message by default (when translation for other language is absent)
[!] problems with styles, fixed error messages in avatar uploading
[+] nice confirmation when form is saved
1.5.0
-----
[!] sound notifications: FF (mac,win), Opera (mac,win), IE, Safari (mac,win)
[+] chat styles support: selectors in button generation and in settings
[+] styles are applied as set of page templates
[+] added styles preview page (the link from settings page) with "fake" chat
[+] 2 styles are included: original (old one) and default (new green scheme)
[+] new options in settings: user can change name, presentable name pattern
[+] customizable geolocation link for IPs on pending users page
[+] permissions support: Agents -> some agent -> Permissions
[+] New permissions:
[x] System administration: settings, operators management, button generation
[x] Take over chat thread
[x] View another operator's chat thread
1.4.2
-----
[+] Operators photos (appears in users chat window)
[+] pending users: show first user message (below the name)
[+] pending users: show visitors's browser name and version
[+] mark user with unique id to be able to see its dialogs later
[+] special button in operator's thread to browse previous chats
[+] Spam Blocking
1.4.1
-----
[+] redirect visitor to another operator
[+] predefined answers (without proper management yet)
[+] play notification sounds (new message, new visitor)
[+] confirmation when trying to intercept another operator's visitor
[+] ability to view threads without taking
1.4.0
-----
[+] introduce messenger settings page, persist several options in DB instead of config.php
[+] improve history search speed
[+] do not show typing notification for disconnected remote
[!] monitor connection status, show reconnecing message when connection is low (pendings users and chat window)
[!] support lang & language args in button code, create correct code for link
[!] fix safari, opera 9.5+ (+ several others compatibility fixes)
1.0.10
------
[+] Number of messages from visitor in history
[+] State "loading" (means user is still loading his window)
[+] Timers on peding users page are ticking now
[!] Company logo link target is now an option in config
[!] Mail encoding fixed (separate option)
[!] Operator/user locale is stored in cookie
[!] localized dates
[!] fixed installing on DB with numeric name
[!] empty and double messages
[!] #1983764
1.0.9
-----
[+] typing notifications in chat window
[!] completly new encoding handling, default is utf-8, page encoding is set in resources
[!] fixed user name storage in cookie (now utf8 in base64)
[!] some fixes for Opera
[!] force utf-8 for xml
1.0.8
-----
[+] install/update wizard, can create database and update it if needed
[+] leave message form when no operator is available
[!] location of web application can be other than /webim (see config.php)
[!] locale-specific resources extracted into /locales
[!] some fixes for Safari browser
[!] email validation in forms
1.0.7
-----
[+] history search with pagination
[+] advanced button generation: secure link, include hostname, choosing images
[+] post referer into thread as a message (visible only for agent)
[+] new config options: user can change name, company name, logo
[+] notify operator if user closed his window
[+] notify visitor if operator has connection problems and move it into priority queue
[+] automatically take visitor if operator connection restored
[!] encoding problems in Internet Explorer
[!] quotes in messages & user names
[!] do not reopen closed threads
[!] some fixes in handling thread locale
[!] version in menu, locales chooser in menu

View File

@ -1 +0,0 @@
var myAgent="",myVer=0,myRealAgent="";function detectAgent(){for(var a="opera msie safari firefox netscape mozilla".split(" "),b=navigator.userAgent.toLowerCase(),c=0;c<a.length;c++){var d=a[c];if(-1!=b.indexOf(d)){myAgent=d;if(!window.RegExp)break;null!=RegExp(d+"[ /]?([0-9]+(.[0-9]+)?)").exec(b)&&(myVer=parseFloat(RegExp.$1));break}}myRealAgent=myAgent;"Gecko"==navigator.product&&(myAgent="moz")}detectAgent();function getEl(a){return document.getElementById(a)};

View File

@ -1,24 +0,0 @@
/*
This file is part of Mibew Messenger project.
http://mibew.org
Copyright (c) 2005-2014 Mibew Messenger Community
License: http://mibew.org/license.php
*/
var FrameUtils={getDocument:function(a){return a.contentDocument?a.contentDocument:a.contentWindow?a.contentWindow.document:a.document?a.document:null},initFrame:function(a){var b=this.getDocument(a);b.open();b.write("<html><head>");b.write('<link rel="stylesheet" type="text/css" media="all" href="'+Chat.cssfile+'">');b.write('</head><body bgcolor="#FFFFFF" text=#000000" link="#C28400" vlink="#C28400" alink="#C28400">');b.write('<table width="100%" cellspacing="0" cellpadding="0" border="0"><tr><td valign="top" class="message" id="content"></td></tr></table><a id="bottom" name="bottom"></a>');
b.write("</body></html>");b.close();a.onload=function(){a.myHtml&&(FrameUtils.getDocument(a).getElementById("content").innerHTML+=a.myHtml,FrameUtils.scrollDown(a))}},insertIntoFrame:function(a,b){var c=this.getDocument(a).getElementById("content");null==c?(a.myHtml||(a.myHtml=""),a.myHtml+=b):c.innerHTML+=b},scrollDown:function(a){var b=this.getDocument(a).getElementById("bottom");if("opera"==myAgent)try{a.contentWindow.scrollTo(0,this.getDocument(a).getElementById("content").clientHeight)}catch(c){}b&&
b.scrollIntoView(!1)}};Ajax.ChatThreadUpdater=Class.create();
Class.inherit(Ajax.ChatThreadUpdater,Ajax.Base,{initialize:function(a){this.setOptions(a);this._options.onComplete=this.requestComplete.bind(this);this._options.onException=this.handleException.bind(this);this._options.onTimeout=this.handleTimeout.bind(this);this._options.timeout=5E3;this.updater={};this.frequency=this._options.frequency||2;this.lastupdate=0;this.focused=this.skipNextsound=this.cansend=!0;this.ownThread=null!=this._options.message;FrameUtils.initFrame(this._options.container);this._options.message&&
(this._options.message.onkeydown=this.handleKeyDown.bind(this),this._options.message.onfocus=function(){this.focused=!0}.bind(this),this._options.message.onblur=function(){this.focused=!1}.bind(this));this.update()},handleException:function(a,b){this.setStatus("offline, reconnecting");this.stopUpdate();this.timer=setTimeout(this.update.bind(this),1E3)},handleTimeout:function(a){this.setStatus("timeout, reconnecting");this.stopUpdate();this.timer=setTimeout(this.update.bind(this),1E3)},updateOptions:function(a){this._options.parameters=
"act="+a+"&thread="+(this._options.threadid||0)+"&token="+(this._options.token||0)+"&lastid="+(this._options.lastid||0);this._options.user&&(this._options.parameters+="&user=true");"refresh"==a&&(this._options.message&&""!=this._options.message.value)&&(this._options.parameters+="&typed=1")},enableInput:function(a){this._options.message&&(this._options.message.disabled=!a)},stopUpdate:function(){this.enableInput(!0);this.updater._options&&(this.updater._options.onComplete=void 0);clearTimeout(this.timer)},
update:function(){this.updateOptions("refresh");this.updater=new Ajax.Request(this._options.servl,this._options)},requestComplete:function(a){try{this.enableInput(!0);this.cansend=!0;var b=Ajax.getXml(a);b&&"thread"==b.tagName?this.updateContent(b):this.handleError(a,b,"refresh messages failed")}catch(c){}this.skipNextsound=!1;this.timer=setTimeout(this.update.bind(this),1E3*this.frequency)},postMessage:function(a){if(""!=a&&this.cansend){this.cansend=!1;this.stopUpdate();this.skipNextsound=!0;this.updateOptions("post");
var b={}.extend(this._options);b.parameters+="&message="+encodeURIComponent(a);b.onComplete=function(a){this.requestComplete(a);this._options.message&&(this._options.message.value="",this._options.message.focus())}.bind(this);"opera"!=myRealAgent&&this.enableInput(!1);this.updater=new Ajax.Request(this._options.servl,b)}},changeName:function(a){this.skipNextsound=!0;new Ajax.Request(this._options.servl,{parameters:"act=rename&thread="+(this._options.threadid||0)+"&token="+(this._options.token||0)+
"&name="+encodeURIComponent(a)})},onThreadClosed:function(a){var b=Ajax.getXml(a);b&&"closed"==b.tagName?setTimeout("window.close()",2E3):this.handleError(a,b,"cannot close")},closeThread:function(){var a="act=close&thread="+(this._options.threadid||0)+"&token="+(this._options.token||0);this._options.user&&(a+="&user=true");new Ajax.Request(this._options.servl,{parameters:a,onComplete:this.onThreadClosed.bind(this)})},processMessage:function(a,b){var c=NodeUtils.getNodeText(b);FrameUtils.insertIntoFrame(a,
c)},showTyping:function(a){$("typingdiv")&&($("typingdiv").style.display=a?"inline":"none")},setupAvatar:function(a){a=NodeUtils.getNodeText(a);this._options.avatar&&this._options.user&&(this._options.avatar.innerHTML=""!=a?'<img src="'+Chat.mibewRoot+'/images/free.gif" width="7" height="1" border="0" alt="" /><img src="'+a+'" border="0" alt=""/>':"")},updateContent:function(a){var b=!1,c=this._options.container,d=NodeUtils.getAttrValue(a,"lastid");d&&(this._options.lastid=d);(d=NodeUtils.getAttrValue(a,
"typing"))&&this.showTyping("1"==d);(d=NodeUtils.getAttrValue(a,"canpost"))&&("1"==d&&!this.ownThread||this.ownThread&&"1"!=d)&&(window.location.href=window.location.href);for(d=0;d<a.childNodes.length;d++){var e=a.childNodes[d];"message"==e.tagName?(b=!0,this.processMessage(c,e)):"avatar"==e.tagName&&this.setupAvatar(e)}0<=window.location.search.indexOf("trace=on")?(a="updated",0<this.lastupdate&&(c=((new Date).getTime()-this.lastupdate)/1E3,a=a+", "+c+" secs",10<c&&alert(a)),this.lastupdate=(new Date).getTime(),
this.setStatus(a)):this.clearStatus();b&&(FrameUtils.scrollDown(this._options.container),this.skipNextsound||(b=$("soundimg"),(null==b||b.className.match(/\bisound\b/))&&playSound(Chat.mibewRoot+"/sounds/new_message.wav")),this.focused||window.focus())},isSendkey:function(a,b){return 13==b&&(a||this._options.ignorectrl)||10==b},handleKeyDown:function(a){a?(ctrl=a.ctrlKey,a=a.which):(a=event.keyCode,ctrl=event.ctrlKey);return this._options.message&&this.isSendkey(ctrl,a)?(a=this._options.message.value,
this._options.ignorectrl&&(a=a.replace(/[\r\n]+$/,"")),this.postMessage(a),!1):!0},handleError:function(a,b,c){b&&"error"==b.tagName?this.setStatus(NodeUtils.getNodeValue(b,"descr")):this.setStatus("reconnecting")},showStatusDiv:function(a){$("engineinfo")&&($("engineinfo").style.display="inline",$("engineinfo").innerHTML=a)},setStatus:function(a){this.statusTimeout&&clearTimeout(this.statusTimeout);this.showStatusDiv(a);this.statusTimeout=setTimeout(this.clearStatus.bind(this),4E3)},clearStatus:function(){$("engineinfo").style.display=
"none"}});var Chat={threadUpdater:{},applyName:function(){$("uname").value.match(/^\s*$/)||(Chat.threadUpdater.changeName($("uname").value),$("changename1").style.display="none",$("changename2").style.display="inline",$("unamelink").innerHTML=htmlescape($("uname").value))},showNameField:function(){$("changename1").style.display="inline";$("changename2").style.display="none"}};
Behaviour.register({"#postmessage a":function(a){a.onclick=function(){var a=$("msgwnd");a&&Chat.threadUpdater.postMessage(a.value)}},"select#predefined":function(a){a.onchange=function(){var a=$("msgwnd");0!=this.selectedIndex&&(a.value=this.options[this.selectedIndex].innerText||this.options[this.selectedIndex].innerHTML);this.selectedIndex=0;a.focus()}},"div#changename2 a":function(a){a.onclick=function(){Chat.showNameField();return!1}},"div#changename1 a":function(a){a.onclick=function(){Chat.applyName();
return!1}},"div#changename1 input#uname":function(a){a.onkeydown=function(a){13==(a||event).keyCode&&Chat.applyName()}},"a#refresh":function(a){a.onclick=function(){Chat.threadUpdater.stopUpdate();Chat.threadUpdater.update()}},"a#togglesound":function(a){a.onclick=function(){var a=$("soundimg");a&&(a.className.match(/\bisound\b/)?a.className="tplimage inosound":a.className="tplimage isound",(a=$("msgwnd"))&&a.focus())}},"a.closethread":function(a){a.onclick=function(){Chat.threadUpdater.closeThread()}}});
EventHelper.register(window,"onload",function(){Chat.mibewRoot=threadParams.wroot;Chat.cssfile=threadParams.cssfile;Chat.threadUpdater=new Ajax.ChatThreadUpdater({ignorectrl:-1,container:"safari"==myRealAgent?self.frames[0]:$("chatwnd"),avatar:$("avatarwnd"),message:$("msgwnd")}.extend(threadParams||{}))});

View File

@ -1,25 +0,0 @@
/*
This file is part of Mibew Messenger project.
http://mibew.org
Copyright (c) 2005-2014 Mibew Messenger Community
License: http://mibew.org/license.php
*/
var Class={create:function(){return function(){this.initialize.apply(this,arguments)}},inherit:function(a,b,c){Object.extend(Object.extend(a.prototype,b.prototype),c)}};Object.extend=function(a,b){for(property in b)a[property]=b[property];return a};Object.prototype.extend=function(a){return Object.extend.apply(this,[this,a])};Function.prototype.bind=function(a){var b=this;return function(){return b.apply(a,arguments)}};
Function.prototype.bindAsEventListener=function(a){var b=this;return function(c){b.call(a,c||window.event)}};Number.prototype.toColorPart=function(){var a=this.toString(16);return 16>this?"0"+a:a};var Try={these:function(){for(var a,b=0;b<arguments.length;b++){var c=arguments[b];try{a=c();break}catch(d){}}return a}},PeriodicalExecuter=Class.create();
PeriodicalExecuter.prototype={initialize:function(a,b){this.callback=a;this.frequency=b;this.currentlyExecuting=!1;this.registerCallback()},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),1E3*this.frequency)},onTimerEvent:function(){if(!this.currentlyExecuting)try{this.currentlyExecuting=!0,this.callback()}finally{this.currentlyExecuting=!1}}};
function findObj(a){var b;!(b=document[a])&&document.all&&(b=document.all[a]);!b&&document.getElementById&&(b=document.getElementById(a));if(!b&&!document.all&&document.getElementsByName){b=document.getElementsByName(a);if(0==b.length)return null;if(1==b.length)return b[0]}return b}Array.prototype.push||(Array.prototype.push=function(){for(var a=this.length,b=0;b<arguments.length;b++)this[a+b]=arguments[b];return this.length});
function $(){for(var a=[],b=0;b<arguments.length;b++){var c=arguments[b];"string"==typeof c&&(c=findObj(c));if(1==arguments.length)return c;a.push(c)}return a}
var Ajax={getTransport:function(){return Try.these(function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new XMLHttpRequest})||!1},getXml:function(a){return a&&200<=a.status&&300>a.status&&(a=a.responseXML)&&a.documentElement?a.documentElement:null},getError:function(a){return a.statusText||"connection error N"+a.status},emptyFunction:function(){},Base:function(){}};
Ajax.Base.prototype={setOptions:function(a){this._options={_method:"post",asynchronous:!0,parameters:""}.extend(a||{})},getStatus:function(){try{return this.transport.status||0}catch(a){return 0}},responseIsSuccess:function(){var a=this.getStatus();return!a||200<=a&&300>a},responseIsFailure:function(){return!this.responseIsSuccess()}};Ajax.Request=Class.create();Ajax.Request.Events=["Uninitialized","Loading","Loaded","Interactive","Complete"];
Class.inherit(Ajax.Request,Ajax.Base,{initialize:function(a,b){this.transport=Ajax.getTransport();this.setOptions(b);this.transportTimer={};this.finished=!1;this.request(a)},request:function(a){var b=this._options.parameters||"";0<b.length&&(b+="&_=");try{"get"==this._options._method&&0<b.length&&(a+="?"+b);this.transport.open(this._options._method.toUpperCase(),a,this._options.asynchronous);this._options.asynchronous&&(this.transport.onreadystatechange=this.onStateChange.bind(this),this._options.timeout&&
(this.transportTimer=setTimeout(this.handleTimeout.bind(this),this._options.timeout)));this.setRequestHeaders();var c=this._options.postBody?this._options.postBody:b;this.transport.send("post"==this._options._method?c:null)}catch(d){this.dispatchException(d)}},setRequestHeaders:function(){var a=["X-Requested-With","XMLHttpRequest"];"post"==this._options._method&&(a.push("Content-type","application/x-www-form-urlencoded"),this.transport.overrideMimeType&&2005>(navigator.userAgent.match("/Gecko/(d{4})/")||
[0,2005])[1]&&a.push("Connection","close"));this._options.requestHeaders&&a.push.apply(a,this._options.requestHeaders);for(var b=0;b<a.length;b+=2)this.transport.setRequestHeader(a[b],a[b+1])},onStateChange:function(){1!=this.transport.readyState&&this.respondToReadyState(this.transport.readyState)},handleTimeout:function(){this.finished||(this.finished=!0,(this._options.onTimeout||Ajax.emptyFunction)(this))},respondToReadyState:function(a){if("Complete"==Ajax.Request.Events[a]){try{this.finished||
(this.finished=!0,this._options.timeout&&clearTimeout(this.transportTimer),(this._options.onComplete||Ajax.emptyFunction)(this.transport))}catch(b){this.dispatchException(b)}this.transport.onreadystatechange=Ajax.emptyFunction}},dispatchException:function(a){(this._options.onException||Ajax.emptyFunction)(this,a)}});
var EventHelper={register:function(a,b,c){var d=a[b];a[b]="function"!=typeof d?c:function(){d();c()}}},Behaviour={list:[],register:function(a){Behaviour.list.push(a)},init:function(){EventHelper.register(window,"onload",function(){Behaviour.apply()})},apply:function(){for(h=0;sheet=Behaviour.list[h];h++)for(selector in sheet)if(list=document.getElementsBySelector(selector))for(i=0;element=list[i];i++)sheet[selector](element)}};Behaviour.init();
function getAllChildren(a){return a.all?a.all:a.getElementsByTagName("*")}
document.getElementsBySelector=function(a){if(!document.getElementsByTagName)return[];a=a.split(" ");for(var b=Array(document),c=0;c<a.length;c++)if(token=a[c].replace(/^\s+/,"").replace(/\s+$/,""),-1<token.indexOf("#")){var d=token.split("#"),e=d[0],b=document.getElementById(d[1]);if(null==b||e&&b.nodeName.toLowerCase()!=e)return[];b=Array(b)}else if(-1<token.indexOf(".")){d=token.split(".");e=d[0];d=d[1];e||(e="*");for(var m=[],l=0,p=0;p<b.length;p++){var f;f="*"==e?getAllChildren(b[p]):b[p].getElementsByTagName(e);
if(null!=f)for(var q=0;q<f.length;q++)m[l++]=f[q]}b=[];for(l=e=0;l<m.length;l++)m[l].className&&m[l].className.match(RegExp("\\b"+d+"\\b"))&&(b[e++]=m[l])}else{if(!b[0])return;e=token;m=[];for(p=l=0;p<b.length;p++)for(f=b[p].getElementsByTagName(e),q=0;q<f.length;q++)m[l++]=f[q];b=m}return b};
var NodeUtils={getNodeValue:function(a,b){var c=a.getElementsByTagName(b);if(0==c.length)return"";var c=c[0].childNodes,d="";for(i=0;i<c.length;i++)d+=c[i].nodeValue;return d},getNodeText:function(a){a=a.childNodes;var b="";for(i=0;i<a.length;i++)b+=a[i].nodeValue;return b},getAttrValue:function(a,b){for(k=0;k<a.attributes.length;k++)if(a.attributes[k].nodeName==b)return a.attributes[k].nodeValue;return null}},CommonUtils={getRow:function(a,b){var c=b.rows[a];if(null!=c)return c;if(null!=b.rows.head)return null;
for(k=0;k<b.rows.length;k++)if(b.rows[k].id==a)return b.rows[k];return null},getCell:function(a,b,c){var d=b.cells[a];if(null!=d)return d;if(null!=c.rows.head)return null;for(k=0;k<b.cells.length;k++)if(b.cells[k].id==a)return b.cells[k];return null},insertCell:function(a,b,c,d,e,m){a=a.insertCell(-1);a.id=b;d&&(a.align=d);a.className=c;e&&(a.height=e);a.innerHTML=m}};
function playSound(a){var b=document.createElement("div");-1!=navigator.userAgent.toLowerCase().indexOf("opera")&&(b.style="position: absolute; left: 0px; top: -200px;");document.body.appendChild(b);b.innerHTML='<audio autoplay src="'+a+'"><embed src="'+a+'" hidden="true" autostart="true" loop="false"></audio>'}function htmlescape(a){return a.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;").replace('"',"&quot;")};

View File

@ -1,11 +0,0 @@
window.attachEvent('onload', mkwidth);
window.attachEvent('onresize', mkwidth);
function mkwidth(){
if(document.getElementById("wrap700")) {
document.getElementById("wrap700").style.width = document.documentElement.clientWidth < 750 ? "750px" : "100%";
}
if(document.getElementById("wrap400")) {
document.getElementById("wrap400").style.width = document.documentElement.clientWidth < 450 ? "450px" : "100%";
}
};

View File

@ -1,61 +0,0 @@
var popupStatus = 0;
function loadPopup(){
if(popupStatus==0){
$("#backgroundPopup").css({
"opacity": "0.7"
});
$("#backgroundPopup").fadeIn("slow");
$("#dashlocalesPopup").fadeIn("slow");
popupStatus = 1;
}
}
function disablePopup(){
if(popupStatus==1){
$("#backgroundPopup").fadeOut("slow");
$("#dashlocalesPopup").fadeOut("slow");
popupStatus = 0;
}
}
function normpos(a) {
if(a < 10) {
return 10;
}
return a;
}
function centerPopup(){
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.documentElement.clientHeight;
var popupHeight = $("#dashlocalesPopup").height();
var popupWidth = $("#dashlocalesPopup").width();
$("#dashlocalesPopup").css({
"position": "absolute",
"top": normpos((windowHeight-popupHeight) * 0.2),
"left": normpos(windowWidth/2-popupWidth/2)
});
$("#backgroundPopup").css({
"height": windowHeight
});
}
$(function(){
$("#changelang").click(function(){
centerPopup();
loadPopup();
return false;
});
$("#dashlocalesPopupClose").click(function(){
disablePopup();
return false;
});
$("#backgroundPopup").click(function(){
disablePopup();
});
$(document).keypress(function(e){
if(e.keyCode==27 && popupStatus==1){
disablePopup();
}
});
});

View File

@ -1 +0,0 @@
Behaviour.register({"a#check-nv":function(a){a.onclick=function(){playSound(wroot+"/sounds/new_user.wav")}},"a#check-nm":function(a){a.onclick=function(){playSound(wroot+"/sounds/new_message.wav")}}});

View File

@ -1,33 +0,0 @@
function loadNews() {
if (typeof(window.mibewNews) == "undefined" || typeof(window.mibewNews.length) == "undefined")
return;
var str = "<div>";
for (var i = 0; i < window.mibewNews.length; i++) {
str += "<div class=\"newstitle\"><a hre" + "f=\"" + window.mibewNews[i].link + "\">" + window.mibewNews[i].title + "</a>, <span class=\"small\">" + window.mibewNews[i].date + "</span></div>";
str += "<div class=\"newstext\">" + window.mibewNews[i].message+"</div>";
}
$("#news").html(str + "</div>");
}
function loadVersion() {
if(typeof(window.mibewLatest) == "undefined" || typeof(window.mibewLatest.version) == "undefined")
return;
var current = $("#cver").html();
if(current != window.mibewLatest.version) {
if(current < window.mibewLatest.version) {
$("#cver").css("color","red");
}
$("#lver").html(window.mibewLatest.version+", Download <a href=\""+window.mibewLatest.download+"\">"+window.mibewLatest.title+"</a>");
} else {
$("#cver").css("color","green");
$("#lver").html(window.mibewLatest.version);
}
}
$(function(){
loadNews();
loadVersion();
});

View File

@ -1,27 +0,0 @@
/*
This file is part of Mibew Messenger project.
http://mibew.org
Copyright (c) 2005-2014 Mibew Messenger Community
License: http://mibew.org/license.php
*/
Ajax.PeriodicalUpdater=Class.create();
Class.inherit(Ajax.PeriodicalUpdater,Ajax.Base,{initialize:function(a){this.setOptions(a);this._options.onComplete=this.requestComplete.bind(this);this._options.onException=this.handleException.bind(this);this._options.onTimeout=this.handleTimeout.bind(this);this._options.timeout=5E3;this.frequency=this._options.frequency||2;this.updater={};this.update()},handleException:function(a,b){this._options.handleError&&this._options.handleError("offline, reconnecting");this.stopUpdate();this.timer=setTimeout(this.update.bind(this),
1E3)},handleTimeout:function(a){this._options.handleError&&this._options.handleError("timeout, reconnecting");this.stopUpdate();this.timer=setTimeout(this.update.bind(this),1E3)},stopUpdate:function(){this.updater._options&&(this.updater._options.onComplete=void 0);clearTimeout(this.timer)},update:function(){this._options.updateParams&&(this._options.parameters=this._options.updateParams());this.updater=new Ajax.Request(this._options.url,this._options)},requestComplete:function(a){try{var b=Ajax.getXml(a);
b?(this._options.updateContent||Ajax.emptyFunction)(b):this._options.handleError&&this._options.handleError("reconnecting")}catch(c){}this.timer=setTimeout(this.update.bind(this),1E3*this.frequency)}});
var HtmlGenerationUtils={popupLink:function(a,b,c,d,e,m,l){return'<a href="'+a+'"'+(null!=l?' class="'+l+'"':"")+' target="_blank" title="'+b+'" onclick="this.newWindow = window.open(\''+a+"', '"+c+"', 'toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width="+e+",height="+m+",resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;\">"+d+"</a>"},generateOneRowTable:function(a){return'<table class="inner"><tr>'+a+"</tr></table>"},viewOpenCell:function(a,b,c,d,e,m,l,p){m=
2;b=b+"?thread="+c;var f="<td>",f=e||d?f+HtmlGenerationUtils.popupLink(p||!d?b:b+"&viewonly=true",localized[e?0:1],"ImCenter"+c,a,640,480,null):f+('<a href="#">'+a+"</a>"),f=f+"</td>";e&&(f=f+'<td class="icon">'+HtmlGenerationUtils.popupLink(b,localized[0],"ImCenter"+c,'<img src="'+mibewRoot+'/images/tbliclspeak.gif" width="15" height="15" border="0" alt="'+localized[0]+'">',640,480,null),f+="</td>",m++);d&&(f+='<td class="icon">',f+=HtmlGenerationUtils.popupLink(b+"&viewonly=true",localized[1],"ImCenter"+
c,'<img src="'+mibewRoot+'/images/tbliclread.gif" width="15" height="15" border="0" alt="'+localized[1]+'">',640,480,null),f+="</td>",m++);""!=l&&(f+='</tr><tr><td class="firstmessage" colspan="'+m+'"><a href="javascript:void(0)" title="'+l+'" onclick="alert(this.title);return false;">',f+=30<l.length?l.substring(0,30)+"...":l,f+="</a></td>");return HtmlGenerationUtils.generateOneRowTable(f)},banCell:function(a,b){return'<td class="icon">'+HtmlGenerationUtils.popupLink(mibewRoot+"/operator/ban.php?"+
(b?"id="+b:"thread="+a),localized[2],"ban"+a,'<img src="'+mibewRoot+'/images/ban.gif" width="15" height="15" border="0" alt="'+localized[2]+'">',720,480,null)+"</td>"}};Ajax.ThreadListUpdater=Class.create();
Class.inherit(Ajax.ThreadListUpdater,Ajax.Base,{initialize:function(a){this.setOptions(a);this._options.updateParams=this.updateParams.bind(this);this._options.handleError=this.handleError.bind(this);this._options.updateContent=this.updateContent.bind(this);this._options.lastrevision=0;this.threadTimers={};this.delta=0;this.t=this._options.table;this.periodicalUpdater=new Ajax.PeriodicalUpdater(this._options)},updateParams:function(){return"since="+this._options.lastrevision+"&status="+this._options.istatus+
(this._options.showonline?"&showonline=1":"")},setStatus:function(a){this._options.status.innerHTML=a},handleError:function(a){this.setStatus(a)},updateThread:function(a){function b(a,b,c,d){if(a=CommonUtils.getCell(c,b,a))a.innerHTML=d}for(var c,d,e,m=!1,l=!1,p=!1,f=null,q=null,g=0;g<a.attributes.length;g++){var n=a.attributes[g];"id"==n.nodeName?c=n.nodeValue:"stateid"==n.nodeName?d=n.nodeValue:"state"==n.nodeName?e=n.nodeValue:"canopen"==n.nodeName?l=!0:"canview"==n.nodeName?m=!0:"canban"==n.nodeName?
p=!0:"ban"==n.nodeName?f=n.nodeValue:"banid"==n.nodeName&&(q=n.nodeValue)}g=CommonUtils.getRow("thr"+c,this.t);if("closed"==d)g&&this.t.deleteRow(g.rowIndex),this.threadTimers[c]=null;else{var n=NodeUtils.getNodeValue(a,"name"),u=NodeUtils.getNodeValue(a,"addr"),s=NodeUtils.getNodeValue(a,"time"),v=NodeUtils.getNodeValue(a,"agent"),t=NodeUtils.getNodeValue(a,"modified"),w=NodeUtils.getNodeValue(a,"message"),r="<td>"+NodeUtils.getNodeValue(a,"useragent")+"</td>";null!=f&&(r="<td>"+NodeUtils.getNodeValue(a,
"reason")+"</td>");p&&(r+=HtmlGenerationUtils.banCell(c,q));r=HtmlGenerationUtils.generateOneRowTable(r);a=CommonUtils.getRow("t"+d,this.t);p=CommonUtils.getRow("t"+d+"end",this.t);null!=g&&(g.rowIndex<=a.rowIndex||g.rowIndex>=p.rowIndex)&&(this.t.deleteRow(g.rowIndex),g=this.threadTimers[c]=null);if(null==g){if(g=this.t.insertRow(a.rowIndex+1),g.className="blocked"==f&&"chat"!=d?"ban":"in"+d,g.id="thr"+c,this.threadTimers[c]=[s,t,d],CommonUtils.insertCell(g,"name","visitor",null,null,HtmlGenerationUtils.viewOpenCell(n,
this._options.agentservl,c,m,l,f,w,"chat"!=d)),CommonUtils.insertCell(g,"contid","visitor","center",null,u),CommonUtils.insertCell(g,"state","visitor","center",null,e),CommonUtils.insertCell(g,"op","visitor","center",null,v),CommonUtils.insertCell(g,"time","visitor","center",null,this.getTimeSince(s)),CommonUtils.insertCell(g,"wait","visitor","center",null,"chat"!=d?this.getTimeSince(t):"-"),CommonUtils.insertCell(g,"etc","visitor","center",null,r),"wait"==d||"prio"==d)return!0}else this.threadTimers[c]=
[s,t,d],g.className="blocked"==f&&"chat"!=d?"ban":"in"+d,b(this.t,g,"name",HtmlGenerationUtils.viewOpenCell(n,this._options.agentservl,c,m,l,f,w,"chat"!=d)),b(this.t,g,"contid",u),b(this.t,g,"state",e),b(this.t,g,"op",v),b(this.t,g,"time",this.getTimeSince(s)),b(this.t,g,"wait","chat"!=d?this.getTimeSince(t):"-"),b(this.t,g,"etc",r);return!1}},updateQueueMessages:function(){function a(a,b){var c=$(b),l=$(b+"end");return null==c||null==l?!1:c.rowIndex+1<l.rowIndex}var b=$("statustd");if(b){var c=a(this.t,
"twait")||a(this.t,"tprio")||a(this.t,"tchat");b.innerHTML=c?"":this._options.noclients;b.height=c?5:30}},getTimeSince:function(a){a=Math.floor(((new Date).getTime()-a-this.delta)/1E3);var b=Math.floor(a/60),c="";a%=60;10>a&&(a="0"+a);60<=b&&(c=Math.floor(b/60),b%=60,10>b&&(b="0"+b),c+=":");return c+b+":"+a},updateTimers:function(){for(var a in this.threadTimers)if(null!=this.threadTimers[a]){var b=this.threadTimers[a],c=CommonUtils.getRow("thr"+a,this.t);if(null!=c){var d=this.getTimeSince(b[0]),
e=CommonUtils.getCell("time",c,this.t);e&&(e.innerHTML=d);b="chat"!=b[2]?this.getTimeSince(b[1]):"-";if(c=CommonUtils.getCell("wait",c,this.t))c.innerHTML=b}}},updateThreads:function(a){var b=!1,c=NodeUtils.getAttrValue(a,"time"),d=NodeUtils.getAttrValue(a,"revision");c&&(this.delta=(new Date).getTime()-c);d&&(this._options.lastrevision=d);for(c=0;c<a.childNodes.length;c++)d=a.childNodes[c],"thread"==d.tagName&&this.updateThread(d)&&(b=!0);this.updateQueueMessages();this.updateTimers();this.setStatus(this._options.istatus?
"Away":"Up to date");b&&(playSound(mibewRoot+"/sounds/new_user.wav"),window.focus(),updaterOptions.showpopup&&alert(localized[5]))},updateOperators:function(a){var b=$("onlineoperators");if(b){for(var c=[],d=0;d<a.childNodes.length;d++){var e=a.childNodes[d];if("operator"==e.tagName){var m=NodeUtils.getAttrValue(e,"name"),e=null!=NodeUtils.getAttrValue(e,"away");c[c.length]='<img src="'+mibewRoot+"/images/op"+(e?"away":"online")+'.gif" width="12" height="12" border="0" alt="'+localized[1]+'"> '+m}}b.innerHTML=
c.join(", ")}},updateContent:function(a){if("update"==a.tagName)for(var b=0;b<a.childNodes.length;b++){var c=a.childNodes[b];"threads"==c.tagName?this.updateThreads(c):"operators"==c.tagName&&this.updateOperators(c)}else"error"==a.tagName?this.setStatus(NodeUtils.getNodeValue(a,"descr")):this.setStatus("reconnecting")}});
function togglemenu(){$("sidebar")&&($("wcontent")&&$("togglemenu"))&&("contentnomenu"==$("wcontent").className?($("sidebar").style.display="block",$("wcontent").className="contentinner",$("togglemenu").innerHTML=localized[4]):($("sidebar").style.display="none",$("wcontent").className="contentnomenu",$("togglemenu").innerHTML=localized[3]))}var mibewRoot="";Behaviour.register({"#togglemenu":function(a){a.onclick=function(){togglemenu()}}});
EventHelper.register(window,"onload",function(){mibewRoot=updaterOptions.wroot;new Ajax.ThreadListUpdater({table:$("threadlist"),status:$("connstatus"),istatus:0}.extend(updaterOptions||{}));updaterOptions.havemenu||togglemenu()});

View File

View File

@ -1,154 +0,0 @@
/*!
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
*
* Date: Sat Feb 13 22:33:48 2010 -0500
*/
(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);

View File

@ -0,0 +1,37 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(Mibew, $) {
$(document).ready(function() {
$('a.remove-link').click(function() {
var url = $(this).attr('href'),
message = Mibew.Localization.trans(
'Are you sure that you want to delete address {0} from the blocked list?',
$(this).data('ban-address')
);
Mibew.Utils.confirm(message, function(value) {
if (value) {
window.location.href = url;
}
});
return false;
});
});
})(Mibew, jQuery);

View File

@ -1,30 +0,0 @@
var myAgent = "";
var myVer = 0;
var myRealAgent = "";
function detectAgent() {
var AGENTS = ["opera","msie","safari","firefox","netscape","mozilla"];
var agent = navigator.userAgent.toLowerCase();
for (var i = 0; i < AGENTS.length; i++) {
var agentStr = AGENTS[i];
if (agent.indexOf(agentStr) != -1) {
myAgent = agentStr;
if (!window.RegExp)
break;
var versionExpr = new RegExp(agentStr + "[ \/]?([0-9]+(\.[0-9]+)?)");
if (versionExpr.exec(agent) != null) {
myVer = parseFloat(RegExp.$1);
}
break;
}
}
myRealAgent = myAgent;
if( navigator.product == "Gecko")
myAgent = "moz";
}
detectAgent();
function getEl(name) {
return document.getElementById(name);
}

View File

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="update" name="Obfuscator">
<property name="closure.c" value="/usr/local/closure/compiler.jar" />
<property name="mibew.location" value="../169" />
<target name="update">
<java jar="${closure.c}" fork="true">
<arg value="--module_output_path_prefix"/>
<arg value="${mibew.location}/"/>
<arg value="--module"/>
<arg value="common:1"/>
<arg value="--js"/>
<arg value="common.js"/>
<arg value="--module"/>
<arg value="chat:1:common"/>
<arg value="--js"/>
<arg value="chat.js"/>
<arg value="--module"/>
<arg value="users:1:common"/>
<arg value="--js"/>
<arg value="users.js"/>
<arg value="--module"/>
<arg value="brws:1:common"/>
<arg value="--js"/>
<arg value="brws.js"/>
<arg value="--module"/>
<arg value="soundcheck:1:common"/>
<arg value="--js"/>
<arg value="soundcheck.js"/>
</java>
</target>
</project>

View File

@ -1,6 +1,7 @@
<?php /*!
/* * This file is a part of Mibew Messenger.
* Copyright 2005-2014 the original author or authors. *
* Copyright 2005-2023 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -15,17 +16,11 @@
* limitations under the License. * limitations under the License.
*/ */
require_once('../libs/common.php'); (function(Mibew, $) {
require_once('../libs/operator.php'); $(document).ready(function(){
$('#copy-button-code').click(function(e){
$operator = check_login(false); $("#button-code").select();
document.execCommand('copy');
start_xml_output(); });
if ($operator) { });
echo "<login><status>OK</status></login>"; })(Mibew, jQuery);
} else {
echo "<login><status>FAILED</status></login>";
}
exit;
?>

View File

@ -1,400 +0,0 @@
/**
* @preserve This file is part of Mibew Messenger project.
* http://mibew.org
*
* Copyright (c) 2005-2014 Mibew Messenger Community
* License: http://mibew.org/license.php
*/
var FrameUtils = {
getDocument: function(frm) {
if (frm.contentDocument) {
return frm.contentDocument;
} else if (frm.contentWindow) {
return frm.contentWindow.document;
} else if (frm.document) {
return frm.document;
} else {
return null;
}
},
initFrame: function(frm) {
var doc = this.getDocument(frm);
doc.open();
doc.write("<html><head>");
doc.write("<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\""+Chat.cssfile+"\">");
doc.write("</head><body bgcolor=\"#FFFFFF\" text=#000000\" link=\"#C28400\" vlink=\"#C28400\" alink=\"#C28400\">");
doc.write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td valign=\"top\" class=\"message\" id=\"content\"></td></tr></table><a id=\"bottom\" name=\"bottom\"></a>");
doc.write("</body></html>");
doc.close();
frm.onload = function() {
if( frm.myHtml ) {
FrameUtils.getDocument(frm).getElementById('content').innerHTML += frm.myHtml;
FrameUtils.scrollDown(frm);
}
};
},
insertIntoFrame: function(frm, htmlcontent) {
var vcontent = this.getDocument(frm).getElementById('content');
if( vcontent == null ) {
if( !frm.myHtml ) frm.myHtml = "";
frm.myHtml += htmlcontent;
} else {
vcontent.innerHTML += htmlcontent;
}
},
scrollDown: function(frm) {
var vbottom = this.getDocument(frm).getElementById('bottom');
if( myAgent == 'opera' ) {
try {
frm.contentWindow.scrollTo(0,this.getDocument(frm).getElementById('content').clientHeight);
} catch(e) {}
}
if( vbottom ) {
vbottom.scrollIntoView(false);
}
}
};
Ajax.ChatThreadUpdater = Class.create();
Class.inherit( Ajax.ChatThreadUpdater, Ajax.Base, {
initialize: function(_options) {
this.setOptions(_options);
this._options.onComplete = this.requestComplete.bind(this);
this._options.onException = this.handleException.bind(this);
this._options.onTimeout = this.handleTimeout.bind(this);
this._options.timeout = 5000;
this.updater = {};
this.frequency = (this._options.frequency || 2);
this.lastupdate = 0;
this.cansend = true;
this.skipNextsound = true;
this.focused = true;
this.ownThread = this._options.message != null;
FrameUtils.initFrame(this._options.container);
if( this._options.message ) {
this._options.message.onkeydown = this.handleKeyDown.bind(this);
this._options.message.onfocus = (function() { this.focused = true; }).bind(this);
this._options.message.onblur = (function() { this.focused = false; }).bind(this)
}
this.update();
},
handleException: function(_request, ex) {
this.setStatus("offline, reconnecting");
this.stopUpdate();
this.timer = setTimeout(this.update.bind(this), 1000);
},
handleTimeout: function(_request) {
this.setStatus("timeout, reconnecting");
this.stopUpdate();
this.timer = setTimeout(this.update.bind(this), 1000);
},
updateOptions: function(act) {
this._options.parameters = 'act='+act+'&thread=' + (this._options.threadid || 0) +
'&token=' + (this._options.token || 0)+
'&lastid=' + (this._options.lastid || 0);
if( this._options.user )
this._options.parameters += "&user=true";
if( act == 'refresh' && this._options.message && this._options.message.value != '' )
this._options.parameters += "&typed=1";
},
enableInput: function(val) {
if( this._options.message )
this._options.message.disabled = !val;
},
stopUpdate: function() {
this.enableInput(true);
if( this.updater._options )
this.updater._options.onComplete = undefined;
clearTimeout(this.timer);
},
update: function() {
this.updateOptions("refresh");
this.updater = new Ajax.Request(this._options.servl, this._options);
},
requestComplete: function(_response) {
try {
this.enableInput(true);
this.cansend = true;
var xmlRoot = Ajax.getXml(_response);
if( xmlRoot && xmlRoot.tagName == 'thread' ) {
this.updateContent( xmlRoot );
} else {
this.handleError(_response, xmlRoot, 'refresh messages failed');
}
} catch (e) {
}
this.skipNextsound = false;
this.timer = setTimeout(this.update.bind(this), this.frequency * 1000);
},
postMessage: function(msg) {
if( msg == "" || !this.cansend) {
return;
}
this.cansend = false;
this.stopUpdate();
this.skipNextsound = true;
this.updateOptions("post");
var postOptions = {}.extend(this._options);
postOptions.parameters += "&message=" + encodeURIComponent(msg);
postOptions.onComplete = (function(presponse) {
this.requestComplete( presponse );
if( this._options.message ) {
this._options.message.value = '';
this._options.message.focus();
}
}).bind(this);
if( myRealAgent != 'opera' )
this.enableInput(false);
this.updater = new Ajax.Request(this._options.servl, postOptions);
},
changeName: function(newname) {
this.skipNextsound = true;
new Ajax.Request(this._options.servl, {parameters:'act=rename&thread=' + (this._options.threadid || 0) +
'&token=' + (this._options.token || 0) + '&name=' + encodeURIComponent(newname)});
},
onThreadClosed: function(_response) {
var xmlRoot = Ajax.getXml(_response);
if( xmlRoot && xmlRoot.tagName == 'closed' ) {
setTimeout('window.close()', 2000);
} else {
this.handleError(_response, xmlRoot, 'cannot close');
}
},
closeThread: function() {
var _params = 'act=close&thread=' + (this._options.threadid || 0) + '&token=' + (this._options.token || 0);
if( this._options.user )
_params += "&user=true";
new Ajax.Request(this._options.servl, {parameters:_params, onComplete: this.onThreadClosed.bind(this)});
},
processMessage: function(_target, message) {
var destHtml = NodeUtils.getNodeText(message);
FrameUtils.insertIntoFrame(_target, destHtml );
},
showTyping: function(istyping) {
if( $("typingdiv") ) {
$("typingdiv").style.display=istyping ? 'inline' : 'none';
}
},
setupAvatar: function(avatar) {
var imageLink = NodeUtils.getNodeText(avatar);
if( this._options.avatar && this._options.user ) {
this._options.avatar.innerHTML = imageLink != ""
? "<img src=\""+Chat.mibewRoot+"/images/free.gif\" width=\"7\" height=\"1\" border=\"0\" alt=\"\" /><img src=\""
+imageLink+ "\" border=\"0\" alt=\"\"/>"
: "";
}
},
updateContent: function(xmlRoot) {
var haveMessage = false;
var result_div = this._options.container;
var _lastid = NodeUtils.getAttrValue(xmlRoot, "lastid");
if( _lastid ) {
this._options.lastid = _lastid;
}
var typing = NodeUtils.getAttrValue(xmlRoot, "typing");
if( typing ) {
this.showTyping(typing == '1');
}
var canpost = NodeUtils.getAttrValue(xmlRoot, "canpost");
if( canpost ) {
if( canpost == '1' && !this.ownThread || this.ownThread && canpost != '1' ) {
window.location.href = window.location.href;
}
}
for( var i = 0; i < xmlRoot.childNodes.length; i++ ) {
var node = xmlRoot.childNodes[i];
if( node.tagName == 'message' ) {
haveMessage = true;
this.processMessage(result_div, node);
} else if( node.tagName == 'avatar' ) {
this.setupAvatar(node);
}
}
if(window.location.search.indexOf('trace=on')>=0) {
var val = "updated";
if(this.lastupdate > 0) {
var seconds = ((new Date()).getTime() - this.lastupdate)/1000;
val = val + ", " + seconds + " secs";
if(seconds > 10) {
alert(val);
}
}
this.lastupdate = (new Date()).getTime();
this.setStatus(val);
} else {
this.clearStatus();
}
if( haveMessage ) {
FrameUtils.scrollDown(this._options.container);
if(!this.skipNextsound) {
var tsound = $('soundimg');
if(tsound == null || tsound.className.match(new RegExp("\\bisound\\b")) ) {
playSound(Chat.mibewRoot+'/sounds/new_message.wav');
}
}
if( !this.focused ) {
window.focus();
}
}
},
isSendkey: function(ctrlpressed, key) {
return ((key==13 && (ctrlpressed || this._options.ignorectrl)) || (key==10));
},
handleKeyDown: function(k) {
if( k ){ ctrl=k.ctrlKey;k=k.which; } else { k=event.keyCode;ctrl=event.ctrlKey; }
if( this._options.message && this.isSendkey(ctrl, k) ) {
var mmsg = this._options.message.value;
if( this._options.ignorectrl ) {
mmsg = mmsg.replace(/[\r\n]+$/,'');
}
this.postMessage( mmsg );
return false;
}
return true;
},
handleError: function(_response, xmlRoot, _action) {
if( xmlRoot && xmlRoot.tagName == 'error' ) {
this.setStatus(NodeUtils.getNodeValue(xmlRoot,"descr"));
} else {
this.setStatus("reconnecting");
}
},
showStatusDiv: function(k) {
if( $("engineinfo") ) {
$("engineinfo").style.display='inline';
$("engineinfo").innerHTML = k;
}
},
setStatus: function(k) {
if( this.statusTimeout )
clearTimeout(this.statusTimeout);
this.showStatusDiv(k);
this.statusTimeout = setTimeout(this.clearStatus.bind(this), 4000);
},
clearStatus: function() {
$("engineinfo").style.display='none';
}
});
var Chat = {
threadUpdater : {},
applyName: function() {
if ( !$('uname').value.match(/^\s*$/) ) {
Chat.threadUpdater.changeName($('uname').value);
$('changename1').style.display='none';
$('changename2').style.display='inline';
$('unamelink').innerHTML = htmlescape($('uname').value);
}
},
showNameField: function() {
$('changename1').style.display='inline';
$('changename2').style.display='none';
}
};
Behaviour.register({
'#postmessage a' : function(el) {
el.onclick = function() {
var message = $('msgwnd');
if( message )
Chat.threadUpdater.postMessage(message.value);
};
},
'select#predefined' : function(el) {
el.onchange = function() {
var message = $('msgwnd');
if(this.selectedIndex!=0) {
message.value = this.options[this.selectedIndex].innerText || this.options[this.selectedIndex].innerHTML;
}
this.selectedIndex = 0;
message.focus();
};
},
'div#changename2 a' : function(el) {
el.onclick = function() {
Chat.showNameField();
return false;
};
},
'div#changename1 a' : function(el) {
el.onclick = function() {
Chat.applyName();
return false;
};
},
'div#changename1 input#uname' : function(el) {
el.onkeydown = function(e) {
var ev = e || event;
if( ev.keyCode == 13 ) {
Chat.applyName();
}
};
},
'a#refresh' : function(el) {
el.onclick = function() {
Chat.threadUpdater.stopUpdate();
Chat.threadUpdater.update();
};
},
'a#togglesound' : function(el) {
el.onclick = function() {
var tsound = $('soundimg');
if(!tsound) {
return;
}
if(tsound.className.match(new RegExp("\\bisound\\b"))) {
tsound.className = "tplimage inosound";
} else {
tsound.className = "tplimage isound";
}
var messagePane = $('msgwnd');
if(messagePane)
messagePane.focus();
};
},
'a.closethread' : function(el) {
el.onclick = function() {
Chat.threadUpdater.closeThread();
};
}
});
EventHelper.register(window, 'onload', function(){
Chat.mibewRoot = threadParams.wroot;
Chat.cssfile = threadParams.cssfile;
Chat.threadUpdater = new Ajax.ChatThreadUpdater(({ignorectrl:-1,container:myRealAgent=='safari'?self.frames[0]:$("chatwnd"),avatar:$("avatarwnd"),message:$("msgwnd")}).extend( threadParams || {} ));
});

View File

@ -0,0 +1,63 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function (Mibew, _) {
// Create shortcut for application
var app = Mibew.Application;
// Define regions
app.addRegions({
mainRegion: '#main-region'
});
// Initialize application
app.addInitializer(function(options){
// Initialize Server
Mibew.Objects.server = new Mibew.Server(_.extend(
{'interactionType': MibewAPIChatInteraction},
options.server
));
// Initialize Page
Mibew.Objects.Models.page = new Mibew.Models.Page(options.page);
switch (options.startFrom) {
case 'chat':
app.Chat.start(options.chatOptions);
break;
case 'survey':
app.Survey.start(options.surveyOptions);
break;
case 'leaveMessage':
app.LeaveMessage.start(options.leaveMessageOptions);
break;
case 'invitation':
app.Invitation.start(options.invitationOptions);
break;
default:
throw new Error("Don't know how to start!");
}
});
app.on('start', function() {
// Run Server updater
Mibew.Objects.server.runUpdater();
});
})(Mibew, _);

View File

@ -0,0 +1,49 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(Mibew) {
/**
* @class Represents messages list view
*/
Mibew.Views.MessagesCollection = Mibew.Views.CollectionBase.extend(
/** @lends Mibew.Views.MessagesCollection.prototype */
{
/**
* Class name for view's DOM element
* @type String
*/
className: 'messages-collection',
/**
* Returns default child view constructor.
*
* The function is used instead of "childView" property to provide
* an ability to override child view constructor without this class
* overriding.
*
* @param {Backbone.Model} model The model the view created for.
* @returns {Backbone.Marionette.ItemView}
*/
getChildView: function(model) {
return Mibew.Views.Message;
}
}
);
})(Mibew);

View File

@ -0,0 +1,49 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(Mibew) {
/**
* @class Represents Status bar view
*/
Mibew.Views.StatusCollection = Mibew.Views.CollectionBase.extend(
/** @lends Mibew.Views.StatusCollection.prototype */
{
/**
* Class name for view's DOM element
* @type String
*/
className: 'status-collection',
/**
* Returns default child view constructor.
*
* The function is used instead of "childView" property to provide
* an ability to override child view constructor without this class
* overriding.
*
* @param {Backbone.Model} model The model the view created for.
* @returns {Backbone.Marionette.ItemView}
*/
getChildView: function(model) {
return Mibew.Views.Status;
}
}
);
})(Mibew);

View File

@ -0,0 +1,193 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(Mibew, Backbone, _){
/**
* @class Represents messages list
*/
Mibew.Collections.Messages = Backbone.Collection.extend(
/** @lends Mibew.Collections.Message.prototype */
{
/**
* Default contructor for model
* @type Function
*/
model: Mibew.Models.Message,
/**
* Collection initializer.
*/
initialize: function() {
/**
* Contains ids of periodically called functions
* @type Array
*/
this.periodicallyCalled = [];
// Periodically try to get new messages
this.periodicallyCalled.push(
Mibew.Objects.server.callFunctionsPeriodically(
_.bind(this.updateMessagesFunctionBuilder, this),
_.bind(this.updateMessages, this)
)
);
},
/**
* Collection finalizer
*/
finalize: function() {
// Stop call functions periodically
for (var i = 0; i < this.periodicallyCalled.length; i++) {
Mibew.Objects.server.stopCallFunctionsPeriodically(
this.periodicallyCalled[i]
);
}
},
/**
* Update messages if they are exist.
* @param args {Object} An object of passed arguments
*/
updateMessages: function(args) {
// Update last message id
if (args.lastId) {
Mibew.Objects.Models.thread.set({lastId: args.lastId});
}
// Use shortcut for KIND_PLUGIN
var kindPlugin = Mibew.Models.Message.prototype.KIND_PLUGIN;
// Get all new messages
var newMessages = [];
var messageData, pluginName, eventName, eventArgs;
for(var i = 0, length = args.messages.length; i < length; i++) {
messageData = args.messages[i];
if (messageData.kind != kindPlugin) {
// Message have one of the core kinds. Just store it.
newMessages.push(
new Mibew.Models.Message(messageData)
);
continue;
}
// Message have KIND_PLUGIN kind and need to be processed
// by plugins to know how to display it.
// Check if message is an real Object
if ((typeof messageData.data != 'object')
|| (messageData.data === null)) {
continue;
}
// Prepare event name.
//
// If plugin name was specified it will be
// 'process:<plugin_name>:plugin:message' and
// 'process:plugin:message' otherwise.
pluginName = messageData.plugin || false;
eventName = 'process:'
+ ((pluginName !== false) ? pluginName + ':' : '')
+ 'plugin:message';
// Prepare event arguments.
//
// It is an object with following fields:
// - 'messageData': object which contains message data
// passed from server.
// - 'model': message model initialized by the plugin or
// boolean false if message should not be displayed. By
// default it field equals to boolean false.
eventArgs = {
'messageData': messageData,
'model': false
};
// Trigger event. See description of eventName and eventArgs
// above.
this.trigger(eventName, eventArgs);
if (eventArgs.model) {
// Check if plugin set message id
if (! eventArgs.model.get('id')) {
// Message must have an id, set it
eventArgs.model.set({'id': messageData.id});
}
// Store custom plugin message in the collection
newMessages.push(
eventArgs.model
);
}
}
// Add new messages to the message collection if there are any
// messages
if (newMessages.length > 0) {
this.add(newMessages);
}
},
/**
* Builds updateMessages function, that should be called
* periodically at the server side
* @returns {Object[]} Array of functions objects
*/
updateMessagesFunctionBuilder: function() {
// Get thread and user objects
var thread = Mibew.Objects.Models.thread;
var user = Mibew.Objects.Models.user;
// Build functions list
return [
{
"function": "updateMessages",
"arguments": {
"return": {
'messages': 'messages',
'lastId': 'lastId'
},
"references": {},
"threadId": thread.get('id'),
"token": thread.get('token'),
"lastId": thread.get('lastId'),
"user": (! user.get('isAgent'))
}
}
];
},
/**
* Override Backbone.Collection.add method to call additional event
*/
add: function() {
// Get arguments list
var args = Array.prototype.slice.apply(arguments);
// Call method of the parent class
var res = Backbone.Collection.prototype.add.apply(this, args);
// Triggers additional event
this.trigger('multiple:add');
return res;
}
}
);
})(Mibew, Backbone, _);

View File

@ -0,0 +1,37 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(Mibew, Backbone){
/**
* @class Represents status bar
*/
Mibew.Collections.Status = Backbone.Collection.extend(
/** @lends Mibew.Collections.Status.prototype */
{
/**
* Use for sort controls in collection
* @param {Backbone.Model} model Control model
*/
comparator: function(model) {
return model.get('weight');
}
}
);
})(Mibew, Backbone);

View File

@ -0,0 +1,37 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(Mibew){
/**
* @namespace Holds application region constructors
*/
Mibew.Regions = {};
/**
* @namespace Holds application layouts constructors
*/
Mibew.Layouts = {};
/**
* Create application instance.
* @type Backbone.Marionette.Application
*/
Mibew.Application = new Backbone.Marionette.Application();
})(Mibew);

View File

@ -0,0 +1,67 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(Mibew, Backbone){
/**
* Represents chat layout
*/
Mibew.Layouts.Chat = Backbone.Marionette.LayoutView.extend(
/** @lends Mibew.Layouts.Chat.prototype */
{
/**
* Template function
* @type Function
*/
template: Handlebars.templates['chat/layout'],
/**
* Regions list
* @type Object
*/
regions: {
controlsRegion: '#controls-region',
avatarRegion: '#avatar-region',
messagesRegion: {
selector: '#messages-region',
regionClass: Mibew.Regions.Messages
},
statusRegion: '#status-region',
messageFormRegion: '#message-form-region'
},
/**
* Override Backbone.Marionette.ItemView.serializeData to pass some
* extra fields to template.
*
* Use undocumented feature of layouts: passing data to template via
* serializeData method.
*
* @returns {Object} Template data
*/
serializeData: function() {
var models = Mibew.Objects.Models;
return {
page: models.page.toJSON(),
user: models.user.toJSON()
};
}
}
);
})(Mibew, Backbone);

View File

@ -0,0 +1,46 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(Mibew, Backbone){
/**
* Represents invitation layout
*/
Mibew.Layouts.Invitation = Backbone.Marionette.LayoutView.extend(
/** @lends Mibew.Layouts.Invitation.prototype */
{
/**
* Template function
* @type Function
*/
template: Handlebars.templates['invitation/layout'],
/**
* Regions list
* @type Object
*/
regions: {
messagesRegion: {
selector: '#invitation-messages-region',
regionClass: Mibew.Regions.Messages
}
}
}
);
})(Mibew, Backbone);

View File

@ -0,0 +1,59 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(Mibew, Backbone){
/**
* Represents leave message page layout
*/
Mibew.Layouts.LeaveMessage = Backbone.Marionette.LayoutView.extend(
/** @lends Mibew.Layouts.LeaveMessage.prototype */
{
/**
* Template function
* @type Function
*/
template: Handlebars.templates['leave_message/layout'],
/**
* Regions list
* @type Object
*/
regions: {
leaveMessageFormRegion: '#content-wrapper',
descriptionRegion: '#description-region'
},
/**
* Override Backbone.Marionette.ItemView.serializeData to pass some
* extra fields to template.
*
* Use undocumented feature of layouts: passing data to template via
* serializeData method.
*
* @returns {Object} Template data
*/
serializeData: function() {
return {
page: Mibew.Objects.Models.page.toJSON()
};
}
}
);
})(Mibew, Backbone);

View File

@ -0,0 +1,58 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(Mibew, Backbone){
/**
* Represents survey layout
*/
Mibew.Layouts.Survey = Backbone.Marionette.LayoutView.extend(
/** @lends Mibew.Layouts.Survey.prototype */
{
/**
* Template function
* @type Function
*/
template: Handlebars.templates['survey/layout'],
/**
* Regions list
* @type Object
*/
regions: {
surveyFormRegion: '#content-wrapper'
},
/**
* Override Backbone.Marionette.ItemView.serializeData to pass some
* extra fields to template.
*
* Use undocumented feature of layouts: passing data to template via
* serializeData method.
*
* @returns {Object} Template data
*/
serializeData: function() {
return {
page: Mibew.Objects.Models.page.toJSON()
};
}
}
);
})(Mibew, Backbone);

View File

@ -0,0 +1,45 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Represents Chat Window to core interaction type
*
* @constructor
*/
MibewAPIChatInteraction = function() {
this.mandatoryArguments = function() {
return {
'*': {
'threadId': null,
'token': null,
'return': {},
'references': {}
},
'result': {
'errorCode': 0
}
};
};
this.getReservedFunctionsNames = function() {
return [
'result'
];
};
};
MibewAPIChatInteraction.prototype = new MibewAPIInteraction();

View File

@ -0,0 +1,49 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(Mibew, Backbone, Handlebars) {
/**
* @class Represents user avatar view
*/
Mibew.Views.Avatar = Backbone.Marionette.ItemView.extend(
/** @lends Mibew.Views.Avatar.prototype */
{
/**
* Template function
* @type Function
*/
template: Handlebars.templates['chat/avatar'],
/**
* Class name for view's DOM element
* @type String
*/
className: 'avatar',
/**
* Map model events to the view methods
* @type Object
*/
modelEvents: {
'change': 'render'
}
}
);
})(Mibew, Backbone, Handlebars);

View File

@ -0,0 +1,65 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(Mibew, Handlebars, _) {
/**
* @class Represents Close control view
*/
Mibew.Views.CloseControl = Mibew.Views.Control.extend(
/** @lends Mibew.Views.CloseControl.prototype */
{
/**
* Template function
* @type Function
*/
template: Handlebars.templates['chat/controls/close'],
/**
* Map ui events to view methods
* The view inherits events from
* {@link Mibew.Views.Control.prototype.events}.
* @type Object
*/
events: _.extend(
{},
Mibew.Views.Control.prototype.events,
{
'click': 'closeThread'
}
),
/**
* Display confirmation dialog and close chat window
*/
closeThread: function() {
// Show confirmation message if can
var confirmMessage = Mibew.Localization.trans('Are you sure that you want to leave the chat?'),
context = this;
if (confirmMessage !== false) {
Mibew.Utils.confirm(confirmMessage, function(value) {
if (value) {
context.model.closeThread();
}
});
}
}
}
);
})(Mibew, Handlebars, _);

View File

@ -0,0 +1,69 @@
/*!
* This file is a part of Mibew Messenger.
*
* Copyright 2005-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(Mibew, Handlebars, _) {
/**
* @class Represents History control view
*/
Mibew.Views.HistoryControl = Mibew.Views.Control.extend(
/** @lends Mibew.Views.HistoryControl.prototype */
{
/**
* Template function
* @type Function
*/
template: Handlebars.templates['chat/controls/history'],
/**
* Map ui events to view methods
* The view inherits events from
* {@link Mibew.Views.Control.prototype.events}.
* @type Object
*/
events: _.extend(
{},
Mibew.Views.Control.prototype.events,
{
'click': 'showHistory'
}
),
/**
* Display history window
*/
showHistory: function() {
var user = Mibew.Objects.Models.user;
var link = this.model.get('link');
if (user.get('isAgent') && link) {
var winParams = Mibew.Utils.buildWindowParams(this.model.get('windowParams'));
// TODO: Kill &amp; at the server side
link = link.replace('&amp;', '&', 'g');
var newWindow = window.open(link, 'UserHistory', winParams);
if (newWindow !== null) {
newWindow.focus();
newWindow.opener=window;
}
}
}
}
);
})(Mibew, Handlebars, _);

Some files were not shown because too many files have changed in this diff Show More