Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
farthinker committed May 8, 2014
1 parent b976e58 commit ef71d3a
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 18 deletions.
22 changes: 20 additions & 2 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,25 @@ module.exports = (grunt) ->
}, {
src: 'lib/simditor-all.js',
dest: 'site/assets/scripts/simditor-all.js'
}, {
src: 'lib/simditor-all.min.js',
dest: 'site/assets/scripts/simditor-all.min.js'
}]

styles:
files: [{
src: 'styles/simditor.css',
dest: 'site/assets/styles/simditor.css'
}]
scripts:
files: [{
src: 'lib/simditor-all.js',
dest: 'site/assets/scripts/simditor-all.js'
}, {
src: 'lib/simditor-all.min.js',
dest: 'site/assets/scripts/simditor-all.min.js'
}]

package:
files: [{
expand: true,
Expand Down Expand Up @@ -189,6 +207,6 @@ module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-shell'

grunt.registerTask 'default', ['site', 'express', 'watch']
grunt.registerTask 'site', ['sass', 'concat:simditor', 'coffee', 'concat:all', 'uglify:simditor', 'copy:site', 'shell']
grunt.registerTask 'package', ['clean:package', 'copy:package', 'compress']
grunt.registerTask 'site', ['sass', 'concat:simditor', 'coffee', 'concat:all', 'copy:site', 'shell']
grunt.registerTask 'package', ['uglify:simditor', 'clean:package', 'copy:package', 'compress']

4 changes: 2 additions & 2 deletions lib/simditor-all.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/simditor-all.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/simditor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/simditor.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion site/assets/_sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ a {
display: block;
width: 133px;
height: 133px;
background: url(../images/fork.pn) no-repeat 0 0;
position: absolute;
top: 0;
right: 0;
Expand Down
4 changes: 2 additions & 2 deletions site/assets/scripts/simditor-all.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion site/assets/scripts/simditor-all.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion site/assets/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,6 @@ a:hover, a:active {
display: block;
width: 133px;
height: 133px;
background: url(../images/fork.pn) no-repeat 0 0;
position: absolute;
top: 0;
right: 0;
Expand Down
2 changes: 1 addition & 1 deletion site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
</textarea>
</section>

<script type="text/javascript" src="assets/scripts/simditor-all.min.js"></script>
<script type="text/javascript" src="assets/scripts/simditor-all.js"></script>
<script type="text/javascript" src="assets/scripts/page-demo.js"></script>

4 changes: 2 additions & 2 deletions src/simditor.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ class UndoManager extends Plugin
state = @_stack[@_index]
@editor.body.html state.html
@caretPosition state.caret
@editor.find('.selected').removeClass('selected')
@editor.body.find('.selected').removeClass('selected')
@editor.sync()

@editor.trigger 'valuechanged', ['undo']
Expand All @@ -970,7 +970,7 @@ class UndoManager extends Plugin
state = @_stack[@_index]
@editor.body.html state.html
@caretPosition state.caret
@editor.find('.selected').removeClass('selected')
@editor.body.find('.selected').removeClass('selected')
@editor.sync()

@editor.trigger 'valuechanged', ['undo']
Expand Down
4 changes: 2 additions & 2 deletions src/undoManager.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class UndoManager extends Plugin
state = @_stack[@_index]
@editor.body.html state.html
@caretPosition state.caret
@editor.find('.selected').removeClass('selected')
@editor.body.find('.selected').removeClass('selected')
@editor.sync()

@editor.trigger 'valuechanged', ['undo']
Expand All @@ -92,7 +92,7 @@ class UndoManager extends Plugin
state = @_stack[@_index]
@editor.body.html state.html
@caretPosition state.caret
@editor.find('.selected').removeClass('selected')
@editor.body.find('.selected').removeClass('selected')
@editor.sync()

@editor.trigger 'valuechanged', ['undo']
Expand Down

0 comments on commit ef71d3a

Please sign in to comment.