forked from bazitur/brackets-python-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPyStatus.js
More file actions
25 lines (21 loc) · 649 Bytes
/
PyStatus.js
File metadata and controls
25 lines (21 loc) · 649 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* global define, $ */
define(function (require, exports, module) {
"use strict";
var status;
function PyStatus (handler) {
status = $('<div id="python-tools-status">');
$("#status-overwrite").after(status);
status.after($('<div id="python-tools-status-dummy">'));
status.on("click", handler);
}
PyStatus.prototype.update = function (cls, title) {
status.removeClass();
status.addClass(cls);
title = title || null;
if (title)
status.attr("title", title);
else
status.removeAttr("title");
}
module.exports = PyStatus;
});