Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use buddy background and foreground color for list and template screen #11

Open
wants to merge 444 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
444 commits
Select commit Hold shift + click to select a range
12d34b8
image editor save for all operations
AvinashAgarwal14 Aug 9, 2019
a4884da
editor changes
AvinashAgarwal14 Aug 10, 2019
11e30c5
crop issue fixed
AvinashAgarwal14 Aug 11, 2019
252c723
Merge pull request #83 from AvinashAgarwal14/Image-Editor-Integration
llaske Aug 13, 2019
09b6d99
Update insert image icon
Aug 13, 2019
9465b4c
Merge branch 'master' of https://github.com/llaske/ExerciserReact
Aug 13, 2019
1db2def
Update default thumbnail images
Aug 14, 2019
5a00afe
lib update
AvinashAgarwal14 Aug 14, 2019
012c28d
merge
AvinashAgarwal14 Aug 14, 2019
f6d1faf
screenshots images changed
AvinashAgarwal14 Aug 14, 2019
b5af6e8
empty presense error solved
AvinashAgarwal14 Aug 14, 2019
7388392
small fixes
AvinashAgarwal14 Aug 15, 2019
03b84db
small fixes mcq align
AvinashAgarwal14 Aug 15, 2019
ddffb57
indent to tabs
AvinashAgarwal14 Aug 15, 2019
12d7a55
group assign ui fix
AvinashAgarwal14 Aug 15, 2019
b1fe0c2
Image Editor error fixed
AvinashAgarwal14 Aug 18, 2019
aad0fc8
embeding media element in default exercises solved
AvinashAgarwal14 Aug 18, 2019
8fd6c77
readme added for sounds
AvinashAgarwal14 Aug 20, 2019
a28c411
readme added for videos
AvinashAgarwal14 Aug 20, 2019
1230165
readme added for images
AvinashAgarwal14 Aug 20, 2019
ded9cd6
readme updated
AvinashAgarwal14 Aug 20, 2019
0194170
readme added for images
AvinashAgarwal14 Aug 20, 2019
ef359db
readme updated
AvinashAgarwal14 Aug 20, 2019
90c58c2
image editor close issue fixed
AvinashAgarwal14 Aug 21, 2019
c0d754f
service worker disabled
AvinashAgarwal14 Aug 21, 2019
40e495e
Merge pull request #84 from AvinashAgarwal14/master
llaske Aug 21, 2019
30fcaa0
Add 2 default exercises
Aug 23, 2019
f5af060
localiation issue solved
AvinashAgarwal14 Aug 23, 2019
c919934
localization optimized
AvinashAgarwal14 Aug 24, 2019
4ee8dab
Improve French translation
Aug 25, 2019
d61cc55
Integrate localization issue
Aug 25, 2019
7ee534d
Integration other localization issue
Aug 25, 2019
bb03555
intro tutorial added
AvinashAgarwal14 Aug 26, 2019
f7e2ca5
Fix French translation
Aug 26, 2019
74aec85
Fix typo in French translation
Aug 29, 2019
cf87654
Localize activity name
Aug 29, 2019
127bf8a
exercise counter issue fixed
AvinashAgarwal14 Aug 30, 2019
de56775
merge
AvinashAgarwal14 Aug 30, 2019
e600b27
Merge pull request #87 from AvinashAgarwal14/master
llaske Sep 1, 2019
d2f35a9
Be consistent on network button position
Sep 1, 2019
74be275
Fix activity palette icon colors
Sep 8, 2019
5054004
Remove debug trace on insert header
Sep 17, 2019
26f94d0
Added editor mode
Uasked4dat Dec 10, 2019
5f30b14
Merge branch 'master' of https://github.com/Uasked4dat/ExerciserReact
Uasked4dat Dec 10, 2019
b820e9b
Fixed redundant code and and issues mentioned
Uasked4dat Dec 11, 2019
b6e0c4b
Tutorial fixed (now compatible with editor mode)
Uasked4dat Dec 12, 2019
8786778
share button working again
Uasked4dat Dec 13, 2019
5c943cf
console log removed
Uasked4dat Dec 13, 2019
287a11a
Fully fixed issue (I hope)
Uasked4dat Dec 13, 2019
5414621
Merge pull request #89 from Uasked4dat/master
llaske Dec 14, 2019
0dc3a1f
Initialize presence as secure depending of location.protocol
Feb 2, 2020
762c4cd
Merge branch 'master' of https://github.com/llaske/ExerciserReact
Feb 2, 2020
20ab3cc
Fix journalchooser.js in Abecedarium
Feb 13, 2020
b4f9347
add navbar buttons
abhishektanwar Feb 21, 2020
9c25dcc
add fullscreen and unfullscreen icons
abhishektanwar Feb 21, 2020
951b598
add fullscreen functionality
abhishektanwar Feb 21, 2020
9be1912
add css
abhishektanwar Feb 21, 2020
2afb1b9
update css
abhishektanwar Feb 21, 2020
d8a87ab
fixed redundant scrollbar
ksraj123 Feb 22, 2020
448c70f
fixes issue #90 space added below submit button
ksraj123 Feb 22, 2020
c37c3db
Merge pull request #95 from ksraj123/issue-91-redundant-scrollbar
llaske Feb 22, 2020
d43c050
fullscreen refactor
abhishektanwar Feb 24, 2020
644a3fb
Translated using Weblate (English)
pauloslomp Feb 28, 2020
729798b
Merge remote-tracking branch 'origin/master'
weblate Feb 29, 2020
1366187
Merge pull request #93 from abhishektanwar/master
llaske Mar 8, 2020
9d3d430
Improvements to functionality of fullscreen button
ksraj123 Mar 8, 2020
1593afc
Improvements to fullscreen functionality
ksraj123 Mar 8, 2020
e5dbeb5
comflicts resolved and misc fixes
ksraj123 Mar 8, 2020
9ffc27c
Merge pull request #96 from ksraj123/experimental
llaske Mar 10, 2020
62e76d4
Update French localization
Mar 10, 2020
fedef93
Merge remote-tracking branch 'weblate/master'
Apr 8, 2020
259059f
Update LICENSE
ksraj123 Apr 23, 2020
b61979c
Merge pull request #99 from ksraj123/patch-1
llaske Apr 23, 2020
9286bba
Update copyright in LICENSE file
Apr 25, 2020
02ac252
Update LICENSE files
May 3, 2020
5833598
Upgrade presence palette
Jun 3, 2020
8d3448c
Fix palette position issue
Jun 3, 2020
82d3bec
Localize and standardize activity title
Jun 7, 2020
56987b1
Improve extensibility of Journal chooser
Jun 14, 2020
f90a9f6
Fix presence palette issue on users list
Jun 29, 2020
464b8a5
Update Journal Chooser to integrate Photo
Mar 18, 2021
6ff6ea4
Fix iOS compatibility due to Cordova 10
Mar 26, 2021
5c041c0
Translated using Weblate (Spanish)
EstyxTranslations Jan 3, 2021
cb71acf
Merge remote-tracking branch 'origin/master'
weblate Apr 8, 2021
e6be816
improved button and cards and made them responsive
S-kus Feb 11, 2022
1b28772
Merge pull request #102 from S-kus/ui_improvement
llaske Feb 19, 2022
e4a564c
UI improvement in toolbar
S-kus Feb 19, 2022
1e1cb9b
corrected toolbar with fixed height
S-kus Feb 22, 2022
83a539f
Merge pull request #104 from S-kus/toolbar
llaske Feb 23, 2022
530e523
fixed-semicolon
gitkaarma Mar 25, 2022
8a311d7
graph-enhanced
gitkaarma Apr 2, 2022
08728dc
Merge pull request #115 from gitkaarma/fix-semicolon
llaske Apr 2, 2022
4ce4474
labelling removed
gitkaarma Apr 3, 2022
ed151f1
hover effect added
gitkaarma Apr 4, 2022
3c73539
tooltip-added
gitkaarma Apr 5, 2022
03db8eb
Merge pull request #123 from gitkaarma/enhance/create-activity
llaske Apr 6, 2022
39cd30b
Merge pull request #107 from gitkaarma/enhance/tool-tip
llaske Apr 7, 2022
9b71528
bar-thickness fixed
gitkaarma Apr 7, 2022
405885f
Merge pull request #119 from gitkaarma/char-fix
llaske May 18, 2022
6d13511
Recover the exercise if accidentally shut down
nikkuAg Jun 1, 2022
58a0485
All console statement are removed
nikkuAg Jun 1, 2022
ebf3591
Removed unwanted changes
nikkuAg Jun 1, 2022
2e358ce
Help users in creating/solving issue/PR
nikkuAg Jun 1, 2022
5ac0ed5
Removed unwanted line
nikkuAg Jun 7, 2022
6231776
Removed unwanted spaces
nikkuAg Jun 7, 2022
30bccde
Removed unwanted spaces
nikkuAg Jun 7, 2022
580e83c
Rename the contributing.md file
nikkuAg Jun 7, 2022
e350e97
Merge pull request #133 from nikkuAg/contribution
llaske Jun 7, 2022
af46933
Merge pull request #132 from nikkuAg/accidental_quit
llaske Jun 7, 2022
1045f61
Adjust the width and height of the images of the exercise
nikkuAg Jun 2, 2022
9ad4c1a
Resize the default template images
nikkuAg Jun 21, 2022
bc74b37
Image fit in container
nikkuAg Jun 21, 2022
1df992d
Merge pull request #135 from nikkuAg/image-resize
llaske Jun 28, 2022
424bd4c
Package upgrade and running on sugarizer
nikkuAg Jul 3, 2022
639f706
Test latest packages on sugarizer
nikkuAg Jul 3, 2022
97656a3
Packages with latest version
nikkuAg Jul 3, 2022
c526b09
Allow user to share exercise and activity with just one click
nikkuAg Jul 8, 2022
d1219c9
Correct the tutorials step
nikkuAg Jul 8, 2022
c63a004
Tutorial overlay background color adjusted
nikkuAg Jul 11, 2022
bb6f089
Reactour version corrected
nikkuAg Jul 11, 2022
d84b28c
Allow user to reorder exercises in edit mode
nikkuAg Jul 17, 2022
bfbf8d1
Allow user to reorder exercise and run them all on single click
nikkuAg Aug 6, 2022
285b00f
Allow user to run the exercise where he left if run all mode is selected
nikkuAg Aug 9, 2022
c77554e
Share all exercise and will allow user to run all of them
nikkuAg Aug 25, 2022
0b1891d
remove console statement
nikkuAg Aug 25, 2022
2d1433c
Remove unwanted buttons from shared toolbar
nikkuAg Aug 27, 2022
510ad7d
Evaluation mode palette
nikkuAg Sep 22, 2022
c00af74
Save exercise for asynchronous evaluation in journal.
nikkuAg Sep 24, 2022
8914f0a
Removed total score component
nikkuAg Sep 24, 2022
d9d420d
Create asynchronous evaluation mode for cloze type exercise
nikkuAg Sep 25, 2022
1570728
Create asynchronous evaluation mode for free text input type exercise
nikkuAg Sep 25, 2022
92db2b6
Create asynchronous evaluation mode for mcq type exercise
nikkuAg Sep 25, 2022
b27293a
Create asynchronous evaluation mode for matching type exercise
nikkuAg Sep 25, 2022
3573349
Create asynchronous evaluation mode for reorder type exercise
nikkuAg Sep 25, 2022
fa40f52
Create asynchronous evaluation mode for group type exercise
nikkuAg Sep 25, 2022
8abeae4
Start async evaluation mode if mode was already going on
nikkuAg Sep 27, 2022
3cd7567
Remove edit button in evaluation mode
nikkuAg Sep 29, 2022
6232409
Add realtime evaluation mode
nikkuAg Sep 30, 2022
6058d37
Update the Icons on Navbar and hide/disable unwanted buttons
nikkuAg Sep 30, 2022
c98eb28
Not show red/green color for wrong/right answers
nikkuAg Sep 30, 2022
e664855
Change the icon to text for next and finish exercise button on scores…
nikkuAg Sep 30, 2022
718e0f6
Not display scores screen if evaluation mode is on
nikkuAg Sep 30, 2022
0cc70f6
Allow user to complete exercise any number of times if not submitted
nikkuAg Sep 30, 2022
8fdd0c3
Remove the share button from exercises in evaluation mode
nikkuAg Oct 1, 2022
973b64e
Add realtime evaluation button
nikkuAg Oct 1, 2022
9da6d9e
Add realtime mode for evaluation
nikkuAg Oct 1, 2022
2fd6770
Remove export to evaluation button from unwanted loction and update c…
nikkuAg Oct 2, 2022
da8424a
Buddy color bug fix
nikkuAg Oct 2, 2022
52acaa0
Changing the icon color without updating the activity.js file
nikkuAg Oct 5, 2022
1c2ea2f
Add stats at the end of activity
Nov 24, 2022
8d1725f
Fix refresh issue on delete exercise
Nov 26, 2022
2ccef5b
Forbid viewing result in evaluation mode
Nov 26, 2022
734ec5f
Change toolbar icon visibility in evaluation mode
Nov 27, 2022
aed011b
Export evaluation in a separate journal instance
Nov 27, 2022
b774b96
Fix tutorial
Nov 27, 2022
2707e7b
Fix reopening evaluation from realtime
Nov 27, 2022
5bb4059
Complete previous fix
Nov 27, 2022
c3a9dfc
Fix detailed result view in presence mode
Dec 1, 2022
ebbf8a8
Localize export message
Dec 3, 2022
818383c
Add result view without answers in evaluation mode
Dec 3, 2022
fefc51e
Fix typo in french
Dec 3, 2022
d6968b9
Fix play all in eval mode when all are completed 
Dec 4, 2022
662d2dc
Fix play all in realtime eval mode 
Dec 4, 2022
84297e4
Fix button toolbar visibility
Dec 4, 2022
672b2cb
Change visibility of shared palette
Dec 6, 2022
041e05f
Add score metadata
Dec 7, 2022
5186ec1
Fix run all when no exercise
Dec 7, 2022
9919742
Merge branch 'pr/137'
Dec 7, 2022
3728d77
Drag feature in reorder list now the whole object
Feb 20, 2023
2e5c433
Update jsplumb to fix touch issue
Feb 20, 2023
6a037c2
fix: MCQ answers should be in rows
disha1202 Feb 21, 2023
b91bfb9
Merge branch 'pr/140'
Feb 21, 2023
084810b
fix: two clicks to validate mcq answers in evaluation mode
disha1202 Feb 23, 2023
7bf21ec
Merge branch 'mcq-evaluation-mode' of https://github.com/disha1202/Ex…
Feb 23, 2023
b9b6634
Merge branch 'pr/141'
Feb 23, 2023
c554ca7
replaced reactour by introJs-react
disha1202 Mar 1, 2023
476675d
fix: Buttons text not localized
disha1202 Mar 2, 2023
0a1f587
fix: tutorial breaking at the second last step
disha1202 Mar 4, 2023
630a6d3
Update CHANGELOG
Mar 4, 2023
71df9a1
UI improvements
disha1202 Mar 6, 2023
749a84c
Merge branch 'pr/147'
Mar 8, 2023
b7d57a8
dec box issue fixed
rockharshitmaurya Mar 17, 2023
a70acc0
Merge branch 'pr/156'
Mar 18, 2023
44e1b0f
fixed UI issue
Ydvaaman Mar 18, 2023
cab6286
maching player able to match from both sides.
UtkarshSiddhpura Mar 24, 2023
8c16afd
remove redux dev tools
UtkarshSiddhpura Mar 17, 2023
2259f70
fixed MCQPlayer not showing results in real-time eval mode
UtkarshSiddhpura Mar 25, 2023
c70972a
fixed exerciser crash on clicking results in Mathing-pairs realtime eval
UtkarshSiddhpura Mar 25, 2023
3348e87
Merge branch 'pr/158'
Mar 30, 2023
182e83b
Merge pull request #167 from UtkarshSiddhpura/ReduxDevTools
llaske Mar 30, 2023
fc5a07a
Merge branch 'Exerciser.activity-evaluation' of https://github.com/Ut…
Apr 1, 2023
3130c3a
Merge branch 'pr/169'
Apr 1, 2023
7805d13
Merge branch 'Exerciser-crashes' of https://github.com/UtkarshSiddhpu…
Apr 1, 2023
536d41e
Merge branch 'pr/170'
Apr 1, 2023
98c0f44
Merge branch 'MatchingPlayer-Enhancement' of https://github.com/Utkar…
Apr 1, 2023
4988844
Merge branch 'pr/164'
Apr 1, 2023
318c38c
fixed exerciser error on run all exerciser when finish exercise not c…
UtkarshSiddhpura Apr 5, 2023
ba4abb5
Merge branch 'pr/175'
Apr 10, 2023
4d8e1e4
fix: incorrect information on score details screen
disha1202 Apr 15, 2023
be3689d
fix: run all skips first exercise even if it is not completed
disha1202 Apr 15, 2023
9542b66
fix: run all not working in evaluation mode
disha1202 Apr 15, 2023
06329e0
fix: run all not working in evaluation mode
disha1202 Apr 16, 2023
bfb58fd
Fixed matching dots displace on screen resize and full screen
UtkarshSiddhpura Apr 16, 2023
74304ae
set the value of isRunAllClicked false when exporting as evaluation
disha1202 Apr 16, 2023
c1727b2
Merge branch 'pr/178'
Apr 16, 2023
ca6047e
Merge branch 'Maching-Pair-dots-displacing' of https://github.com/Utk…
Apr 16, 2023
8bef318
Merge branch 'pr/180'
Apr 16, 2023
9f4d327
updated drag list
DhruvMishra1826 Apr 16, 2023
e8a9589
Merge branch 'dragList' of https://github.com/DhruvMishra1826/Exercis…
Apr 20, 2023
108210a
Merge branch 'pr/181'
Apr 20, 2023
912c091
Merge branch 'fix-run-all' of https://github.com/disha1202/ExerciserR…
Apr 22, 2023
830782c
Merge branch 'pr/179'
Apr 22, 2023
0965cff
Translated using Weblate (Spanish)
EstyxTranslations Apr 11, 2021
6671f29
Merge remote-tracking branch 'weblate/master' into HEAD
Jul 8, 2023
9bd514b
Initialize project with setup code and files, and include WordPuzzleP…
UtkarshSiddhpura Jul 10, 2023
3d99078
Add Fullscreen feature, some color adjustments & prettify.
UtkarshSiddhpura Jul 11, 2023
cd9bda7
Add tutorial and localize string for word puzzle player.
UtkarshSiddhpura Jul 11, 2023
1a12073
Enhance word-puzzle UI for buddy colors, remove words in reverse orde…
UtkarshSiddhpura Jul 14, 2023
9d3154f
Add WordPuzzleForm.js to create/edit word puzzle.
UtkarshSiddhpura Jul 17, 2023
30083c2
Remove right answer indication in word puzzle evaluation mode.
UtkarshSiddhpura Jul 17, 2023
b8d5474
Improve MultimediaJSX to autofocus inputs.
UtkarshSiddhpura Jul 17, 2023
12af897
Bug fix of selectionEnd(mouseUp) only working on WordGrid in word puz…
UtkarshSiddhpura Jul 17, 2023
901a077
Add word puzzle player title.
UtkarshSiddhpura Jul 17, 2023
9ea3eee
Update default activity thumbnail & Add locale strings for it.
UtkarshSiddhpura Jul 17, 2023
de4554c
Add tutorial for word puzzle form and locale strings for template car…
UtkarshSiddhpura Jul 17, 2023
1e9b569
Add Difficulty levels in word puzzle form.
UtkarshSiddhpura Jul 19, 2023
f456a9b
Add word puzzle in readme.md.
UtkarshSiddhpura Jul 19, 2023
5eec94f
Merge branch 'Word-Puzzle-Template' of https://github.com/UtkarshSidd…
Jul 20, 2023
ecf23ef
Remove eslint warnings & uncomment populateUnusedCells in WordPuzzleP…
UtkarshSiddhpura Jul 21, 2023
2509963
Replace 'zoom' CSS property with 'transform: scale' for enhanced brow…
UtkarshSiddhpura Jul 21, 2023
93184fa
Remove unnecessary CSS & logs.
UtkarshSiddhpura Jul 21, 2023
396cb04
Improve word puzzle player to handle Large puzzle words.
UtkarshSiddhpura Jul 21, 2023
bbcb456
Add Credits in readme.md
UtkarshSiddhpura Jul 22, 2023
24f19b2
Improve word-grid scroller.
UtkarshSiddhpura Jul 22, 2023
2d8d39c
Merge branch 'Word-Puzzle-Template' of https://github.com/UtkarshSidd…
Jul 22, 2023
06ba9ee
Convert train.wav to train.mp3.
UtkarshSiddhpura Jul 23, 2023
32e2ec4
Fix indentation, spaces in code & double scroller in word puzzle.
UtkarshSiddhpura Jul 23, 2023
c7fb2da
Merge branch 'Word-Puzzle-Template' of https://github.com/UtkarshSidd…
Jul 23, 2023
6148d86
Improve french localization
Jul 26, 2023
321ead0
Merge branch 'pr/182'
Jul 26, 2023
60d9fb8
Change answer input maxLength to 20.
UtkarshSiddhpura Jul 30, 2023
224d9e9
Merge pull request #183 from UtkarshSiddhpura/max-answer-length
llaske Jul 30, 2023
d5f72ac
Fix shifting of elements due to css transform scale in ExerciseList, …
UtkarshSiddhpura Oct 14, 2023
240ff1c
Merge pull request #184 from UtkarshSiddhpura:Shifting-elements-issue
llaske Oct 15, 2023
c9be14f
Reverting commit 2509963 and commit d5f72ac, basically using css zoom…
UtkarshSiddhpura Apr 5, 2024
b947826
Fix word puzzle player & matching pair fullscreen mode
UtkarshSiddhpura Apr 5, 2024
286063c
Update package-lock.json
Apr 7, 2024
7783ea4
Merge branch 'pr/186'
Apr 7, 2024
eed462a
Update activity.js in sugar-web
May 4, 2024
2e2b810
Fix direct link issue
Dec 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
As with all Open Source software, contributions to Exerciser are welcome.

