       return error err if err
       success JSON.parse(body) if success
 
+  fetchWidgetIdByIdentifier: (id, success, error) ->
+    r = request_get "http://115.28.1.119:18860/mam/api/mam/widget/checkIdentity?identify=#{id}"
+
   newModule: (data, success, error) ->
 
     Q.Promise (resolve, reject, notify) ->

    @list.html ''
    PackageCell = require './package-cell-template'
    for module in modules
      if(module.package)
        cell = new PackageCell(module)
        cell.on 'upload', (cell, module)=>
          @upload(cell, module)

        filename: 'upload.zip'
        contentType: 'application/zip'

  encrypt: (sourceDir, targetDir) ->

    Q.Promise (resolve, reject, notify) ->
      encrypt sourceDir, targetDir, 'foreveross', (err)=>
        if err then reject(err) else resolve()

  destroy: ->
    @detach()
