Permalink
Browse files

1.9 version, only render editor when there is edit link on the page

  • Loading branch information...
1 parent 998fd31 commit 622e509ab18bae53f5eb8cd799132c9684880155 @xli committed Jun 12, 2012
Showing with 11 additions and 29 deletions.
  1. +4 −22 .rvmrc
  2. +1 −1 Rakefile
  3. +1 −1 chrome/cloader.js
  4. +3 −3 chrome/manifest.json
  5. +1 −1 src/js/card_editor.js
  6. +1 −1 src/js/loader.js
View
26 .rvmrc
@@ -5,11 +5,11 @@
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
# Only full ruby name is supported here, for short names use:
-# echo "rvm use ree" > .rvmrc
-environment_id="ree-1.8.7-2012.02@wikimate"
+# echo "rvm use 1.9.3" > .rvmrc
+environment_id="ruby-1.9.3-p194@wikimate"
# Uncomment the following lines if you want to verify rvm version per project
-# rvmrc_rvm_version="1.10.3" # 1.10.1 seams as a safe start
+# rvmrc_rvm_version="1.14.1 ()" # 1.10.1 seams as a safe start
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
# return 1
@@ -25,28 +25,10 @@ then
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
[[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
\. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
- if [[ $- == *i* ]] # check for interactive shells
- then echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
- else echo "Using: $GEM_HOME" # don't use colors in non-interactive shells
- fi
else
# If the environment file has not yet been created, use the RVM CLI to select.
- rvm --create use "$environment_id" || {
+ rvm --create "$environment_id" || {
echo "Failed to create RVM environment '${environment_id}'."
return 1
}
fi
-
-# If you use bundler, this might be useful to you:
-# if [[ -s Gemfile ]] && {
-# ! builtin command -v bundle >/dev/null ||
-# builtin command -v bundle | grep $rvm_path/bin/bundle >/dev/null
-# }
-# then
-# printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
-# gem install bundler
-# fi
-# if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
-# then
-# bundle install | grep -vE '^Using|Your bundle is complete'
-# fi
View
@@ -9,7 +9,7 @@ rescue LoadError
end
task :bookmarklet => :clean do
- version = '1.8'
+ version = '1.9'
mkdir_p 'card_editor'
File.open("./card_editor/card_editor-#{version}.js", 'w') do |io|
io.write(File.read('lib/jquery-1.7.2.js'))
View
@@ -1,6 +1,6 @@
(function() {
- var version = '1.8';
+ var version = '1.9';
function addScript(src) {
var script = document.createElement('SCRIPT');
script.type = 'text/javascript';
View
@@ -1,6 +1,6 @@
{
"name": "Mingle Card Editor",
- "version": "1.8",
+ "version": "1.9",
"manifest_version": 2,
"description": "Change Mingle Card show page into sectional editing. Double click to edit/create a section.",
"icons": { "16": "icon.png",
@@ -15,8 +15,8 @@
}
],
"web_accessible_resources": [
- "card_editor-1.8.min.js",
- "css/style-1.8.css",
+ "card_editor-1.9.min.js",
+ "css/style-1.9.css",
"css/wikimate-0.1.css",
"css/jquery-ui-1.8.20.custom.css",
"css/images/ui-bg_diagonals-thick_18_b81900_40x40.png",
View
@@ -126,7 +126,7 @@ jQuery.noConflict();
})());
var match = window.location.href.match(/\/projects\/([\da-z_]+)\/cards\/(\d+)[^\/]*$/);
- if (match) {
+ if (match && $('#card-edit-link-top').length > 0) {
$('#content').card_editor({project: match[1], number: match[2]});
}
})(jQuery);
View
@@ -1,7 +1,7 @@
(function() {
var host = "http://localhost:7777/";
- var version = '1.8';
+ var version = '1.9';
function addScript(src) {
var script = document.createElement('SCRIPT');
script.type = 'text/javascript';

0 comments on commit 622e509

Please sign in to comment.