Skip to content

How to load the a third part control css file #274

Closed

Description

@itg-assistant

Alexander Newentschany asked 2016-09-21 13:48:52 UTC

Hi,

I try to make a third part JavaScript control to be available in Wisej.

For this purpose, I have created a new Wisej widget and added the control javascript (wijmo.input.min.js) to Packages.

How can I load the control css file (wijmo.min.css) ?

Activity

  1. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Luca answered 2016-09-21 13:57:30 UTC

    Add it to the project under \Resources or \Platform as an embedded resource. Then in AssemblyInfo.cs add

    using Wisej.Core;
    
    [assembly: WisejResources()]
    

    The WisejResources attribute makes the Wisej engine take the js and css embedded files, bundle them (and minify if debug=false in Web.config) and serve them back to the client as two single bundled files: wisej.css and wisej.js. You can also copy in the wijmo js instead of linking the source in packages. The files are bundles in alphabetical order.

    Best,

    Luca

  2. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Alexander Newentschany answered 2016-09-22 12:38:09 UTC

    Hi Luca,

    thanks for fast response . Yes, it's working now, the styles are loaded.

    Well I have another problem now . Not all styles are applied for third part control.

    I have created two small examples (s. attachment): a simple web application and Wisej application. In both I create third part javascript control wijmo.input.ComboBox. The style wt-content is not applied for my combo in Wisej application.

    Best Regards,

    Alexander

  3. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Luca answered 2016-09-22 12:59:54 UTC

    Thanks. There is an extra \ufeff character in the concatenation of the css. I don't know where it's coming from, could be an end of stream. It will be fixed in the next update. It works as soon as I delete it by hand. See image below. You can also easily modify the themes to have the same look as the wijmo combobox, if that's what you need.

    Best,

    Luca

  4. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Alexander Newentschany answered 2016-09-22 13:14:10 UTC

    Luca,

    thank you for superfast support.

    There is only one example, I plan to make the other third part controls of wijmo available in Wisej.

    Regards,

    Alexander

  5. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Luca answered 2016-09-22 13:49:52 UTC

    As a workaround until the next update, you can change  to "false". The extra character is the BOM added by a .NET stream used only when in debug mode.

  6. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Luca answered 2016-09-22 16:48:39 UTC

    One more thing. You can also use the Wisej designer with wijmo widgets but there is an issue where wijmo doesn't like dom ids starting with a number, we'll fix that in Wisej. And your code has a getCountries() child method declared after it's used; it's fine in Chrome but generates a SyntaxError in IE. It should be declared before it's usage.

    You can also decide what to use at design time in your initialization script testing wisej.web.DesignMode. And... Somehow wijmo took over the dom and has slapped a trial notice on all widgets, including ours. See image below.

  7. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Frank (ITG) answered 2016-09-26 23:04:33 UTC

    Hi Alexander,

    WJ-7634 is fixed in the latest build (1.2.67).

    Best regards
    Frank

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions