diff --git a/.gitignore b/.gitignore index 71314f3..aa8d024 100644 --- a/.gitignore +++ b/.gitignore @@ -62,6 +62,4 @@ typings/ # custom build/painterro* -wp/.svn/ -wp/trunk/painterro-*.min.js -wp/trunk/painterro-*.min.js.map +./wp/ \ No newline at end of file diff --git a/publish.sh b/publish.sh index 1adb4ad..691f0d6 100755 --- a/publish.sh +++ b/publish.sh @@ -20,6 +20,10 @@ else echo FAIL exit 0 fi + +rm -rf wp +svn co http://plugins.svn.wordpress.org/painterro/ wp + rm -f wp/trunk/painterro-*.min.js rm -f wp/trunk/painterro-*.min.js.map cp build/painterro-${VERSION}.min.js wp/trunk/ @@ -28,7 +32,7 @@ sed -i -E "s/([ \t]+version: \")[0-9\\.]+(\",)/\1${VERSION}\2/" wp/trunk/index.j sed -i -E "s/(Version: )[0-9\\.]+/\1${VERSION}/" wp/trunk/painterro-wp.php sed -i -E "s/(define\\(\"PAINTERRO_FILE\", \"painterro-)[0-9\\.]+(\\.min\\.js\"\\);)/\1${VERSION}\2/" wp/trunk/painterro-wp.php cd wp -svn add trunk/* +svn add --force . svn st | grep ^! | awk '{print " --force "$2}' | xargs svn rm svn --username=vanbrosh --password="${WP_PASSWORD}" ci -m "${VERSION}" cd .. diff --git a/wp/assets/banner-1544x500.png b/wp/assets/banner-1544x500.png deleted file mode 100644 index 9f787c9..0000000 Binary files a/wp/assets/banner-1544x500.png and /dev/null differ diff --git a/wp/assets/banner-772x250.png b/wp/assets/banner-772x250.png deleted file mode 100644 index 5a86278..0000000 Binary files a/wp/assets/banner-772x250.png and /dev/null differ diff --git a/wp/assets/icon-128x128.png b/wp/assets/icon-128x128.png deleted file mode 100644 index 3ffd5f3..0000000 Binary files a/wp/assets/icon-128x128.png and /dev/null differ diff --git a/wp/assets/icon-256x256.png b/wp/assets/icon-256x256.png deleted file mode 100644 index e83c007..0000000 Binary files a/wp/assets/icon-256x256.png and /dev/null differ diff --git a/wp/assets/screenshot-1.png b/wp/assets/screenshot-1.png deleted file mode 100644 index 0fc3db3..0000000 Binary files a/wp/assets/screenshot-1.png and /dev/null differ diff --git a/wp/assets/screenshot-2.png b/wp/assets/screenshot-2.png deleted file mode 100644 index e9d7dc3..0000000 Binary files a/wp/assets/screenshot-2.png and /dev/null differ diff --git a/wp/assets/screenshot-3.png b/wp/assets/screenshot-3.png deleted file mode 100644 index c622a4f..0000000 Binary files a/wp/assets/screenshot-3.png and /dev/null differ diff --git a/wp/assets/screenshot-4.png b/wp/assets/screenshot-4.png deleted file mode 100644 index cb0519e..0000000 Binary files a/wp/assets/screenshot-4.png and /dev/null differ diff --git a/wp/assets/screenshot-5.png b/wp/assets/screenshot-5.png deleted file mode 100644 index 626e743..0000000 Binary files a/wp/assets/screenshot-5.png and /dev/null differ diff --git a/wp/trunk/index.js b/wp/trunk/index.js deleted file mode 100644 index 6c8861e..0000000 --- a/wp/trunk/index.js +++ /dev/null @@ -1,100 +0,0 @@ -(function() { - - var paintrerro = Painterro({ - initText: 'Press Prn Scr, Ctrl+V to paste a screenshot', - colorScheme: { - main: '#23282d', - control: '#444', - controlContent: '#cccccc', - activeControl: '#015c88', - activeControlContent: '#ffffff', - controlActiveControl: '#cccccc', - inputBackground: '#ffffff', - backgroundColor: '#999999', - dragOverBarColor: '#899dff', - hoverControl: '#191e23', - hoverControlContent: '#00b9eb', - }, - saveHandler: function (image, done) { - console.log('media', _wpMediaViewsL10n.settings) - - var formData = new FormData() - formData.append('name', image.suggestedFileName()); - formData.append('action', 'upload-attachment'); - formData.append('_wpnonce', ptro_media_form_nonce); - formData.append('post_id', ptro_post_id); - formData.append('async-upload', image.asBlob(), image.suggestedFileName()); - - var xhr = new XMLHttpRequest(); - xhr.open('POST', '/wp-admin/async-upload.php', true); - xhr.onload = function () { - var response = JSON.parse(this.responseText); - console.log('Upload done:', response); - var xhrInsert = new XMLHttpRequest(); - xhrInsert.open("POST", "/wp-admin/admin-ajax.php"); - var formDataInsert = new FormData(); - formDataInsert.append('nonce', ptro_media_send_to_editor_nonce); - formDataInsert.append('attachment[id]', response.data.id); - formDataInsert.append('attachment[post_content]', ''); - formDataInsert.append('attachment[post_excerpt]', ''); - formDataInsert.append('attachment[align]','none'); - formDataInsert.append('attachment[image-size]','full'); - formDataInsert.append('html', ''); - formDataInsert.append('post_id', 'ptro_post_id'); - formDataInsert.append('action', 'send-attachment-to-editor'); - - xhrInsert.send(formDataInsert); - xhrInsert.onload = function (e) { - var response = JSON.parse(this.responseText); - console.log('Inserting done:', response); - paintrerro.mceEditor.execCommand("mceInsertContent", 0, response.data); - done(true); - } - xhrInsert.onerror = function (e) { - console.error('Error inserting text image: ', e) - done(true) - }; - }; - xhr.onerror = function (e) { - console.error('Error uploading image: ', e) - done(true) - }; - xhr.send(formData) - } - }); - tinymce.create("tinymce.plugins.painterro_plugin", { - - //url argument holds the absolute url of our plugin directory - init : function(ed, url) { - paintrerro.mceEditor = ed; - //add new button - ed.addButton("painterro", { - title : "Open Painterro", - cmd : "painterro_cmd", - 'icon' : "painterro ptro-icon ptro-icon-painterro", - }); - - //button functionality. - ed.addCommand("painterro_cmd", function() { - paintrerro.show(); - }); - - }, - - createControl : function(n, cm) { - return null; - }, - - getInfo : function() { - return { - longname: "Painterro", - author: "Ivan Borshchov", - version: "1.2.23", - }; - } - }); - - tinymce.PluginManager.add("painterro_plugin", tinymce.plugins.painterro_plugin); -})(); - diff --git a/wp/trunk/painterro-wp.php b/wp/trunk/painterro-wp.php deleted file mode 100644 index e0d8a92..0000000 --- a/wp/trunk/painterro-wp.php +++ /dev/null @@ -1,55 +0,0 @@ - var ptro_post_id =' . $post->ID . - '; var ptro_media_send_to_editor_nonce = "' . wp_create_nonce( 'media-send-to-editor' ) . - '"; var ptro_media_form_nonce = "' . wp_create_nonce( 'media-form' ) . '" '; -} -add_action( 'admin_head', 'painterro_admin_head' ); diff --git a/wp/trunk/readme.txt b/wp/trunk/readme.txt deleted file mode 100644 index ac70e45..0000000 --- a/wp/trunk/readme.txt +++ /dev/null @@ -1,73 +0,0 @@ -=== Painterro === -Contributors: Ivan Borshchov, -Tags: crop, Image editor, paint, image -Requires at least: 3.7 -Tested up to: 5.5.1 -License: MIT -License URI: https://opensource.org/licenses/MIT - -Paste screenshots and edit images directly in your wordpress admin. -Use Painterro button to visual editor for images editing. -Absolutely free and open source. - -With Painterro you can: - -- Paste image from clipboard (e.g. screenshot), drag and drop it into widget, or load with open dialog -- Crop image by defined area -- Paint primitives (alpha color can be used) -- Add text -- Rotate, Resize, Scale image -- Pixelize some area to hide sensitive data - -Supported hotkeys: - -- `Ctrl + Z` - Cancel last operation -- `Ctrl + V` - Paste image from clipboard -- `Ctrl + C` - Copy selected area to clipboard (*internal) -- `Shift` - when drawing **rect**/**ellipse**, Draw **square**/**circle** -- `Shift` - when drawing **line**, draw at angles of `0`, `45`, `90`, `135` etc degrees -- `Alt` - when using pipette, open zoom helper -- `Ctrl` + `Wheel mouse up/down` - Zoom image to 100% and back. Works only if image doesn't fit in the draw area (e.g. area `800x600` and you draw `1920x1080` image) -- `Ctrl + S` - Save image - -== Frequently Asked Questions == - -= Where can I found more info about Painterro? = - -See [ReadMe](https://github.com/devforth/painterro) - -= Where can I report an issue? - -Create [github issue](https://github.com/devforth/painterro/issues/new) (Please add `wordpress` label) - -= Where can I suggest a new feature? - -Create [github issue](https://github.com/devforth/painterro/issues/new) (Please add `wordpress` label) - -= How to help the project without money? = - -Press `Star` on [github](https://github.com/devforth/painterro). This will help to know how many people intrested in project. - -== Changelog == - -= 0.2.21 = -* Initial plugin version based on painterro 0.2.21 - -= 0.2.21.5 = -* WordPress 3.7 icon fix - -== Upgrade Notice == - -= 0.2.21 = -Initial plugin version - -= 0.2.21.5 = -* WordPress 3.7 icon fix - -== Screenshots == - -1. Painterro button -2. Painterro plugin look -3. Rectangle tool -4. Crop tool -5. Color Picker \ No newline at end of file diff --git a/wp/trunk/style.css b/wp/trunk/style.css deleted file mode 100644 index d743a01..0000000 --- a/wp/trunk/style.css +++ /dev/null @@ -1,24 +0,0 @@ -.ptro-holder-wrapper { - z-index: 10000; -} - -div.ptro-holder { - top: 32px; -} - -i.mce-i-painterro:before, span.mce_painterro:before { - font-size: 20px !important; - font-family: ptroiconfont !important; - font-style: normal !important; - font-weight: normal !important; - font-variant: normal !important; - text-transform: none !important; - speak: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: "\f101"; -} - -span.mce_painterro { - line-height: 20px; -} \ No newline at end of file