var app = ui.get_app();
var is_author = app.is_author();
var user = ui.get_user();
var versions = app.get_versions();
var release = app.get_released_version();
var version = app.get_version_label();
var path = app.get_path();
var vpath = app.get_versioned_path();
var ppath = release ? path + '/' + release : null;
var num = versions.length;
if (ppath && ppath != vpath) { num -= 1; }
var submenu = $('#menu-yourapps');
var submenu_height = Math.min(submenu.height(), $(window).height() - submenu.offset().top - 25);
submenu.height(submenu_height).css('visibility', 'visible');
$('#your-apps-loader').hide();
var app = ui.get_app();
var file = ui.get_file();
var user = ui.get_user();
var writable = app ? app.is_writable() : false;
var acre_handler = file.get_acre_handler();
var mime_type = file.get_mime_type();
var has_options = false;
var store = ui.get_store();
var app = ui.get_app();
var file = ui.get_file();
var is_user = ui.get_user();
var writable = is_user && app.is_writable();
var has_options = true;
Line Numbers
var has_options = true;
Soft Wrap
var has_options = true;
Syntax Highlighting
var has_options = true;
Automatic Code Assist
var has_options = true;
Enable MQL Extensions (experimental)
No configuration options for this file type.
$("#menu-editoroptions input[type='radio']").click(function(){
var file = ui.get_file();
var name = $(this).attr('name').split('edopt-')[1];
var pref = {};
pref[name] = $(this).val();
ui.set_editor_prefs(pref);
ui.do_hide_overlays();
file.mark_editor_dirty();
file.t_editor_show(ui._get_desired_editor_classname(), ui.get_editor_prefs())
.onready(function() {
ui.refresh_file_templates();
});
});
App authors can create and release new versions of their app any time.
Current is always the latest version; all edits are made to Current. Other versions are read only.
Release is the version the app author wants people to use. Any version can be released, but it's good practice to create and release a version other than Current to prevent development from impacting users.
${app_versions_list()}
var app_path_segs = ui.get_app().get_path().split('/');
app_path_segs.pop();
var app_root = app_path_segs.join('/');
var app = ui.get_app();
var writable = app.is_writable();
var hosts = app.get_hosts();
var release = app.get_released_version() || 'current';
var published_regex = /([^.]*)\.freebaseapps\.com$/;
var pub = null;
for (var i=0; i < hosts.length; i++) {
var host = hosts[i];
if (host.version == release) {
var re = published_regex.exec(host.host);
if (re) {
pub = re[1];
break;
}
}
}
var app = ui.get_app();
var app_path = app.get_path();
var writable = app.is_writable();
var release = app.get_released_version();
var released_id = release ? app_path + '/' + release : app_path;
var versions = app.get_versions();
var re = new RegExp('(\\d+)');
var counter = 1;
for (var i=0; i< versions.length; i++) {
var r = re.exec(versions[i].name);
if (r && r.length) {
var cnt = parseInt(r[1], 10);
if (counter <= cnt) { counter = cnt + 1; }
}
}
var first_number = true;
var writable = ui.get_app().is_writable();
var write_user = ui.get_app().get_write_user();
var is_write_user = write_user && write_user.get_name() == ui.get_user().get_name() ? true : false;
var oauth_enabled = ui.get_app().is_oauth_enabled();
var permission_attr = {};
var writeuser_attr = {};
var oauth_attr = {};
if (write_user) {
permission_attr.checked = writeuser_attr.checked = 'checked';
if (!is_write_user) {
permission_attr.disabled = writeuser_attr.disabled = oauth_attr.disabled = 'disabled';
};
} else if (oauth_enabled) {
permission_attr.checked = oauth_attr.checked = 'checked';
} else {
writeuser_attr.disabled = oauth_attr.disabled = 'disabled';
oauth_attr.checked = 'checked';
}
API keys authorize information exchange with other web applications or services. Register your app with the service domain you want to use. Each service handles this differently, so follow their instructions. Once registered, enter the API key and secret (if required) provided by the service here.
$('#permissions-settings :input').change(function() {
var type = null;
if ($('#permission-enable').attr('checked')) {
$('#permissions-settings :radio').removeAttr('disabled');
if ($("input[name='permission-type'][value='oauth']").attr('checked')) { type = "oauth"; }
if ($("input[name='permission-type'][value='writeuser']").attr('checked')) { type = "writeuser"; }
} else {
$('#permissions-settings :radio').attr('disabled', 'disabled');
type = "none";
}
ui.do_app_set_write_permissions(type);
});
ui.watch_inputs('add-file', {
inputs : {
'new-file-handler' : null
},
change : function(inputs){
var handler = inputs['new-file-handler'];
$('.handler-new').empty();
$('#handler-'+handler + ' .handler-new').mjt(add_file(handler));
$('.handler-section-active').removeClass('handler-section-active');
$('#handler-'+handler).addClass('handler-section-active');
},
submit : function(inputs){
var filename = jQuery.trim($('#add-file-name').val());
if (ui.get_store().validate_filename(filename)) {
var metadata = { acre_handler: inputs['new-file-handler'] };
if ($('#add-file-mimetype :selected').val()) {
metadata['content_type'] = $('#add-file-mimetype :selected').val();
}
ui.do_file_create_new(filename, metadata);
ui.do_hide_overlays();
} else {
ui.MessagePanel.error("Invalid filename. Only alphanumeric characters, '-', '_' and '.' are allowed.");
}
}
});
$("input[name='new-file-handler'][value='mjt']")
.attr('checked','checked')
.trigger('click');
Delete file “$filename”?
Are you sure you want to delete the file “$filename”?
This can't be undone!
File Save Conflict
The saved version of this file has changed since it was loaded, likely because it was edited by another user
or by you in another browser or tab. View the changes below and decide how to proceed.
${diff_view(data, ["Your Local Version","Saved Version"])}