[minor] app installer fix

This commit is contained in:
Rushabh Mehta 2015-03-10 18:27:40 +05:30
parent 48576a311b
commit cd141af42b
3 changed files with 12 additions and 7 deletions

View file

@ -48,18 +48,19 @@ frappe.applications.Installer = Class.extend({
make_app_list: function(apps) {
var me = this;
var modules = {};
$.each(Object.keys(apps).sort(), function(i, app_key) {
var app = apps[app_key];
frappe.modules[app_key] = {
modules[app_key] = {
label: app.app_title,
icon: app.app_icon,
color: app.app_color,
is_app: true
};
app.app_icon = frappe.ui.app_icon.get_html(app_key);
app.app_icon = frappe.ui.app_icon.get_html(app_key, null, modules);
$(frappe.render_template("application_row", {app: app})).appendTo(me.wrapper);
});

View file

@ -3,9 +3,9 @@ app_name = "frappe"
app_title = "Frappe Framework"
app_publisher = "Frappe Technologies Pvt. Ltd."
app_description = "Full Stack Web Application Framework in Python"
app_icon = "assets/frappe/images/frappe.svg"
app_icon = "octicon octicon-circuit-board"
app_version = "5.0.0-alpha"
app_color = "#3498db"
app_color = "orange"
app_email = "support@frappe.io"
before_install = "frappe.utils.install.before_install"

View file

@ -4,9 +4,13 @@
frappe.provide("frappe.ui")
frappe.ui.app_icon = {
get_html: function(app, small) {
var icon = frappe.modules[app].icon;
var color = frappe.modules[app].color;
get_html: function(app, small, modules) {
if(!modules) {
modules = frappe.modules;
}
var icon = modules[app].icon;
var color = modules[app].color;
if(icon.split(".").slice(-1)[0]==="svg") {
$.ajax({
url: icon,