Permalink
Browse files

fixes #55

  • Loading branch information...
1 parent cc9deee commit e4421bbb31f154f04afde10624eb326a798a8069 @pizzapanther committed May 8, 2012
View
@@ -1,6 +1,7 @@
*.pyc
*.pid
*.log
+devserver
neutron.sql3
neutron/settings_local.py
neutron/static/CACHE/
View
@@ -1 +1 @@
-12.04
+12.05
@@ -12,6 +12,6 @@ class Meta:
model = ide.models.Preferences
exclude = ('user', 'basedir', 'session', 'uitheme', 'theme', 'fontsize', \
'keybind', 'swrap', 'tabsize', 'hactive', 'hword', 'invisibles', \
- 'gutter', 'pmargin', 'softab', 'behave', 'save_session')
+ 'gutter', 'pmargin', 'softab', 'behave', 'save_session', 'splitterm')
@@ -0,0 +1,117 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Adding field 'Preferences.splitterm'
+ db.add_column('ide_preferences', 'splitterm', self.gf('django.db.models.fields.BooleanField')(default=True), keep_default=False)
+
+
+ def backwards(self, orm):
+
+ # Deleting field 'Preferences.splitterm'
+ db.delete_column('ide_preferences', 'splitterm')
+
+
+ models = {
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 7, 19, 19, 42, 769626)'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 5, 7, 19, 19, 42, 769508)'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'ide.dirsearch': {
+ 'Meta': {'object_name': 'DirSearch'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'killed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'opts': ('django.db.models.fields.TextField', [], {}),
+ 'replace_results': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'replace_state': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True', 'blank': 'True'}),
+ 'results': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'state': ('django.db.models.fields.CharField', [], {'default': "'created'", 'max_length': '25'}),
+ 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
+ },
+ 'ide.extfilerequest': {
+ 'Meta': {'object_name': 'ExtFileRequest'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'path': ('django.db.models.fields.TextField', [], {'max_length': '255'}),
+ 'secret': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ 'ide.jobkill': {
+ 'Meta': {'object_name': 'JobKill'},
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'ds': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['ide.DirSearch']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
+ },
+ 'ide.preferences': {
+ 'Meta': {'object_name': 'Preferences'},
+ 'basedir': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'behave': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'bg': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'font': ('django.db.models.fields.CharField', [], {'default': '\'"Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace\'', 'max_length': '255'}),
+ 'fontsize': ('django.db.models.fields.CharField', [], {'default': "'12px'", 'max_length': '10'}),
+ 'gutter': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'hactive': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'hword': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'invisibles': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'keybind': ('django.db.models.fields.CharField', [], {'default': "'ace'", 'max_length': '10'}),
+ 'pmargin': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'save_session': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'session': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
+ 'softab': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'splitterm': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'swrap': ('django.db.models.fields.CharField', [], {'default': "'off'", 'max_length': '10'}),
+ 'tabsize': ('django.db.models.fields.IntegerField', [], {'default': '4'}),
+ 'tfontsize': ('django.db.models.fields.CharField', [], {'default': "'13px'", 'max_length': '25'}),
+ 'theme': ('django.db.models.fields.CharField', [], {'default': "'textmate'", 'max_length': '25'}),
+ 'uitheme': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '25'}),
+ 'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
+ },
+ 'ide.tempfile': {
+ 'Meta': {'object_name': 'TempFile'},
+ 'file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"})
+ }
+ }
+
+ complete_apps = ['ide']
@@ -105,6 +105,7 @@ class Preferences (models.Model):
pmargin = models.BooleanField('Show Print Margin', default=True)
softab = models.BooleanField('Use Soft Tab', default=True)
behave = models.BooleanField('Enable Behaviors', default=True)
+ splitterm = models.BooleanField('Use Split Terminal/IDE', default=True)
save_session = models.BooleanField('Save Session', default=True)
session = models.TextField(blank=True, null=True)
@@ -509,3 +509,7 @@ ul.jqueryFileTree {
width: 255px;
}
+#ide_bottom {
+ color: #ccc;
+}
+
@@ -2,15 +2,9 @@ body {
margin: 0;
padding: 0;
overflow: hidden;
- color: #ccc;
- background-color: black;
- background-size: 100%;
- background-repeat: no-repeat;
- background-attachment: fixed;
- background-position: center;
}
-img {
+#termbody img {
border: 0;
display: block;
}
@@ -227,7 +227,14 @@ function resize_editor (skip_splitter) {
var cnt = split_href(href);
}
- var h = $("#splitter_right").height();
+ if (tsplitter) {
+ var h = $("#ide_top").height() - 2;
+ }
+
+ else {
+ var h = $("#splitter_right").height();
+ }
+
$("#editor_global").height(h - $('.ui-widget-header').outerHeight());
$("#editor_global").width($("#splitter_right").width());
@@ -406,15 +413,31 @@ function size_search (e) {
$("#search_panel_results a.expand").width(width);
$("#editor_global").width($("#splitter_right").width());
-
+
+ if (tsplitter) {
+ var old_total = 5 + $("#ide_top").height() + $("#ide_bottom").height();
+ var new_total = $("#splitter_right").height();
+
+ if (new_total - old_total != 0) {
+ $("#ide_top").height(new_total - (5 + $("#ide_bottom").height()));
+ }
+
+ var h = $("#ide_top").height() - 2;
+ $("#editor_global").height(h - $('.ui-widget-header').outerHeight());
+
+ send_resize();
+ }
+
if (editor_global) {
editor_global.resize();
}
+
}, 400);
}
var ksplitter;
var esplitter;
+var tsplitter;
var tabstrip;
var tooltabs;
var search_panel;
@@ -444,6 +467,10 @@ $(document).ready(function () {
esplitter = $("#splitter").kendoSplitter({resize: size_search, panes: [{collapsible: true, size: '250px', scrollable: false}, {scrollable: false}], resize: size_search}).data("kendoSplitter");
+ if (splitterm) {
+ tsplitter = $("#splitter_right").kendoSplitter({orientation: 'vertical', resize: size_search, panes: [{collapsible: false, scrollable: false, resizable: true}, {contentUrl: "/terminal/?split=1", resizable: true, collapsible: true, scrollable: false, size: '300px'}]}).data("kendoSplitter");
+ }
+
if (pref.save_session) {
for (i in init_session) {
get_file(init_session[i]);
@@ -1,6 +1,6 @@
function about () {
- alert('Neutron IDE v12.04 by Paul M Bailey - paul.m.bailey@gmail.com\n\nneutronide.com\n\nLicense: BSD');
+ alert('Neutron IDE v12.05 by Paul M Bailey - paul.m.bailey@gmail.com\n\nneutronide.com\n\nLicense: BSD');
hide_menu();
}
@@ -5,6 +5,20 @@ function initws () {
ws.onmessage = wsmessage;
ws.onclose = wsclose;
}
+
+function reconnect () {
+ $('#refresh').addClass('hidden');
+ $('.a.term').remove();
+ current_ts = null;
+
+ ws = new WebSocket(wsurl);
+ ws.onopen = wsopen;
+ ws.onmessage = wsmessage;
+ ws.onclose = wsclose;
+
+ terminals = {};
+ terminal_count = 0;
+}
$(window).load(initws);
@@ -678,9 +692,17 @@ function show_pref () {
function update_prefs (new_prefs) {
pref_win.close();
- $('body').css('background-image', 'url(' + new_prefs.bg + ')');
- $('body').css('font-family', new_prefs.font);
- $('body').css('font-size', new_prefs.fontsize);
+ if (tsplit) {
+ $('#termbody').css('background-image', 'url(' + new_prefs.bg + ')');
+ $('#termbody').css('font-family', new_prefs.font);
+ $('#termbody').css('font-size', new_prefs.fontsize);
+ }
+
+ else {
+ $('body').css('background-image', 'url(' + new_prefs.bg + ')');
+ $('body').css('font-family', new_prefs.font);
+ $('body').css('font-size', new_prefs.fontsize);
+ }
$('#terminal').css('font-family', new_prefs.font);
send_resize();
@@ -705,8 +727,3 @@ function send_resize () {
}
}
}
-
-$(window).resize(function() {
- send_resize();
-});
-
@@ -66,6 +66,12 @@
</td>
<td>{{ form.save_session }} <label for="id_save_session">Save Session</label></td>
</tr>
+ <tr>
+ <td>
+ {{ form.splitterm }} <label for="id_splitterm">Use Split Terminal/IDE</label>
+ </td>
+ <td></td>
+ </tr>
</table>
</td>
</tr>
@@ -28,6 +28,12 @@
var loaded_themes = ['{{ pref.theme }}'];
var static_url = '{{ STATIC_URL }}';
var track_ajax = {% if request.track %}true{% else %}false{% endif %};
+
+ {% if pref.splitterm and TERMINAL_ON %}
+ var splitterm = true;
+ {% else %}
+ var splitterm = false;
+ {% endif %}
</script>
<style type="text/css">
.ace_editor { font-size: {{ pref.fontsize }}; }
@@ -37,7 +43,7 @@
{% block content %}
<div id="neutron_ui">
<div id="neutron_menubar">
- <span id="logo" class="logo">Neutron IDE v12.04</span>
+ <span id="logo" class="logo">Neutron IDE v12.05</span>
<button class="k-button" onclick="SaveCurrentTab()">Save</button>
<button class="k-button" onclick="SaveAll()">Save All</button>
<button class="k-button" onclick="CloseAll()">Close All</button>
@@ -66,12 +72,26 @@
</div>
</div>
<div id="splitter_right">
+ {% if request.user.preferences.splitterm and TERMINAL_ON %}
+ <div id="ide_top">
+ <div id="tabs">
+ <div id="tabsinner">
+ <ul></ul>
+ </div>
+ </div>
+ <div id="editor_global"></div>
+ </div>
+ <div id="ide_bottom">
+ <!--<iframe width="100%" height="300" frameBorder="0" scrolling="auto" src="/terminal/"></iframe>-->
+ </div>
+ {% else %}
<div id="tabs">
<div id="tabsinner">
<ul></ul>
</div>
</div>
<div id="editor_global"></div>
+ {% endif %}
</div>
</div>
</div>
@@ -30,7 +30,7 @@
<div>Saving:</div>
</div>
<div id="editor_pref">
- <iframe width="100%" height="340" frameBorder="0" scrolling="auto" src=""></iframe>
+ <iframe width="100%" height="380" frameBorder="0" scrolling="auto" src=""></iframe>
</div>
<div id="dir_chooser">
<div class="browser">
@@ -12,7 +12,7 @@
</style>
{% endblock %}
{% block content %}
-<form action="" method="post" class="pref_form" enctype="multipart/form-data" target="_self">
+<form action="{% url ide-terminal-pref %}" method="post" class="pref_form" enctype="multipart/form-data" target="_self">
{% csrf_token %}
<table>
<tr>
Oops, something went wrong.

0 comments on commit e4421bb

Please sign in to comment.