Permalink
Browse files

Reverted an re-commited several changes to clear large phar-archive b…

…inary history mistake.

Included merges (but without history): 
chive-ace-editor
chive-phar
eliminate-chive-webapplication
Fixed editor for triggers/views/routines
Fixed Bug in CSS minifacation
Fixed bug where JSi18n resources were not included in phar distribution
Fixed JS message publishing in phar distribution.
  • Loading branch information...
davidroth committed May 1, 2012
1 parent 0c8913c commit eef6c5636e9f48945c432017d41f264c82a114a8
Showing with 767 additions and 5,089 deletions.
  1. +15 −0 archiveExport.sh
  2. BIN images/icons/fugue/16/home.png
  3. BIN images/icons/fugue/16/logout.png
  4. BIN images/icons/fugue/16/refresh.png
  5. +20 −4 index.php
  6. +10 −0 js/ace/ace.js
  7. +1 −0 js/ace/mode-sql.js
  8. +213 −0 js/ace/theme-chive-uncompressed.js
  9. +58 −1 js/chive.js
  10. +0 −1,235 js/components/EditArea/edit_area_full.js
  11. +0 −165 js/components/EditArea/fusonic_extensions/editarea.js
  12. BIN js/components/EditArea/images/autocompletion.gif
  13. BIN js/components/EditArea/images/close.gif
  14. BIN js/components/EditArea/images/fullscreen.gif
  15. BIN js/components/EditArea/images/go_to_line.gif
  16. BIN js/components/EditArea/images/help.gif
  17. BIN js/components/EditArea/images/highlight.gif
  18. BIN js/components/EditArea/images/load.gif
  19. BIN js/components/EditArea/images/move.gif
  20. BIN js/components/EditArea/images/newdocument.gif
  21. BIN js/components/EditArea/images/opacity.png
  22. BIN js/components/EditArea/images/processing.gif
  23. BIN js/components/EditArea/images/redo.gif
  24. BIN js/components/EditArea/images/redo.png
  25. BIN js/components/EditArea/images/reset_highlight.gif
  26. BIN js/components/EditArea/images/save.gif
  27. BIN js/components/EditArea/images/search.gif
  28. BIN js/components/EditArea/images/smooth_selection.gif
  29. BIN js/components/EditArea/images/spacer.gif
  30. BIN js/components/EditArea/images/statusbar_resize.gif
  31. BIN js/components/EditArea/images/undo.gif
  32. BIN js/components/EditArea/images/undo.png
  33. BIN js/components/EditArea/images/word_wrap.gif
  34. +0 −54 js/components/EditArea/langs/bg.js
  35. +0 −48 js/components/EditArea/langs/cs.js
  36. +0 −48 js/components/EditArea/langs/de.js
  37. +0 −48 js/components/EditArea/langs/dk.js
  38. +0 −48 js/components/EditArea/langs/en.js
  39. +0 −48 js/components/EditArea/langs/eo.js
  40. +0 −48 js/components/EditArea/langs/es.js
  41. +0 −48 js/components/EditArea/langs/fi.js
  42. +0 −48 js/components/EditArea/langs/fr.js
  43. +0 −48 js/components/EditArea/langs/hr.js
  44. +0 −48 js/components/EditArea/langs/it.js
  45. +0 −48 js/components/EditArea/langs/ja.js
  46. +0 −48 js/components/EditArea/langs/mk.js
  47. +0 −48 js/components/EditArea/langs/nl.js
  48. +0 −48 js/components/EditArea/langs/pl.js
  49. +0 −48 js/components/EditArea/langs/pt.js
  50. +0 −48 js/components/EditArea/langs/ru.js
  51. +0 −48 js/components/EditArea/langs/sk.js
  52. +0 −48 js/components/EditArea/langs/zh.js
  53. +0 −7 js/components/EditArea/license_apache.txt
  54. +0 −10 js/components/EditArea/license_bsd.txt
  55. +0 −458 js/components/EditArea/license_lgpl.txt
  56. +0 −70 js/components/EditArea/reg_syntax/basic.js
  57. +0 −45 js/components/EditArea/reg_syntax/brainfuck.js
  58. +0 −63 js/components/EditArea/reg_syntax/c.js
  59. +0 −120 js/components/EditArea/reg_syntax/coldfusion.js
  60. +0 −66 js/components/EditArea/reg_syntax/cpp.js
  61. +0 −85 js/components/EditArea/reg_syntax/css.js
  62. +0 −51 js/components/EditArea/reg_syntax/html.js
  63. +0 −57 js/components/EditArea/reg_syntax/java.js
  64. +0 −94 js/components/EditArea/reg_syntax/js.js
  65. +0 −83 js/components/EditArea/reg_syntax/pas.js
  66. +0 −88 js/components/EditArea/reg_syntax/perl.js
  67. +0 −157 js/components/EditArea/reg_syntax/php.js
  68. +0 −145 js/components/EditArea/reg_syntax/python.js
  69. +0 −25 js/components/EditArea/reg_syntax/robotstxt.js
  70. +0 −68 js/components/EditArea/reg_syntax/ruby.js
  71. +0 −56 js/components/EditArea/reg_syntax/sql.js
  72. +0 −88 js/components/EditArea/reg_syntax/tsql.js
  73. +0 −53 js/components/EditArea/reg_syntax/vb.js
  74. +0 −57 js/components/EditArea/reg_syntax/xml.js
  75. +10 −3 js/views/global/browse.js
  76. +111 −0 pharExport.php
  77. +42 −0 protected/components/AceEditor.php
  78. +0 −17 protected/components/ChiveWebApplication.php
  79. +0 −76 protected/components/EditArea.php
  80. +0 −8 protected/components/helpers/AjaxResponse.php
  81. +16 −9 protected/components/messages/CXmlMessageSource.php
  82. +31 −0 protected/components/phar/PharAssetManager.php
  83. +34 −0 protected/components/phar/PharHttpRequest.php
  84. +1 −1 protected/config/main.php
  85. +28 −0 protected/config/phar.php
  86. +18 −30 protected/{components/SqlEditor.php → controllers/AssetController.php}
  87. +4 −5 protected/controllers/BookmarkController.php
  88. +3 −3 protected/controllers/ColumnController.php
  89. +21 −1 protected/controllers/Controller.php
  90. +4 −4 protected/controllers/IndexController.php
  91. +1 −1 protected/controllers/InformationController.php
  92. +6 −6 protected/controllers/PrivilegesController.php
  93. +3 −3 protected/controllers/RoutineController.php
  94. +4 −4 protected/controllers/RowController.php
  95. +16 −14 protected/controllers/SchemaController.php
  96. +15 −15 protected/controllers/SiteController.php
  97. +15 −8 protected/controllers/TableController.php
  98. +3 −3 protected/controllers/TriggerController.php
  99. +3 −3 protected/controllers/ViewController.php
  100. +5 −5 protected/models/ImportPage.php
  101. +3 −13 protected/views/global/browse.php
  102. +4 −4 protected/views/information/about.php
  103. +1 −1 protected/views/layouts/main.php
  104. +5 −4 protected/views/layouts/schema.php
  105. +6 −9 protected/views/routine/form.php
  106. +6 −9 protected/views/trigger/form.php
  107. +6 −9 protected/views/view/form.php
  108. +23 −4 themes/standard/css/component.css
  109. +0 −545 themes/standard/css/edit_area.css
  110. +2 −3 yii/yii.php
