Skip to content
This repository has been archived by the owner on Apr 5, 2019. It is now read-only.

Created little delay in redirection, so user sees the actual updated page (timing issue) #77

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions stashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ class InternalEvent(db.Model):


class Image(db.Model):
"""A service to track
"""An image representation

Properties:
slug -- stirng: URL friendly version of the name
name -- string: The name of this service
slug -- string: URL friendly version of the name
path -- stirng: The path to the image
icon_set -- string: The icon set this images belongs to

"""
slug = db.StringProperty(required=True)
icon_set = db.StringProperty(required=True)
path = db.StringProperty(required=True)
icon_set = db.StringProperty(required=True)

@classmethod
def get_by_slug(cls, slug):
Expand Down Expand Up @@ -116,7 +116,8 @@ class Service(db.Model):
Properties:
name -- string: The name of this service
description -- string: The function of the service
slug -- stirng: URL friendly version of the name
slug -- string: URL friendly version of the name
list -- reference: The list this service belongs to

"""
@staticmethod
Expand Down
6 changes: 4 additions & 2 deletions stashboard/static/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ var stashboard = (function (parent, $) {
e.preventDefault();
$.post($("form.admin").attr("action"),
$("form.admin").serialize(), function(data){
location.href = $("form.admin link").attr("href");
setTimeout(function() {
location.href = $("form.admin link").attr("href");
}, 1000); }
}, "json")
.error(function(jqXHR){
var data = JSON.parse(jqXHR.responseText);
Expand Down Expand Up @@ -34,4 +36,4 @@ var stashboard = (function (parent, $) {

});

}(stashboard || {}, jQuery));
}(stashboard || {}, jQuery));