GithubHelp home page GithubHelp logo

os-js / osjs-dialogs Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 7.0 139 KB

OS.js Dialogs Module

Home Page: https://manual.os-js.org/v3/

License: Other

JavaScript 96.92% SCSS 2.80% Shell 0.28%
hyperapp osjs

osjs-dialogs's People

Contributors

ajmeese7 avatar andersevenrud avatar dorosty avatar maryam4s26 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

osjs-dialogs's Issues

Colors can only be changed via the sliders, but not via the textbox

For instance: When selecting the fore- or background color buttons in the writer application, one is presented with the three sliders, a color graph and a textbox underneath it.

The color can only be updated by clicking on the sliders or the graph, but not by changing the value inside the textbox.

Latest value chosen in choice dialog!

Hi,
Continued widget development(os-js/osjs-widgets#9), i faced new problem.
I kept a paramter as widget custom options.
measurment: 'netdata.apps.cpu.X'
Due to changing this custom option value I used choice dialog, but I don't know how should I use my parameter value as choice dialog default value.

createMeasurmentDialog() {
    this.core.make('osjs/dialog', 'choice', {
      title: 'Measurment',
      message: 'Select Measurment',
      //TODO: make this list via grafana service
      choices: {
        'netdata.apps.cpu.X': 'netdata.apps.cpu.X',
        'netdata.statsd_timer_swift.object_server.put.timing.events': 'netdata.statsd_timer_swift.object_server.put.timing.events'
      },
    }, (btn, value) => {
      if (btn === 'ok') {
        this.options.measurment = value;
        this.render();
        this.saveSettings();
      }
    });
  }

Would like to see the PromptDialog allow for multiple field entries

Currently the PromptDialog only accepts one value. There should be an array that can be submitted in the "value" field, and then the done() callback function can do a loop through the results.

ex:

    core.make('osjs/dialog', 'prompt', {
      message: `Type in your name:`,
      value: ['First Name', 'Last Name'] 
    }, done(value => {...}

Issue with Cancel button on Save Dialog

I am using the below code for creating and acting on a Save Dialog in OSjs.

    core.make('osjs/dialog', 'file', {type: 'save', title: "Save As"},  {parent: win, attributes: {modal: true}}, (status, file, event) => {
      if (status === "ok") {
        if (!file.path.endsWith(".wf"))
          file.path += ".wf";
        basic.emit('save-file', file);
      }
    });

And the resulting Dialog:

image

At this point, I would expect clicking the Cancel button to trigger a callback with status = 'cancel' and file = null. However the Cancel button callback doesn't trigger until Filename is populated with some text.

There also appears to be an error handler that triggers if the text equals an existing filename, even if the Cancel button was pressed and not the OK button, example below:

image

Pressing No returns to the Save Dialog, and pressing Yes on the Confirm window closes the Save Dialog and sends the status = 'cancel' callback.

I believe expected behavior is to not display the Confirm dialog when Cancel is pressed and to simply close the Save Dialog while sending the 'cancel' callback, regardless of whether any text is input in the Filename field.

Thanks Anders, you're the man.

Overwriting Is Triggered by Close Button in Save-As Dialog

Hi.
I think there is a bug when I close the save-as dialog by close button (not by cancel button). If the filename textbox has some value, the confirm dialog for overwriting is triggered by pressing close button!
For example It happenes in your textpad application.

Question on desired color dialog behavior

By default the color dialog only changes the hex of the textbox once the user has let go of the slider, not showing them a preview as they drag. On my implementation I have merged onchange into oninput so the hex is updated as the user slides, so they know what the color looks like before they release.

I could make a quick PR for this if you are interested, but I don't know if you prefer the current behavior as opposed to the behavior that I mentioned.

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.