View
@@ -15,7 +15,22 @@ touch chive/index_changed.php
cat chive/index.php | sed "s/'YII_DEBUG', true/'YII_DEBUG', false/" >> chive/index_changed.php
rm chive/index.php
rm chive/archiveExport.sh
rm chive/protected/tests -rf
mv chive/pharExport.php pharExport.php
mv chive/index_changed.php chive/index.php
tar czf chive_$1.tar.gz chive
zip -rq chive_$1.zip chive
# Download JSMin
echo 'Download & compile JSMin ...'
wget https://raw.github.com/douglascrockford/JSMin/master/jsmin.c
gcc -o jsmin jsmin.c
# Do phar export
echo 'Run phar export ...'
/usr/bin/php pharExport.php $1
rm pharExport.php
# Delete JSMin
rm jsmin jsmin.c
View
0 images/icons/fugue/16/home.png 100755 → 100644
No changes.
View
0 images/icons/fugue/16/logout.png 100755 → 100644
No changes.
View
0 images/icons/fugue/16/refresh.png 100755 → 100644
No changes.
View
@@ -5,7 +5,19 @@ function pre($_value) { if($_value === null || $_value === false || $_value ===
function predie($_value) { pre($_value); Yii::app()->end(); }
// Yii debug mode
defined('YII_DEBUG') or define('YII_DEBUG', true);
define('YII_DEBUG', true);
// Chive phar mode
define('CAP_ENABLED', strpos(__FILE__, "phar://") === 0);
if(CAP_ENABLED)
{
define("CAP_PATH", sys_get_temp_dir() . DIRECTORY_SEPARATOR . "chive_" . md5(__FILE__));
@mkdir(CAP_PATH, 0777);
@mkdir(CAP_PATH . DIRECTORY_SEPARATOR . "assets", 0777);
@mkdir(CAP_PATH . DIRECTORY_SEPARATOR . "sessions", 0777);
@mkdir(CAP_PATH . DIRECTORY_SEPARATOR . "user-config", 0777);
copy(__DIR__ . DIRECTORY_SEPARATOR . "protected/runtime/user-config/default.xml", CAP_PATH . DIRECTORY_SEPARATOR . "user-config" . DIRECTORY_SEPARATOR . "default.xml");
}
// Load Yii
require('yii/yii.php');
@@ -18,7 +30,7 @@ function predie($_value) { pre($_value); Yii::app()->end(); }
}
// Create web application
$app = Yii::createWebApplication('protected/config/main.php');
$app = YiiBase::createWebApplication(__DIR__ . DIRECTORY_SEPARATOR . 'protected/config/' . (CAP_ENABLED ? 'phar' : 'main') . '.php');
$app->getSession()->setCookieParams(array('path' => $app->getBaseUrl(false)));
// Define constants
@@ -28,6 +40,7 @@ function predie($_value) { pre($_value); Yii::app()->end(); }
$validPaths = array(
'site',
'index.php',
'asset',
);
if(!$app->user->isGuest)
@@ -44,7 +57,10 @@ function predie($_value) { pre($_value); Yii::app()->end(); }
{
$response = new AjaxResponse();
$response->redirectUrl = Yii::app()->createUrl('site/login');
$response->send();
header("Content-type: application/json");
echo $response->__toString();
$app->end();
}
else
{
@@ -78,7 +94,7 @@ function predie($_value) { pre($_value); Yii::app()->end(); }
}
// Publish messages for javascript usage
Yii::app()->getComponent('messages')->publishJavaScriptMessages();
$app->getComponent('messages')->publishJavaScriptMessages();
// Run application
$app->run();
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -0,0 +1,213 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Ajax.org Code Editor (ACE).
*
* The Initial Developer of the Original Code is
* Ajax.org B.V.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Fabian Jakobs <fabian AT ajax DOT org> (tomorrow theme)
* Fusonic GmbH (chive theme, based on tomorrow theme)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
define('ace/theme/chive', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-chive";
exports.cssText = "\
.ace-chive .ace_editor {\
border: 2px solid rgb(159, 159, 159);\
}\
\
.ace-chive .ace_editor.ace_focus {\
border: 2px solid #327fbd;\
}\
\
.ace-chive .ace_gutter {\
background-color: #F7F7F7;\
color: #ccc;\
border-right: 1px solid #ccc;\
}\
\
.ace-chive .ace_gutter-cell {\
text-align: right;\
min-width: 30px;\
padding: 0px 5px;\
}\
\
.ace-chive .ace_print_margin {\
width: 1px;\
background: #e8e8e8;\
}\
\
.ace-chive .ace_scroller {\
background-color: #F7F7F7;\
}\
\
.ace-chive .ace_text-layer {\
cursor: text;\
color: #444;\
}\
\
.ace-chive .ace_cursor {\
border-left: 2px solid #AEAFAD;\
}\
\
.ace-chive .ace_cursor.ace_overwrite {\
border-left: 0px;\
border-bottom: 1px solid #AEAFAD;\
}\
\
.ace-chive .ace_marker-layer .ace_selection {\
background: #D6D6D6;\
}\
\
.ace-chive .ace_marker-layer .ace_step {\
background: rgb(198, 219, 174);\
}\
\
.ace-chive .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #D1D1D1;\
}\
\
.ace-chive .ace_marker-layer .ace_active_line {\
background: #EFEFEF;\
}\
\
.ace-chive .ace_marker-layer .ace_selected_word {\
border: 1px solid #D6D6D6;\
}\
\
.ace-chive .ace_invisible {\
color: #D1D1D1;\
}\
\
.ace-chive .ace_identifier {\
color: #879EFA;\
}\
\
.ace-chive .ace_keyword, .ace-chive .ace_meta {\
color:#60CA00;\
}\
\
.ace-chive .ace_keyword.ace_operator {\
color:magenta;\
}\
\
.ace-chive .ace_constant.ace_language {\
color:#F5871F;\
}\
\
.ace-chive .ace_constant.ace_numeric {\
color:#F5871F;\
}\
\
.ace-chive .ace_constant.ace_other {\
color:#666969;\
}\
\
.ace-chive .ace_invalid {\
color:#FFFFFF;\
background-color:#C82829;\
}\
\
.ace-chive .ace_invalid.ace_deprecated {\
color:#FFFFFF;\
background-color:#8959A8;\
}\
\
.ace-chive .ace_support.ace_constant {\
color:#F5871F;\
}\
\
.ace-chive .ace_fold {\
background-color: #4271AE;\
border-color: #4D4D4C;\
}\
\
.ace-chive .ace_support.ace_function {\
color:#4271AE;\
}\
\
.ace-chive .ace_storage {\
color:#8959A8;\
}\
\
.ace-chive .ace_storage.ace_type, .ace-chive .ace_support.ace_type{\
color:#8959A8;\
}\
\
.ace-chive .ace_variable {\
color:#4271AE;\
}\
\
.ace-chive .ace_variable.ace_parameter {\
color:#F5871F;\
}\
\
.ace-chive .ace_string {\
color:#879EFA;\
}\
\
.ace-chive .ace_string.ace_regexp {\
color:#879EFA;\
}\
\
.ace-chive .ace_comment {\
color:#8E908C;\
}\
\
.ace-chive .ace_variable {\
color:#C82829;\
}\
\
.ace-chive .ace_meta.ace_tag {\
color:#C82829;\
}\
\
.ace-chive .ace_entity.ace_other.ace_attribute-name {\
color:#C82829;\
}\
\
.ace-chive .ace_entity.ace_name.ace_function {\
color:#4271AE;\
}\
\
.ace-chive .ace_markup.ace_underline {\
text-decoration:underline;\
}\
\
.ace-chive .ace_markup.ace_heading {\
color:#718C00;\
}";
var dom = require("../lib/dom");
dom.importCssString(exports.cssText, exports.cssClass);
});
View
@@ -105,7 +105,64 @@ var chive = {
});
},
initAce: function(config)
{
var editor = ace.edit(config.id + '_editor');
var session = editor.getSession();
var div = $('#' + config.id + '_editor');
var container = $('#' + config.id + '_container');
// Set SQL edit mode
var sqlMode = require("ace/mode/sql").Mode;
session.setMode(new sqlMode());
// Set theme and layout
editor.setTheme("ace/theme/chive");
editor.setShowPrintMargin(false);
editor.setFontSize("16px");
// Value
var textArea = $('#' + config.id);
session.setValue(textArea.val());
session.on('change', function() {
textArea.val(session.getValue());
});
// Set resizing to container width
var containerWidth = container.width();
window.setInterval(function() {
if(container.width() != containerWidth)
{
containerWidth = container.width();
editor.resize();
}
}, 100);
// Set autogrow
if(config.autogrow)
{
var minHeight = config.height;
var maxHeight = 300;
session.on('change', function() {
var lines = session.getValue().split("\n").length;
var calculatedHeight = lines * 18 + 20;
if(calculatedHeight > maxHeight)
{
calculatedHeight = maxHeight;
}
else if(calculatedHeight < minHeight)
{
calculatedHeight = minHeight;
}
div.height(calculatedHeight);
editor.resize();
});
}
},
/*
* Loads the specified page.
*/
Oops, something went wrong.

0 comments on commit eef6c56

Please sign in to comment.