An excellent way to contribute is testing and trying Exerciser to find some issues. If you find one, don't be shy; submit your issue [here](https://github.com/llaske/Exerciser/issues) by giving the maximum information on it and precisely detailed steps to reproduce it. We will check your issue and ask you for more information if needed.

If you're a developer, the best way is to first [setup Exerciser](https://github.com/llaske/ExerciserReact#steps-to-run-project) and then also [setup Sugarizer](https://github.com/llaske/sugarizer/blob/dev/docs/tutorial/VanillaJS/step0.md). Testing the functionality requires using Sugarizer features like `Sharing the Exercise,` `Using Journals,` and many more need Exerciser to be deployed on Sugarizer.

When you think you're ready, you could try to fix some current issues [here](https://github.com/llaske/Exerciser/issues). If you find a fix, send a Pull Request, and we will be pleased to review it.


So to send your Pull Request:

* [ ] Clone this repository,
* [ ] Fork the **master** branch of your new repository,
* [ ] Update this new branch with your contribution and commit your changes,
* [ ] Send a pull request from your new branch to the dev branch of this repository.

Few rules to respect when you fix an issue:

* [ ] Ensure your pull request contains only updates related to the fix,
* [ ] Respect indentation of the original file,
* [ ] Mention the issue number in the pull request but not in the commit message


