Git Product home page Git Product logo

sco.js's People

Contributors

terebentina avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sco.js's Issues

scojs modal problem

I find a problem about scojs_modal.
This is my code:

window.DialogEditPwd = $.scojs_modal({
target:'#modal_changepwd',
title:'change password',
remote:'manage/staffManage/changepwd.jsp',
keyboard: false
});
window.DialogEditPwd.show();
When the code first run,no problem.
When the code second run,$.scojs_modal is undefined.
My jquery is not good,please help me thanks.

Countdown timer doesn't display when until < 60 seconds

If you try to start the countdown timer with an until value that is < 60 seconds, it doesn't display.

Adding a check for any seconds will fix this:

if (left.s > 1) {started = true}

if (started) {
    str += ' ' + left.s + data.strings.s;
}

Add modal option for buttons

Right now the only way to create a modal with buttons is to use the confirm plugin(which is specialized), or to write the markup for a modal and then point the modal plugin to the element as the target -- which IMO defeats the point of using a plugin to create modals in the first place.

Could you add a buttons option to the modal so that doing something like

var modal = $.scojs_modal({
buttons: { Whatever: function() { do.something() } } 
}

would create buttons for the dialog?

Support wysiwyg editors in valid

Since most wysiwyg editors are using a separate iframe/element to write the text, the textarea of the form is not updated before submitting the form.
So even if the user writes something in the editor, the validation plugin thinks the textarea is empty.
A onBeforeValidation callback is required to give the chance to the editor to update the textarea

sco.confirm.js cannot call action function while using a exist confirm modal

This is the code before :
//========================================= begin
var $modal = $(this.options.target);
if (!$modal.length) {
$modal = $('

').appendTo(this.options.appendTo).hide();
if (typeof this.options.action == 'function') {
var self = this;
$modal.find('[data-action]').attr('href', '#').on('click.' + pluginName, function(e) {
e.preventDefault();
self.options.action.call(self);
self.close();
});
} else if (typeof this.options.action == 'string') {
$modal.find('[data-action]').attr('href', this.options.action);
}
}
//========================================= end //
The action function will not called while I use an exist confirm modal, so I modified the code:
//========================================= begin
var $modal = $(this.options.target);
if (!$modal.length) {
$modal = $('
').appendTo(this.options.appendTo).hide();
}
if (typeof this.options.action == 'function') {
var self = this;
$modal.find('[data-action]').attr('href', '#').off('click').on('click.' + pluginName, function(e) {
e.preventDefault();
self.options.action.call(self);
self.close();
});
} else if (typeof this.options.action == 'string') {
$modal.find('[data-action]').attr('href', this.options.action);
}
//========================================= end //
Then it works

confirm buttons cannot display

confirm dialog yes cannel button cannot display some times, because

don't generated .
that ok for modify sco.confirm.js line 32
to
.but throw other error that sco.modal.js line 115 this.$modal is null.

sco.modal.js load remote html failed with message 'undefined is not a function'

_the test page code is blow:_

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<form class="form-horizontal">
    <div class="form-group">
        <div class="form-control">
            <input type="text" id="nodeName">
        </div>
    </div>
</form>
<script>
</script>
</body>
</html>

I use the branch bs-3 with boostrap3 , the error just will happened that id named 'nodeName' with this structure and at same time exist <script> tag。

sco.modal.js && sco.ajax.js problem,does't work in Google Chrome

hear is my code:please help!

<link href="http://cdn.bootcss.com/twitter-bootstrap/2.3.1/css/bootstrap.min.css" rel="stylesheet">
<script src="http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
<script src="js/sco.modal.js"></script>
<script src="js/sco.ajax.js"></script>

<a data-trigger="modal" href="news/index_news/1.html" data-title="Modal title" class="btn">Launch demo modal</a>
<a data-trigger="ajax" href="news/index_news/1.html" data-target="#ajax_target" class="btn">Ajax demo</a>
<div id="ajax_target">Remote content will be loaded here</div>

Option "cssclass" is present on subsequent modals.

When using data-cssclass= the css class that is added to the modal is sometimes present on subsequent modals on the page that are not using this option. This creates the issue of modals having unwanted styling. This happens occasionally, not every time (tested mac/chrome).

Avoid bower install warnings

With the 1.0.2 version there is some warnings when the package is installed through Bower:

$ bower install sco.js --save
bower sco.js#*              not-cached git://github.com/terebentina/sco.js.git#*
bower sco.js#*                 resolve git://github.com/terebentina/sco.js.git#*
bower sco.js#*                download https://github.com/terebentina/sco.js/archive/1.0.2.tar.gz
bower sco.js#*                 extract archive.tar.gz
bower sco.js#*            invalid-meta sco.js is missing "main" entry in bower.json
bower sco.js#*            invalid-meta sco.js is missing "ignore" entry in bower.json
bower sco.js#*                resolved git://github.com/terebentina/sco.js.git#1.0.2
bower sco.js#~1.0.2            install sco.js#1.0.2

sco.js#1.0.2 public\lib\sco.js

Would be great if you could add a bower.json with the ignore statement. Something like this:

...
  "ignore": [
    "**/.*",
    "tests"
  ],
...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.