-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-35333] New job popup #2388
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/form"> | ||
<div class="remodal new-job-popup" data-remodal-id="newjob" id="add-item-panel"> | ||
<form method="post" action="${rootURL}/${it.viewUrl}createItem" name="createItem" id="createItem"> | ||
<div class="header"> | ||
<div class="add-item-name"> | ||
<label for="name">${%ItemName.label}</label> | ||
<input name="name" id="name" type="text" tabindex="0" /> | ||
<div class="input-help">» ${%ItemName.help}</div> | ||
<div id="itemname-required" class="input-validation-message input-message-disabled">» ${%ItemName.validation.required}</div> | ||
<div id="itemname-invalid" class="input-validation-message input-message-disabled"></div> | ||
<div id="itemtype-required" class="input-validation-message input-message-disabled">» ${%ItemType.validation.required}</div> | ||
</div> | ||
</div> | ||
|
||
<div id="items" class="categories flat" role="radiogroup" aria-labelledby="Items" /> | ||
|
||
<j:if test="${!empty(app.itemMap)}"> | ||
<div class="item-copy"> | ||
<p class="description">${%CopyOption.description}:</p> | ||
<div class="add-item-copy"> | ||
<input type="radio" name="mode" value="copy" /> | ||
<div class="icon"> | ||
<img src="${resURL}/images/48x48/copy.png" /> | ||
</div> | ||
<label>${%CopyOption.label}</label> | ||
<j:set var="descriptor" value="${it.descriptor}" /> | ||
<s:textbox id="from" name="from" placeholder="${%CopyOption.placeholder}" field="copyNewItemFrom"/> | ||
</div> | ||
</div> | ||
</j:if> | ||
|
||
<div class="footer"> | ||
<div class="btn-decorator"> | ||
<button type="submit" id="ok-button">OK</button> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</j:jelly> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
JobName={0} name | ||
ItemName.help=Required field | ||
ItemName.label=Enter an item name | ||
ItemName.validation.required=This field cannot be empty, please enter a valid name | ||
ItemType.validation.required=Please select an item type | ||
CopyOption.placeholder=Type to autocomplete | ||
CopyOption.description=if you want to create a new item from other existing, you can use this option | ||
CopyOption.label=Copy from | ||
CopyExisting=Copy existing {0} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,16 +33,22 @@ THE SOFTWARE. | |
<link rel="alternate" title="Jenkins:${it.viewName} (all builds) (RSS 2.0)" href="${rootURL}/${it.url}rssAll?flavor=rss20" type="application/rss+xml" /> | ||
<link rel="alternate" title="Jenkins:${it.viewName} (failed builds)" href="${rootURL}/${it.url}rssFailed" type="application/rss+xml" /> | ||
<link rel="alternate" title="Jenkins:${it.viewName} (failed builds) (RSS 2.0)" href="${rootURL}/${it.url}rssFailed?flavor=rss20" type="application/rss+xml" /> | ||
|
||
<l:css src="jsbundles/remodal.css" /> | ||
<l:js src="jsbundles/add-item.js" /> | ||
<l:css src="jsbundles/add-item.css" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to add .new-job-popup style to add-item.css There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. where exactly you put your code? (full path) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, I found it. It is because add-item.css is compiled from add-item.less |
||
</l:header> | ||
<l:side-panel> | ||
<l:tasks> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why you throw away this logic? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh, my bad. I missed it. I updated the file so the only change is the |
||
<st:include page="tasks-top.jelly" it="${it.owner}" optional="true" /> | ||
|
||
<st:include page="tasks-new.jelly" it="${it.owner}" optional="true"> | ||
<!-- made overridable for ViewGroup that doesn't allow modifications --> | ||
<l:task href="${rootURL}/${it.viewUrl}newJob" icon="icon-new-package icon-md" it="${app}" permission="${it.itemCreatePermission}" title="${%NewJob(it.newPronoun)}"/> | ||
<l:task href="#newjob" icon="icon-new-package icon-md" it="${app}" permission="${it.itemCreatePermission}" title="${%NewJob(it.newPronoun)}"/> | ||
</st:include> | ||
|
||
<st:include page="popup.jelly" optional="true" /> | ||
|
||
<j:choose> | ||
<j:when test="${it.class.name=='hudson.model.AllView'}"> | ||
<l:task href="${rootURL}/asynchPeople/" icon="icon-user icon-md" title="${%People}"/> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// Initialize all modules by requiring them. Also makes sure they get bundled (see gulpfile.js). | ||
var $ = require('jquery-detached').getJQuery(); | ||
require('remodal-detached').getRemodal(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is this required but then not used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is like a bootstrap library. I do not need to use the rules by myself. But I need predifined rules for the standard behaviour There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok 👍🏻 |
||
|
||
var getItems = function() { | ||
var d = $.Deferred(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -357,3 +357,9 @@ | |
} | ||
} | ||
} | ||
|
||
.new-job-popup { | ||
max-width: 800px; | ||
padding: 0; | ||
text-align: left; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed new styles from style.css and added remodal library styles to remodal.css
Is this correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think it not correct. Place it to some vendor dir close to less, and try to find how to process this file to jsbundles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the file to src/main/js/remodal.css and added changes to gulpfile.js to process it to jsbundles. I asked Tom if I placed the file to the right foldr and if changes in gulpfile are valid. He approved it.