Please note there is <u>no need to ask permission to work on an issue</u>. You should check for pull requests linked to an issue you are addressing; if there are none, assume nobody has done anything. Begin to fix the problem, test, make your commits, push your commits, then make a pull request. These practices allow the competition of ideas and give priority to meritocracy.

Thanks in advance for your contribution, and become a member of the Exerciser community!
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down
13 changes: 13 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright 2018 Mankirat Singh and Avinash Agarwal

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.
18 changes: 18 additions & 0 deletions config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = function override(config, env) {
let resolvePlugin = (config.resolveLoader ? config.resolveLoader : {});
resolvePlugin['alias'] = {
'text': 'text-loader'
};
config['resolveLoader'] = resolvePlugin;

let resolvePath = config.resolve.alias;
resolvePath['webL10n'] = 'lib/webL10n';
resolvePath['sugar-web'] = 'lib/sugar-web';
resolvePath['mustache'] = 'lib/mustache';
resolvePath['picoModal'] = 'lib/picoModal';
config.resolve.alias = resolvePath;

return config;
}
240 changes: 240 additions & 0 deletions lib/humane.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
/**
* humane.js
* Humanized Messages for Notifications
* @author Marc Harter (@wavded)
* @example
* humane.log('hello world');
* @license MIT
* See more usage examples at: http://wavded.github.com/humane-js/
*/

