Jenkins plugin advanced development - javascript

I am trying to create an advanced feature in jenkins plugin but no idea where to start.
I wanted to create a table which has dynamically row added with checkbox in one column and get value of those selected checkboxes.
Please help me out for.
a) generate dynamically table.
b) add checkbox in column and get checked value.

After a week of RnD. Jenkins tag library not provided so much control but it has one control that make us happy.
<f:block></f:block>
In this block we can create a table or other html controls.
For dynamically created rows and coloumns we should use javascript in <script /> tag it not requried type like in html.
Guys i tried jQuery but jenkin stapler not allow this, because sign of dollar is used for stapling classes in jenkin.
If you know the data for generating dynamic row then that's ok. but if your data is came from server side then we have to implement ajax functionality.
For ajax functionality in jenkins use this link.
"https://wiki.jenkins-ci.org/display/JENKINS/AJAX+with+JavaScript+proxy"

Related

Bluebeam Scripting - Custom Columns, Markups, & Forms

BLUEBEAM AND ADOBE ARE BOTH PDF VIEWERS THAT HAVE A LOT OF SIMILARITIES
Hello, I am trying to figure out how to link a form answer to some markups (tools).
Custom Columns that are created In Bluebeam:
When I create a new tool I can manually fill out all of these custom columns under the "Custom" section within the settings of a tool:
Then I can save that tool and all of the data will be repeated for every copy of that tool. However, the circled columns in the first picture would be changing on every page. Which means I would have to make a new tool for every page. (FYI I would be making ~20 tools for this, so I would have to update 20 tools every single page ;_;) Therefore, I want to create a dropdown/textbox on each page with those columns. When a user fills out the dropdown/textbox, the markups are automatically updated with that info, which means the custom columns are also updated.
Does anyone have an idea of how to link these?
As of now I have been able to create a code that creates a popup if a user selects a certain drop down. This shows me that you can grab the data from a user. I just don't know how to connect that data to all the markups (tools). I know each markup has a special ID, but I'm curious if you can somehow link to the tools "subject" property to do this.
Bluebeam provided me with their JavaScript API if that is any help.
https://i.stack.imgur.com/yEdU1.jpg (I got this image from this post JavaScript Library with Bluebeam)
UPDATE
I found another document with potential accepted scripts for Bluebeam. Please note this one will require people to have Bluebeam Revu eXtreme
https://support.bluebeam.com/wp-content/uploads/2019/08/Bluebeam-Script-Reference-2018.pdf
This version actually has a markup section (which are the things I am more or less wanting to have the custom columns be updated for with the user input)
This document seems to be relevant only for the Bluebeam Script Editor. You can open it by looking in the folder for Bluebeam from your start window.
There are 2 issues I have with this though. I haven't figured out how to run the codes I have in the script inside of Bluebeam yet and I am curious if there is a way to not need the markupID's and/or a way to get them without having to download the markups
I've been lurking on stack for so long, I finally have something to contribute...
I work with custom columns and toolsets all the time. I think you're missing a basic understanding of what the markup list is. Or maybe I am. The markup list is the table of data at the bottom of Bluebeam, where you're trying to change column headings.
The markup list is basically a table of data, what you're trying to do will change the column headers per page, which would change it for all entries. From what I know about Bluebeam, these are static, just like any database or table in any application like Excel. If you need to have different column headings, you need to just stack them all and use what you need on each page or from tool to tool. Or create different profiles with different custom columns, but this gets messy having multiple profiles accessing a single document. Maybe java can help show and hide these per what's relevant on the page within the custom field. But... I think the java is limited to be used within PDF form fields and some basic PDF actions such as print, save, etc. I don't think the level of coding you're looking for exists within Bluebeam.
I use profiles to manage custom columns per process, not the actual tool. It's kind of unclear exactly why the custom columns can follow the tools without the actual profile though.
What I do to accomplish complex tasks is export the markup list and build something within Excel VBA to tabulate data and export reports with relevant information. I'm sure you could use basically any coding language to accomplish this after the table is exported from Bluebeam.

