Commit e2449281 authored by Vincent Bechu's avatar Vincent Bechu

[erp5_web_renderjs_ui] Add button maximize gadget

parent ca932707
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no" />
<title>ERP5 File Field</title>
<!-- renderjs -->
<script src="rsvp.js" type="text/javascript"></script>
<script src="renderjs.js" type="text/javascript"></script>
<!-- custom script -->
<script src="gadget_erp5_button_maximize.js" type="text/javascript"></script>
</head>
<body>
<button>Maximize</button>
</body>
</html>
/*global window, rJS, RSVP */
/*jslint indent: 2, maxerr: 3 */
(function (window, rJS, RSVP) {
"use strict";
rJS(window)
.declareAcquiredMethod('triggerMaximize', 'triggerMaximize')
.onEvent('click', function () {
return this.triggerMaximize(true, this.defer.promise);
})
.declareService(function () {
this.defer = RSVP.defer();
return this.defer.promise;
});
}(window, rJS, RSVP));
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment