~divmod-dev/divmod.org/dangling-1091

« back to all changes in this revision

Viewing changes to Quotient/xquotient/static/js/filter.js

  • Committer: mithrandi
  • Date: 2006-05-29 16:34:24 UTC
  • Revision ID: svn-v4:866e43f7-fbfc-0310-8f2a-ec88d1da2979:trunk:6874
Merge js-modules-651.

Fixes #651
Author: mithrandi
Reviewer: exarkun

This branch implements {{{athena.AutoJSPackage}}} for use in nevow plugins; it
automatically derives JS module mappings from the filesystem hierarchy, in a
manner similar to Python. Unlike python, __init__.js files are optional, and
will be treated like an empty file if not present. Mantissa and Quotient are
also migrated to use the new mechanism.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
// import Mantissa.LiveForm
3
 
// import Quotient
4
 
 
5
 
Quotient.Filter.RuleWidget = Mantissa.LiveForm.FormWidget.subclass("Quotient.Filter.RuleWidget");
6
 
Quotient.Filter.RuleWidget.methods(
7
 
    function submit(self) {
8
 
        Quotient.Filter.RuleWidget.upcall(self, 'submit');
9
 
        return false;
10
 
    });
11
 
 
12
 
Quotient.Filter.HamConfiguration = Nevow.Athena.Widget.subclass("Quotient.Filter.HamConfiguration");
13
 
Quotient.Filter.HamConfiguration.methods(
14
 
    function retrain(self) {
15
 
        self.callRemote('retrain').addCallback(function(result) {
16
 
            self.node.appendChild(document.createTextNode('Training reset.'));
17
 
        }).addErrback(function(err) {
18
 
            self.node.appendChild(document.createTextNode('Error: ' + err.description));
19
 
        });
20
 
        return false;
21
 
    },
22
 
 
23
 
    function reclassify(self) {
24
 
        self.callRemote('reclassify').addCallback(function(result) {
25
 
            self.node.appendChild(document.createTextNode('Beginning reclassification.'));
26
 
        }).addErrback(function(err) {
27
 
            self.node.appendChild(document.createTextNode('Error: ' + err.description));
28
 
        });
29
 
        return false;
30
 
    });