;!function (name, context, definition) {
// HACK: Force loading with define to avoid loading issue in Electron
//if (typeof module !== 'undefined') module.exports = definition(name, context)
//else if (typeof define === 'function' && typeof define.amd === 'object') define(definition)
//else context[name] = definition(name, context)
define(definition);
}('humane', this, function (name, context) {
var win = window
var doc = document

var ENV = {
on: function (el, type, cb) {
'addEventListener' in win ? el.addEventListener(type,cb,false) : el.attachEvent('on'+type,cb)
},
off: function (el, type, cb) {
'removeEventListener' in win ? el.removeEventListener(type,cb,false) : el.detachEvent('on'+type,cb)
},
bind: function (fn, ctx) {
return function () { fn.apply(ctx,arguments) }
},
isArray: Array.isArray || function (obj) { return Object.prototype.toString.call(obj) === '[object Array]' },
config: function (preferred, fallback) {
return preferred != null ? preferred : fallback
},
transSupport: false,
useFilter: /msie [678]/i.test(navigator.userAgent), // sniff, sniff
_checkTransition: function () {
var el = doc.createElement('div')
var vendors = { webkit: 'webkit', Moz: '', O: 'o', ms: 'MS' }

for (var vendor in vendors)
if (vendor + 'Transition' in el.style) {
this.vendorPrefix = vendors[vendor]
this.transSupport = true
}
}
}
ENV._checkTransition()

var Humane = function (o) {
o || (o = {})
this.queue = []
this.baseCls = o.baseCls || 'humane'
this.addnCls = o.addnCls || ''
this.timeout = 'timeout' in o ? o.timeout : 2500
this.waitForMove = o.waitForMove || false
this.clickToClose = o.clickToClose || false
this.timeoutAfterMove = o.timeoutAfterMove || false
this.container = o.container

try { this._setupEl() } // attempt to setup elements
catch (e) {
ENV.on(win,'load',ENV.bind(this._setupEl, this)) // dom wasn't ready, wait till ready
}
}

Humane.prototype = {
constructor: Humane,
_setupEl: function () {
var el = doc.createElement('div')
el.style.display = 'none'
if (!this.container){
if(doc.body) this.container = doc.body;
else throw 'document.body is null'
}
this.container.appendChild(el)
this.el = el
this.removeEvent = ENV.bind(function(){
var timeoutAfterMove = ENV.config(this.currentMsg.timeoutAfterMove,this.timeoutAfterMove)
if (!timeoutAfterMove){
this.remove()
} else {
setTimeout(ENV.bind(this.remove,this),timeoutAfterMove)
}
},this)

this.transEvent = ENV.bind(this._afterAnimation,this)
this._run()
},
_afterTimeout: function () {
if (!ENV.config(this.currentMsg.waitForMove,this.waitForMove)) this.remove()

else if (!this.removeEventsSet) {
ENV.on(doc.body,'mousemove',this.removeEvent)
ENV.on(doc.body,'click',this.removeEvent)
ENV.on(doc.body,'keypress',this.removeEvent)
ENV.on(doc.body,'touchstart',this.removeEvent)
this.removeEventsSet = true
}
},
_run: function () {
if (this._animating || !this.queue.length || !this.el) return

this._animating = true
if (this.currentTimer) {
clearTimeout(this.currentTimer)
this.currentTimer = null
}

var msg = this.queue.shift()
var clickToClose = ENV.config(msg.clickToClose,this.clickToClose)

if (clickToClose) {
ENV.on(this.el,'click',this.removeEvent)
ENV.on(this.el,'touchstart',this.removeEvent)
}

var timeout = ENV.config(msg.timeout,this.timeout)

if (timeout > 0)
this.currentTimer = setTimeout(ENV.bind(this._afterTimeout,this), timeout)

if (ENV.isArray(msg.html)) msg.html = '<ul><li>'+msg.html.join('<li>')+'</ul>'

this.el.innerHTML = msg.html
this.currentMsg = msg
this.el.className = this.baseCls
if (ENV.transSupport) {
this.el.style.display = 'block'
setTimeout(ENV.bind(this._showMsg,this),50)
} else {
this._showMsg()
}

},
_setOpacity: function (opacity) {
if (ENV.useFilter){
try{
this.el.filters.item('DXImageTransform.Microsoft.Alpha').Opacity = opacity*100
} catch(err){}
} else {
this.el.style.opacity = String(opacity)
}
},
_showMsg: function () {
var addnCls = ENV.config(this.currentMsg.addnCls,this.addnCls)
if (ENV.transSupport) {
this.el.className = this.baseCls+' '+addnCls+' '+this.baseCls+'-animate'
}
else {
var opacity = 0
this.el.className = this.baseCls+' '+addnCls+' '+this.baseCls+'-js-animate'
this._setOpacity(0) // reset value so hover states work
this.el.style.display = 'block'

var self = this
var interval = setInterval(function(){
if (opacity < 1) {
opacity += 0.1
if (opacity > 1) opacity = 1
self._setOpacity(opacity)
}
else clearInterval(interval)
}, 30)
}
},
_hideMsg: function () {
var addnCls = ENV.config(this.currentMsg.addnCls,this.addnCls)
if (ENV.transSupport) {
this.el.className = this.baseCls+' '+addnCls
ENV.on(this.el,ENV.vendorPrefix ? ENV.vendorPrefix+'TransitionEnd' : 'transitionend',this.transEvent)
}
else {
var opacity = 1
var self = this
var interval = setInterval(function(){
if(opacity > 0) {
opacity -= 0.1
if (opacity < 0) opacity = 0
self._setOpacity(opacity);
}
else {
self.el.className = self.baseCls+' '+addnCls
clearInterval(interval)
self._afterAnimation()
}
}, 30)
}
},
_afterAnimation: function () {
if (ENV.transSupport) ENV.off(this.el,ENV.vendorPrefix ? ENV.vendorPrefix+'TransitionEnd' : 'transitionend',this.transEvent)

if (this.currentMsg.cb) this.currentMsg.cb()
this.el.style.display = 'none'

this._animating = false
this._run()
},
remove: function (e) {
var cb = typeof e == 'function' ? e : null

ENV.off(doc.body,'mousemove',this.removeEvent)
ENV.off(doc.body,'click',this.removeEvent)
ENV.off(doc.body,'keypress',this.removeEvent)
ENV.off(doc.body,'touchstart',this.removeEvent)
ENV.off(this.el,'click',this.removeEvent)
ENV.off(this.el,'touchstart',this.removeEvent)
this.removeEventsSet = false

if (cb && this.currentMsg) this.currentMsg.cb = cb
if (this._animating) this._hideMsg()
else if (cb) cb()
},
log: function (html, o, cb, defaults) {
var msg = {}
if (defaults)
for (var opt in defaults)
msg[opt] = defaults[opt]

if (typeof o == 'function') cb = o
else if (o)
for (var opt in o) msg[opt] = o[opt]

msg.html = html
if (cb) msg.cb = cb
this.queue.push(msg)
this._run()
return this
},
spawn: function (defaults) {
var self = this
return function (html, o, cb) {
self.log.call(self,html,o,cb,defaults)
return self
}
},
create: function (o) { return new Humane(o) }
}
return new Humane()
});
Loading