diff --git a/.gitignore b/.gitignore index 347c980..5472f79 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_Store .c9revisions /*.project +/nbproject/ \ No newline at end of file diff --git a/.settings/.gitignore b/.settings/.gitignore deleted file mode 100644 index 24f7eb4..0000000 --- a/.settings/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/*.jsdtscope -/*.eclipse.wst.jsdt.ui.superType.container -/*.eclipse.wst.jsdt.ui.superType.name diff --git a/Gemfile b/Gemfile deleted file mode 100644 index f453f7c..0000000 --- a/Gemfile +++ /dev/null @@ -1,5 +0,0 @@ -source 'https://rubygems.org' - -gem 'rake' -gem 'therubyracer' -gem 'uglifier' \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 0257ec1..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,21 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - execjs (1.3.0) - multi_json (~> 1.0) - libv8 (3.3.10.4) - multi_json (1.1.0) - rake (0.9.2.2) - therubyracer (0.9.10) - libv8 (~> 3.3.10) - uglifier (1.2.3) - execjs (>= 0.3.0) - multi_json (>= 1.0.2) - -PLATFORMS - ruby - -DEPENDENCIES - rake - therubyracer - uglifier diff --git a/LICENCE b/LICENCE index af8b31e..28f7780 100644 --- a/LICENCE +++ b/LICENCE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2012 JFHollingworth LTD +Copyright (c) 2013 fabiopaiva Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 87cc959..0000000 --- a/Rakefile +++ /dev/null @@ -1,33 +0,0 @@ -require 'rubygems' -require 'bundler' -require 'fileutils' -begin - Bundler.setup(:default, :development) -rescue Bundler::BundlerError => e - $stderr.puts e.message - $stderr.puts "Run `bundle install` to install missing gems" - exit e.status_code -end - -ROOT = File.dirname(__FILE__) - -require 'rake' -require 'uglifier' - -task :default do - version = File.open(File.join(ROOT, 'VERSION')).read - output_path = File.join(ROOT, "dist") - - js_input_path = File.join('src', 'bootstrap-wysihtml5.js') - css_input_path = File.join('src', 'bootstrap-wysihtml5.css') - - js_output_path = File.join(output_path, "bootstrap-wysihtml5-#{version}.js") - minified_js_output_path = File.join(output_path, "bootstrap-wysihtml5-#{version}.min.js") - css_output_path = File.join(output_path, "bootstrap-wysihtml5-#{version}.css") - - minified_js = Uglifier.compile(File.read(js_input_path)) - - File.open(minified_js_output_path, 'w') { |f| f.write(minified_js) } - File.open(js_output_path, 'w') { |f| f.write(File.read(js_input_path)) } - File.open(css_output_path, 'w') { |f| f.write(File.read(css_input_path)) } -end diff --git a/VERSION b/VERSION index 7bcd0e3..8a9ecc2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.2 \ No newline at end of file +0.0.1 \ No newline at end of file diff --git a/component.json b/component.json deleted file mode 100644 index a82e482..0000000 --- a/component.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "bootstrap-wysihtml5", - "version": "0.1.0", - "main": ["src/bootstrap-wysihtml5.css", "src/bootstrap-wysihtml5.js"], - "dependencies": { - "wysihtml5": "~0.3.0" - } -} diff --git a/dist/bootstrap-wysihtml5-0.0.2.css b/dist/bootstrap-wysihtml5-0.0.2.css deleted file mode 100644 index 44ed777..0000000 --- a/dist/bootstrap-wysihtml5-0.0.2.css +++ /dev/null @@ -1,102 +0,0 @@ -ul.wysihtml5-toolbar { - margin: 0; - padding: 0; - display: block; -} - -ul.wysihtml5-toolbar::after { - clear: both; - display: table; - content: ""; -} - -ul.wysihtml5-toolbar > li { - float: left; - display: list-item; - list-style: none; - margin: 0 5px 10px 0; -} - -ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] { - font-weight: bold; -} - -ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] { - font-style: italic; -} - -ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] { - text-decoration: underline; -} - -ul.wysihtml5-toolbar a.btn.wysihtml5-command-active { - background-image: none; - -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); - -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); - background-color: #E6E6E6; - background-color: #D9D9D9; - outline: 0; -} - -ul.wysihtml5-commands-disabled .dropdown-menu { - display: none !important; -} - -ul.wysihtml5-toolbar div.wysihtml5-colors { - display:block; - width: 50px; - height: 20px; - margin-top: 2px; - margin-left: 5px; - position: absolute; - pointer-events: none; -} - -ul.wysihtml5-toolbar a.wysihtml5-colors-title { - padding-left: 70px; -} - -ul.wysihtml5-toolbar div[data-wysihtml5-command-value="black"] { - background: black !important; -} - -ul.wysihtml5-toolbar div[data-wysihtml5-command-value="silver"] { - background: silver !important; -} - -ul.wysihtml5-toolbar div[data-wysihtml5-command-value="gray"] { - background: gray !important; -} - -ul.wysihtml5-toolbar div[data-wysihtml5-command-value="maroon"] { - background: maroon !important; -} - -ul.wysihtml5-toolbar div[data-wysihtml5-command-value="red"] { - background: red !important; -} - -ul.wysihtml5-toolbar div[data-wysihtml5-command-value="purple"] { - background: purple !important; -} - -ul.wysihtml5-toolbar div[data-wysihtml5-command-value="green"] { - background: green !important; -} - -ul.wysihtml5-toolbar div[data-wysihtml5-command-value="olive"] { - background: olive !important; -} - -ul.wysihtml5-toolbar div[data-wysihtml5-command-value="navy"] { - background: navy !important; -} - -ul.wysihtml5-toolbar div[data-wysihtml5-command-value="blue"] { - background: blue !important; -} - -ul.wysihtml5-toolbar div[data-wysihtml5-command-value="orange"] { - background: orange !important; -} diff --git a/dist/bootstrap-wysihtml5-0.0.2.js b/dist/bootstrap-wysihtml5-0.0.2.js deleted file mode 100644 index a76b3b1..0000000 --- a/dist/bootstrap-wysihtml5-0.0.2.js +++ /dev/null @@ -1,458 +0,0 @@ -!function($, wysi) { - "use strict"; - - var templates = function(key, locale) { - - var tpl = { - "font-styles": - "", - - "emphasis": - "
  • " + - "
    " + - "" + locale.emphasis.bold + "" + - "" + locale.emphasis.italic + "" + - "" + locale.emphasis.underline + "" + - "
    " + - "
  • ", - - "lists": - "
  • " + - "
    " + - "" + - "" + - "" + - "" + - "
    " + - "
  • ", - - "link": - "
  • " + - "" + - "" + - "
  • ", - - "image": - "
  • " + - "" + - "" + - "
  • ", - - "html": - "
  • " + - "
    " + - "" + - "
    " + - "
  • ", - - "color": - "" - }; - return tpl[key]; - }; - - - var Wysihtml5 = function(el, options) { - this.el = el; - this.toolbar = this.createToolbar(el, options || defaultOptions); - this.editor = this.createEditor(options); - - window.editor = this.editor; - - $('iframe.wysihtml5-sandbox').each(function(i, el){ - $(el.contentWindow).off('focus.wysihtml5').on({ - 'focus.wysihtml5' : function(){ - $('li.dropdown').removeClass('open'); - } - }); - }); - }; - - Wysihtml5.prototype = { - - constructor: Wysihtml5, - - createEditor: function(options) { - options = options || {}; - options.toolbar = this.toolbar[0]; - - var editor = new wysi.Editor(this.el[0], options); - - if(options && options.events) { - for(var eventName in options.events) { - editor.on(eventName, options.events[eventName]); - } - } - return editor; - }, - - createToolbar: function(el, options) { - var self = this; - var toolbar = $("