Add custom list box Kendo HTML Editor

We are planning to use Kendo HTML Editor (angular ver.) in one of our app.
This will be used to create E-mail campaigns online. This e-mail template will be personalised so need to include special strings (acting as keys) such as {$firstname}
Is it possible to add listbox in Kendo HTML Editor where we can list these keys?
This will help content editor to pickup any key from list without remembering. And on selection we can add value on cursor position.
Thank you.
Best Regards
So if you want to implement this feature in the toolbar of your editor I would try something like this.
Step 1: Build a toolbar template.
(I can't post more than two links but if you google "angular kendo toolbar template" and find the first demo you'll find my example)
instead of using the anchor they use add an input inside your template.
Step 2: Turn the input into a kendo dropdownlist when the page is ready.
http://demos.telerik.com/kendo-ui/dropdownlist/remotedatasource
Step 3: Add a change event to the datasource then add something like this to the dropdown you just made.
http://demos.telerik.com/kendo-ui/editor/api
you may need to tweak this a little because these examples are mostly kendo in plain js but it's a good place to start.

ASP.NET MVC Facebook Style friend tags in textbox

I am not sure what it is called, but I am trying to replicate the facebook style tagging of friends in a post.
I would like it that when I start to type one of my customers names in, that it prompts to add the customer name to the post and is a hyperlink to the customer profile.
Anyone know what this might be called, or a way to achieve this?
Thanks
Mike
Basically, It is just a auto complete text box. As you type, Your code should read the text in the textbox, send it to some server page/api endpoints with this text and other relevant information needed. The server page will query your db table and return your friends name in a list to the caller and you need to display it in a list under the text box. You should have code when user select one item from that list to invoke some other js function where you will save it again to the db table (of tagged people) table.
Fortunately there are a lot of plugins available to do this. With minimal customization, you can achieve this. jQuery UI is a library you can look into. It has an Auto complete feature. There are a lot of other libraries too. A simple google search will help you to get started.

Javascript plugin that mimics Google Sheets sort and filter functionality?

Wondering if anyone knows of a Javascript plugin with the functionality to sort and filter an HTML table similar to Google Sheets and Excel (see pic). Specifically, the filtering functionality is the kind where multiple values can be checked/unchecked (as opposed to a search box which can only search one value).
I know the functionality exists but I've looked high and low and haven't found anything. Here are some that don't have the checkbox filtering option:
http://www.listjs.com/
http://www.javascripttoolbox.com/lib/table/index.php
http://www.datatables.net/
http://tablesorter.com/docs/
http://www.javascriptkit.com/script/script2/tablefilter.shtml
The list could go on, but I haven't found anything out of the box.
(Names in image are fake).
You might be able to write your own, as seen in this answer.
The basic idea is that you present a checkbox for each unique value, and only show if the corresponding checkbox is true. JS's grep feature should help tremendously.
This should help you with your project: https://code.google.com/p/jquery-datatables-column-filter/ it is a plugin for datatables.net which you already have come across.
There is example code to enable a multi-checkbox type filter on your tables here: http://jquery-datatables-column-filter.googlecode.com/svn/trunk/checkbox.html
With some CSS magic you should be able to make it look exactly like Google Sheets if you wish.

JqGrid add button to advanced search dialog

I'd like to add the ability to save a complex query built up in the advanced search dialog.
Saving the generated SQL is no problem, but I'm not sure how to add buttons to the advanced search query dialog to give users the options of saving / loading a query.
Any advice would be appreciated.
There is no way to do this directly using the jqGrid API. However, you could use one of the optional events such as afterShowSearch to define a function that will dynamically add such buttons.
I suggest using FireBug to help reverse-engineer exactly where to place the buttons.

Categories